Changeset View
Changeset View
Standalone View
Standalone View
org.kde.desktop/Menu.qml
Show All 18 Lines | |||||
19 | * met: http://www.gnu.org/licenses/gpl-2.0.html. | 19 | * met: http://www.gnu.org/licenses/gpl-2.0.html. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | 22 | | |||
23 | import QtQuick 2.6 | 23 | import QtQuick 2.6 | ||
24 | import QtGraphicalEffects 1.0 | 24 | import QtGraphicalEffects 1.0 | ||
25 | import QtQuick.Controls 2.0 | 25 | import QtQuick.Controls 2.0 | ||
26 | import QtQuick.Templates 2.0 as T | 26 | import QtQuick.Templates 2.0 as T | ||
27 | import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate | 27 | import org.kde.kirigami 2.2 as Kirigami | ||
28 | 28 | | |||
29 | T.Menu { | 29 | T.Menu { | ||
30 | id: control | 30 | id: control | ||
31 | 31 | | |||
32 | implicitWidth: Math.max(background ? background.implicitWidth : 0, | 32 | implicitWidth: Math.max(background ? background.implicitWidth : 0, | ||
33 | contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0) | 33 | contentItem ? contentItem.implicitWidth + leftPadding + rightPadding : 0) | ||
34 | implicitHeight: Math.max(background ? background.implicitHeight : 0, | 34 | implicitHeight: Math.max(background ? background.implicitHeight : 0, | ||
35 | contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding | 35 | contentItem ? contentItem.implicitHeight : 0) + topPadding + bottomPadding | ||
Show All 29 Lines | 60 | NumberAnimation { | |||
65 | duration: 150 | 65 | duration: 150 | ||
66 | } | 66 | } | ||
67 | } | 67 | } | ||
68 | 68 | | |||
69 | background: Rectangle { | 69 | background: Rectangle { | ||
70 | radius: 2 | 70 | radius: 2 | ||
71 | implicitWidth: 150 | 71 | implicitWidth: 150 | ||
72 | implicitHeight: 40 | 72 | implicitHeight: 40 | ||
73 | color: StylePrivate.SystemPaletteSingleton.window(control.enabled) | 73 | color: Kirigami.Theme.backgroundColor | ||
74 | property color borderColor: StylePrivate.SystemPaletteSingleton.text(control.enabled) | 74 | property color borderColor: Kirigami.Theme.textColor | ||
75 | border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3) | 75 | border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3) | ||
76 | layer.enabled: true | 76 | layer.enabled: true | ||
77 | 77 | | |||
78 | layer.effect: DropShadow { | 78 | layer.effect: DropShadow { | ||
79 | transparentBorder: true | 79 | transparentBorder: true | ||
80 | radius: 4 | 80 | radius: 4 | ||
81 | samples: 8 | 81 | samples: 8 | ||
82 | horizontalOffset: 2 | 82 | horizontalOffset: 2 | ||
83 | verticalOffset: 2 | 83 | verticalOffset: 2 | ||
84 | color: Qt.rgba(0, 0, 0, 0.3) | 84 | color: Qt.rgba(0, 0, 0, 0.3) | ||
85 | } | 85 | } | ||
86 | } | 86 | } | ||
87 | } | 87 | } |