Changeset View
Changeset View
Standalone View
Standalone View
applets/weather/package/contents/ui/config/ConfigAppearance.qml
Show All 14 Lines | |||||
15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | import QtQuick 2.0 | 18 | import QtQuick 2.0 | ||
19 | import QtQuick.Controls 1.4 as QtControls1 | 19 | import QtQuick.Controls 1.4 as QtControls1 | ||
20 | import QtQuick.Controls 2.2 as QtControls | 20 | import QtQuick.Controls 2.2 as QtControls | ||
21 | import QtQuick.Layouts 1.3 | 21 | import QtQuick.Layouts 1.3 | ||
22 | 22 | | |||
23 | import org.kde.kirigami 2.4 as Kirigami | ||||
24 | | ||||
23 | import org.kde.plasma.private.weather 1.0 | 25 | import org.kde.plasma.private.weather 1.0 | ||
24 | 26 | | |||
25 | 27 | | |||
26 | ColumnLayout { | 28 | ColumnLayout { | ||
27 | id: displayConfigPage | 29 | id: displayConfigPage | ||
28 | 30 | | |||
29 | readonly property bool canShowMoreInCompactMode: !plasmoid.nativeInterface.needsToBeSquare | 31 | readonly property bool canShowMoreInCompactMode: !plasmoid.nativeInterface.needsToBeSquare | ||
30 | 32 | | |||
Show All 27 Lines | |||||
58 | 60 | | |||
59 | QtControls1.GroupBox { | 61 | QtControls1.GroupBox { | ||
60 | Layout.fillWidth: true | 62 | Layout.fillWidth: true | ||
61 | flat: true | 63 | flat: true | ||
62 | 64 | | |||
63 | title: i18nc("@title:group", "Compact Mode") | 65 | title: i18nc("@title:group", "Compact Mode") | ||
64 | 66 | | |||
65 | GridLayout { | 67 | GridLayout { | ||
66 | columns: 2 | 68 | anchors.fill: parent | ||
69 | columns: 3 | ||||
67 | 70 | | |||
68 | QtControls.Label { | 71 | QtControls.Label { | ||
69 | Layout.row: 0 | 72 | Layout.row: 0 | ||
70 | Layout.column: 0 | 73 | Layout.column: 0 | ||
71 | Layout.alignment: Qt.AlignRight | 74 | Layout.alignment: Qt.AlignRight | ||
72 | enabled: canShowMoreInCompactMode | 75 | enabled: canShowMoreInCompactMode | ||
73 | text: i18nc("@label", "Display:") | 76 | text: i18nc("@label", "Display:") | ||
74 | } | 77 | } | ||
75 | 78 | | |||
76 | QtControls.CheckBox { | 79 | QtControls.CheckBox { | ||
77 | id: showTemperatureInCompactModeCheckBox | 80 | id: showTemperatureInCompactModeCheckBox | ||
78 | 81 | | |||
79 | Layout.row: 0 | 82 | Layout.row: 0 | ||
80 | Layout.column: 1 | 83 | Layout.column: 1 | ||
84 | Layout.fillWidth: true | ||||
81 | enabled: canShowMoreInCompactMode | 85 | enabled: canShowMoreInCompactMode | ||
82 | 86 | | |||
83 | text: i18nc("@option:check", "Show temperature") | 87 | text: i18nc("@option:check", "Show temperature") | ||
84 | onCheckedChanged: displayConfigPage.configurationChanged(); | 88 | onCheckedChanged: displayConfigPage.configurationChanged(); | ||
85 | } | 89 | } | ||
86 | 90 | | |||
87 | QtControls.Label { | 91 | Kirigami.InlineMessage { | ||
88 | Layout.row: 1 | 92 | Layout.row: 1 | ||
89 | Layout.column: 0 | 93 | Layout.column: 0 | ||
94 | Layout.columnSpan: 3 | ||||
95 | Layout.fillWidth: true | ||||
96 | | ||||
97 | type: Kirigami.MessageType.Information | ||||
98 | text: i18nc("@info", "Displaying also the temperature is not available if the widget is used in containers where the size is constrained, like the system tray.") | ||||
99 | visible: !canShowMoreInCompactMode | ||||
100 | } | ||||
101 | | ||||
102 | QtControls.Label { | ||||
103 | Layout.row: 2 | ||||
104 | Layout.column: 0 | ||||
90 | Layout.alignment: Qt.AlignRight | 105 | Layout.alignment: Qt.AlignRight | ||
91 | text: i18nc("@label", "Tooltip:") | 106 | text: i18nc("@label", "Tooltip:") | ||
92 | } | 107 | } | ||
93 | 108 | | |||
94 | QtControls.CheckBox { | 109 | QtControls.CheckBox { | ||
95 | id: showTemperatureInTooltipCheckBox | 110 | id: showTemperatureInTooltipCheckBox | ||
96 | 111 | | |||
97 | Layout.row: 1 | 112 | Layout.row: 2 | ||
98 | Layout.column: 1 | 113 | Layout.column: 1 | ||
99 | 114 | | |||
100 | text: i18nc("@option:check", "Show temperature") | 115 | text: i18nc("@option:check", "Show temperature") | ||
101 | onCheckedChanged: displayConfigPage.configurationChanged(); | 116 | onCheckedChanged: displayConfigPage.configurationChanged(); | ||
102 | } | 117 | } | ||
103 | 118 | | |||
104 | QtControls.CheckBox { | 119 | QtControls.CheckBox { | ||
105 | id: showWindInTooltipCheckBox | 120 | id: showWindInTooltipCheckBox | ||
106 | 121 | | |||
107 | Layout.row: 2 | 122 | Layout.row: 3 | ||
108 | Layout.column: 1 | 123 | Layout.column: 1 | ||
109 | 124 | | |||
110 | text: i18nc("@option:check", "Show wind") | 125 | text: i18nc("@option:check", "Show wind") | ||
111 | onCheckedChanged: displayConfigPage.configurationChanged(); | 126 | onCheckedChanged: displayConfigPage.configurationChanged(); | ||
112 | } | 127 | } | ||
113 | 128 | | |||
114 | QtControls.CheckBox { | 129 | QtControls.CheckBox { | ||
115 | id: showPressureInTooltipCheckBox | 130 | id: showPressureInTooltipCheckBox | ||
116 | 131 | | |||
117 | Layout.row: 3 | 132 | Layout.row: 4 | ||
118 | Layout.column: 1 | 133 | Layout.column: 1 | ||
119 | 134 | | |||
120 | text: i18nc("@option:check", "Show pressure") | 135 | text: i18nc("@option:check", "Show pressure") | ||
121 | onCheckedChanged: displayConfigPage.configurationChanged(); | 136 | onCheckedChanged: displayConfigPage.configurationChanged(); | ||
122 | } | 137 | } | ||
123 | 138 | | |||
124 | QtControls.CheckBox { | 139 | QtControls.CheckBox { | ||
125 | id: showHumidityInTooltipCheckBox | 140 | id: showHumidityInTooltipCheckBox | ||
126 | 141 | | |||
127 | Layout.row: 4 | 142 | Layout.row: 5 | ||
128 | Layout.column: 1 | 143 | Layout.column: 1 | ||
129 | 144 | | |||
130 | text: i18nc("@option:check", "Show humidity") | 145 | text: i18nc("@option:check", "Show humidity") | ||
131 | onCheckedChanged: displayConfigPage.configurationChanged(); | 146 | onCheckedChanged: displayConfigPage.configurationChanged(); | ||
132 | } | 147 | } | ||
148 | | ||||
149 | Item { // tighten layout of labels and checkboxes | ||||
150 | Layout.row: 0 | ||||
151 | Layout.column: 2 | ||||
152 | Layout.fillWidth: true | ||||
153 | } | ||||
133 | } | 154 | } | ||
134 | } | 155 | } | ||
135 | 156 | | |||
136 | Item { // tighten layout | 157 | Item { // tighten layout | ||
137 | Layout.fillHeight: true | 158 | Layout.fillHeight: true | ||
138 | } | 159 | } | ||
139 | } | 160 | } |