Changeset View
Standalone View
kcm/package/contents/ui/Panel.qml
Show All 16 Lines | |||||
17 | import QtQuick 2.9 | 17 | import QtQuick 2.9 | ||
18 | import QtQuick.Layouts 1.1 | 18 | import QtQuick.Layouts 1.1 | ||
19 | import QtQuick.Controls 2.3 as Controls | 19 | import QtQuick.Controls 2.3 as Controls | ||
20 | import org.kde.plasma.extras 2.0 as PlasmaExtras | 20 | import org.kde.plasma.extras 2.0 as PlasmaExtras | ||
21 | import org.kde.kirigami 2.4 as Kirigami | 21 | import org.kde.kirigami 2.4 as Kirigami | ||
22 | import org.kde.private.kcm.kscreen 1.0 as KScreen | 22 | import org.kde.private.kcm.kscreen 1.0 as KScreen | ||
23 | 23 | | |||
24 | ColumnLayout { | 24 | ColumnLayout { | ||
25 | Kirigami.FormLayout { | | |||
26 | twinFormLayouts: globalSettingsLayout | | |||
27 | Item { | | |||
28 | Kirigami.FormData.isSection: true | | |||
29 | Kirigami.FormData.label: i18n("Output settings") | | |||
30 | | ||||
31 | Rectangle { | | |||
32 | anchors.fill: parent | | |||
33 | opacity: 0.5 | | |||
34 | } | | |||
35 | } | | |||
36 | } | | |||
37 | | ||||
38 | Controls.SwipeView { | 25 | Controls.SwipeView { | ||
39 | id: panelView | 26 | id: panelView | ||
40 | currentIndex: root.selectedOutput | 27 | currentIndex: root.selectedOutput | ||
41 | 28 | | |||
42 | onCurrentIndexChanged: root.selectedOutput = | 29 | onCurrentIndexChanged: root.selectedOutput = | ||
43 | Qt.binding(function() { return currentIndex; }); | 30 | Qt.binding(function() { return currentIndex; }); | ||
44 | 31 | | |||
45 | Layout.fillWidth: true | 32 | Layout.fillWidth: true | ||
46 | 33 | | |||
47 | Repeater { | 34 | Repeater { | ||
48 | model: kcm.outputModel | 35 | model: kcm.outputModel | ||
49 | OutputPanel {} | 36 | OutputPanel {} | ||
50 | } | 37 | } | ||
51 | } | 38 | } | ||
52 | 39 | | |||
53 | Controls.PageIndicator { | 40 | Controls.PageIndicator { | ||
54 | id: indicator | 41 | id: indicator | ||
55 | 42 | | |||
56 | Layout.alignment: Qt.AlignHCenter | 43 | Layout.alignment: Qt.AlignHCenter | ||
57 | opacity: count > 1 ? 1 : 0 | 44 | visible: count > 1 ? 1 : 0 | ||
romangg: `visible: count > 1` | |||||
58 | 45 | | |||
59 | count: panelView.count | 46 | count: panelView.count | ||
60 | currentIndex: panelView.currentIndex | 47 | currentIndex: panelView.currentIndex | ||
61 | interactive: true | 48 | interactive: true | ||
62 | onCurrentIndexChanged: root.selectedOutput = currentIndex | 49 | onCurrentIndexChanged: root.selectedOutput = currentIndex | ||
63 | } | 50 | } | ||
64 | 51 | | |||
65 | Kirigami.FormLayout { | 52 | Kirigami.FormLayout { | ||
66 | id: globalSettingsLayout | 53 | id: globalSettingsLayout | ||
67 | Layout.fillWidth: true | 54 | Layout.fillWidth: true | ||
68 | Layout.topMargin: 20 | 55 | | ||
69 | Kirigami.Separator { | 56 | Kirigami.Separator { | ||
70 | Layout.fillWidth: true | 57 | Layout.fillWidth: true | ||
71 | Kirigami.FormData.isSection: true | 58 | Kirigami.FormData.isSection: true | ||
72 | } | 59 | } | ||
73 | Item { | | |||
74 | Layout.fillWidth: true | | |||
75 | Kirigami.FormData.isSection: true | | |||
76 | Kirigami.FormData.label: i18n("Arrangement settings") | | |||
77 | } | | |||
Options below does not only affect the currently shown output above but all outputs in the current configuration. I don't think this is clear anymore with only the horizontal line. romangg: Options below does not only affect the currently shown output above but all outputs in the… | |||||
I think the fact that the slider's label says "Global scale" communicates that it's a global setting. As for the other control in this group, I think we can make it clearer with better wording. ngraham: I think the fact that the slider's label says "Global scale" communicates that it's a global… | |||||
78 | 60 | | |||
79 | ColumnLayout { | 61 | RowLayout { | ||
80 | Layout.fillWidth: true | 62 | Layout.fillWidth: true | ||
81 | Kirigami.FormData.label: i18n("Global scale:") | 63 | Kirigami.FormData.label: i18n("Global scale:") | ||
82 | 64 | | |||
83 | visible: !kcm.perOutputScaling | 65 | visible: !kcm.perOutputScaling | ||
84 | 66 | | |||
85 | Controls.Slider { | 67 | Controls.Slider { | ||
86 | id: globalScaleSlider | 68 | id: globalScaleSlider | ||
87 | 69 | | |||
88 | Layout.fillWidth: true | 70 | Layout.fillWidth: true | ||
89 | from: 1 | 71 | from: 1 | ||
90 | to: 3 | 72 | to: 3 | ||
91 | stepSize: 0.1 | 73 | stepSize: 0.1 | ||
92 | live: true | 74 | live: true | ||
93 | value: kcm.globalScale | 75 | value: kcm.globalScale | ||
94 | onMoved: kcm.globalScale = value | 76 | onMoved: kcm.globalScale = value | ||
95 | } | 77 | } | ||
96 | Controls.Label { | 78 | Controls.Label { | ||
97 | Layout.alignment: Qt.AlignHCenter | 79 | text: i18nc("Scale factor (e.g. 1.0x, 1.5x, 2.0x)","%1x", globalScaleSlider.value.toLocaleString(Qt.locale(), "f", 1)) | ||
98 | text: globalScaleSlider.value.toLocaleString(Qt.locale(), "f", 1) | | |||
99 | } | 80 | } | ||
100 | } | 81 | } | ||
101 | 82 | | |||
102 | Controls.ButtonGroup { | 83 | Controls.ButtonGroup { | ||
103 | buttons: retentionSelector.children | 84 | buttons: retentionSelector.children | ||
104 | } | 85 | } | ||
105 | 86 | | |||
106 | ColumnLayout { | 87 | ColumnLayout { | ||
107 | id: retentionSelector | 88 | id: retentionSelector | ||
108 | 89 | | |||
109 | Kirigami.FormData.label: i18n("Save values of an output:") | 90 | Kirigami.FormData.label: i18n("Save display properties:") | ||
GB_2: "Save output properties:" | |||||
This option does not only impact the currently shown output above but all others as well. Therefore the plural displays/outputs would be more correct than a singular "display". Also a question is if we want to call it display, output, screen or monitor in user facing texts and then do it everywhere like this. I assume there are pros and cons for all of these nouns. romangg: This option does not only impact the currently shown output above but all others as well. | |||||
"Output" is a bit too technical I think, and"Monitor" doesn't cover the case of projectors. Personally I like "Display" but I'm open to being convinced otherwise. ngraham: "Output" is a bit too technical I think, and"Monitor" doesn't cover the case of projectors. | |||||
GB_2: +1 for display | |||||
110 | Kirigami.FormData.buddyFor: globalRetentionRadio | 91 | Kirigami.FormData.buddyFor: globalRetentionRadio | ||
111 | spacing: Kirigami.Units.smallSpacing | 92 | spacing: Kirigami.Units.smallSpacing | ||
112 | 93 | | |||
113 | Controls.RadioButton { | 94 | Controls.RadioButton { | ||
114 | id: globalRetentionRadio | 95 | id: globalRetentionRadio | ||
115 | text: i18n("For this and other combination of outputs") | 96 | text: i18n("For any setup") | ||
GB_2: "For any setup" | |||||
116 | checked: !individualRetentionRadio.checked | 97 | checked: !individualRetentionRadio.checked | ||
117 | onClicked: kcm.outputRetention = KScreen.Control.Global | 98 | onClicked: kcm.outputRetention = KScreen.Control.Global | ||
118 | } | 99 | } | ||
119 | 100 | | |||
120 | Controls.RadioButton { | 101 | Controls.RadioButton { | ||
121 | id: individualRetentionRadio | 102 | id: individualRetentionRadio | ||
122 | text: i18n("For this specific setup independently of others") | 103 | text: i18n("For only this specific setup") | ||
GB_2: "Only for this specific setup" | |||||
123 | checked: kcm.outputRetention === KScreen.Control.Individual | 104 | checked: kcm.outputRetention === KScreen.Control.Individual | ||
124 | onClicked: kcm.outputRetention = KScreen.Control.Individual | 105 | onClicked: kcm.outputRetention = KScreen.Control.Individual | ||
125 | } | 106 | } | ||
126 | } | 107 | } | ||
127 | } | 108 | } | ||
128 | } | 109 | } |
visible: count > 1