Changeset View
Changeset View
Standalone View
Standalone View
cuttlefish/package/contents/ui/Comparison.qml
1 | import QtQuick 2.4 | 1 | import QtQuick 2.4 | ||
---|---|---|---|---|---|
2 | import QtQuick.Controls 2.5 as QQC2 | 2 | import QtQuick.Controls 2.5 as QQC2 | ||
3 | import QtQuick.Layouts 1.3 | 3 | import QtQuick.Layouts 1.3 | ||
4 | 4 | | |||
5 | import org.kde.kirigami 2.8 as Kirigami | 5 | import org.kde.kirigami 2.8 as Kirigami | ||
6 | 6 | | |||
7 | Kirigami.OverlaySheet { | 7 | Kirigami.OverlaySheet { | ||
8 | property int comparisonSize | 8 | property int comparisonSize | ||
9 | background: Rectangle { | 9 | background: Rectangle { | ||
10 | id:background | 10 | id:background | ||
11 | color: cuttlefish.viewbgcolor | 11 | Kirigami.Theme.colorSet: Kirigami.Theme.View | ||
12 | color: Kirigami.Theme.backgroundColor | ||||
12 | anchors.fill: parent | 13 | anchors.fill: parent | ||
13 | } | 14 | } | ||
14 | 15 | | |||
15 | onSheetOpenChanged: { | 16 | onSheetOpenChanged: { | ||
16 | if (sheetOpen) { | 17 | if (sheetOpen) { | ||
17 | comparisonSize = iconSize; | 18 | comparisonSize = iconSize; | ||
18 | comparisonSlider.value = [8, 16, 22, 32, 48, 64, 128].indexOf(comparisonSize); | 19 | comparisonSlider.value = [8, 16, 22, 32, 48, 64, 128].indexOf(comparisonSize); | ||
19 | } | 20 | } | ||
20 | } | 21 | } | ||
21 | 22 | | |||
22 | ColumnLayout { | 23 | ColumnLayout { | ||
23 | Kirigami.Theme.textColor: cuttlefish.textcolor | | |||
24 | Kirigami.Theme.highlightColor: cuttlefish.highlightcolor | | |||
25 | Kirigami.Theme.highlightedTextColor: cuttlefish.highlightedtextcolor | | |||
26 | Kirigami.Theme.positiveTextColor: cuttlefish.positivetextcolor | | |||
27 | Kirigami.Theme.neutralTextColor: cuttlefish.neutraltextcolor | | |||
28 | Kirigami.Theme.negativeTextColor: cuttlefish.negativetextcolor | | |||
29 | RowLayout { | 24 | RowLayout { | ||
30 | Layout.alignment: Qt.AlignHCenter | 25 | Layout.alignment: Qt.AlignHCenter | ||
31 | QQC2.Slider { | 26 | QQC2.Slider { | ||
32 | Layout.preferredWidth: comparisonGrid.width * 0.75 | 27 | Layout.preferredWidth: comparisonGrid.width * 0.75 | ||
33 | id: comparisonSlider | 28 | id: comparisonSlider | ||
34 | to: 6.0 | 29 | to: 6.0 | ||
35 | stepSize: 1.0 | 30 | stepSize: 1.0 | ||
36 | snapMode: QQC2.Slider.SnapAlways | 31 | snapMode: QQC2.Slider.SnapAlways | ||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |