Changeset View
Changeset View
Standalone View
Standalone View
org.kde.desktop/Dialog.qml
Show All 17 Lines | |||||
18 | * ensure the GNU General Public License version 2.0 requirements will be | 18 | * ensure the GNU General Public License version 2.0 requirements will be | ||
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.Templates 2.1 as T | 25 | import QtQuick.Templates 2.1 as T | ||
26 | import org.kde.qqc2desktopstyle.private 1.0 as StylePrivate | 26 | import org.kde.kirigami 2.2 as Kirigami | ||
27 | 27 | | |||
28 | T.Dialog { | 28 | T.Dialog { | ||
29 | id: control | 29 | id: control | ||
30 | 30 | | |||
31 | implicitWidth: Math.max(background ? background.implicitWidth : 0, | 31 | implicitWidth: Math.max(background ? background.implicitWidth : 0, | ||
32 | contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0) | 32 | contentWidth > 0 ? contentWidth + leftPadding + rightPadding : 0) | ||
33 | implicitHeight: Math.max(background ? background.implicitHeight : 0, | 33 | implicitHeight: Math.max(background ? background.implicitHeight : 0, | ||
34 | contentWidth > 0 ? contentHeight + topPadding + bottomPadding : 0) | 34 | contentWidth > 0 ? contentHeight + topPadding + bottomPadding : 0) | ||
Show All 22 Lines | 52 | NumberAnimation { | |||
57 | duration: 250 | 57 | duration: 250 | ||
58 | } | 58 | } | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | contentItem: Item { } | 61 | contentItem: Item { } | ||
62 | 62 | | |||
63 | background: Rectangle { | 63 | background: Rectangle { | ||
64 | radius: 2 | 64 | radius: 2 | ||
65 | color: StylePrivate.SystemPaletteSingleton.window(control.enabled) | 65 | color: Kirigami.Theme.backgroundColor | ||
66 | property color borderColor: StylePrivate.SystemPaletteSingleton.text(control.enabled) | 66 | property color borderColor: Kirigami.Theme.textColor | ||
67 | border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3) | 67 | border.color: Qt.rgba(borderColor.r, borderColor.g, borderColor.b, 0.3) | ||
68 | layer.enabled: true | 68 | layer.enabled: true | ||
69 | 69 | | |||
70 | layer.effect: DropShadow { | 70 | layer.effect: DropShadow { | ||
71 | transparentBorder: true | 71 | transparentBorder: true | ||
72 | radius: 8 | 72 | radius: 8 | ||
73 | samples: 16 | 73 | samples: 16 | ||
74 | horizontalOffset: 0 | 74 | horizontalOffset: 0 | ||
Show All 9 Lines |