swissChili | 23958ca | 2022-02-21 19:23:34 -0800 | [diff] [blame] | 1 | import QtQuick 2.0 |
| 2 | import QtQuick.Controls 2.15 |
| 3 | import QtQuick.Controls.Material 2.0 |
| 4 | import QtQuick.Layouts 1.0 |
| 5 | |
| 6 | Rectangle { |
| 7 | id: root |
| 8 | |
swissChili | 4b3105a | 2022-02-22 16:34:39 -0800 | [diff] [blame^] | 9 | color: Material.color(Material.Grey, Material.theme == Material.Dark ? Material.Shade800 : Material.Shade300) |
swissChili | 23958ca | 2022-02-21 19:23:34 -0800 | [diff] [blame] | 10 | height: 2 |
| 11 | Layout.fillWidth: true |
| 12 | Layout.topMargin: 14 |
| 13 | Layout.bottomMargin: 14 |
| 14 | |
| 15 | transitions: Transition { |
| 16 | NumberAnimation { |
| 17 | property: "opacity" |
| 18 | duration: 100 |
| 19 | easing.type: Easing.OutCubic |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | MouseArea { |
| 24 | id: mouseArea |
| 25 | height: 30 |
| 26 | width: parent.width |
| 27 | anchors.centerIn: parent |
| 28 | hoverEnabled: true |
| 29 | |
| 30 | states: [ |
| 31 | State { |
| 32 | when: mouseArea.containsMouse |
| 33 | PropertyChanges { |
| 34 | target: root |
| 35 | opacity: 1 |
| 36 | } |
| 37 | }, |
| 38 | State { |
| 39 | when: !mouseArea.containsMouse |
| 40 | PropertyChanges { |
| 41 | target: root |
| 42 | opacity: 0 |
| 43 | } |
| 44 | } |
| 45 | ] |
| 46 | } |
| 47 | |
| 48 | Item { |
| 49 | id: insertRow |
| 50 | anchors.centerIn: parent |
| 51 | height: 24 |
| 52 | width: 24 |
| 53 | |
| 54 | Button { |
| 55 | id: addButton |
| 56 | anchors.centerIn: parent |
| 57 | icon.source: "qrc:///icons/add.svg" |
swissChili | 4b3105a | 2022-02-22 16:34:39 -0800 | [diff] [blame^] | 58 | icon.color: Material.color(Material.Grey, Material.theme == Material.Dark ? Material.Shade400 : Material.Shade600) |
swissChili | 23958ca | 2022-02-21 19:23:34 -0800 | [diff] [blame] | 59 | flat: true |
| 60 | } |
| 61 | } |
| 62 | } |