Changeset View
Changeset View
Standalone View
Standalone View
kcm/package/contents/ui/main.qml
Show All 18 Lines | |||||
19 | import QtQuick.Controls 2.3 as Controls | 19 | import QtQuick.Controls 2.3 as Controls | ||
20 | import org.kde.kirigami 2.4 as Kirigami | 20 | import org.kde.kirigami 2.4 as Kirigami | ||
21 | 21 | | |||
22 | import org.kde.kcm 1.2 as KCM | 22 | import org.kde.kcm 1.2 as KCM | ||
23 | 23 | | |||
24 | KCM.SimpleKCM { | 24 | KCM.SimpleKCM { | ||
25 | id: root | 25 | id: root | ||
26 | 26 | | |||
27 | implicitWidth: units.gridUnit * 40 | 27 | implicitWidth: units.gridUnit * 30 | ||
28 | implicitHeight: units.gridUnit * 50 | 28 | implicitHeight: units.gridUnit * 34 | ||
29 | 29 | | |||
30 | property int selectedOutput: 0 | 30 | property int selectedOutput: 0 | ||
31 | 31 | | |||
32 | ColumnLayout { | 32 | ColumnLayout { | ||
33 | id: mainLayout | ||||
33 | Kirigami.InlineMessage { | 34 | Kirigami.InlineMessage { | ||
34 | // Note1: There is an implicit height binding loop error on | 35 | // Note1: There is an implicit height binding loop error on | ||
35 | // first invokation. Seems to be an issue in Kirigami. | 36 | // first invokation. Seems to be an issue in Kirigami. | ||
36 | // Note2: This should maybe go in header component of the KCM, | 37 | // Note2: This should maybe go in header component of the KCM, | ||
37 | // but there seems to be another issue in Kirigami then | 38 | // but there seems to be another issue in Kirigami then | ||
38 | // being always hidden. Compare Night Color KCM with | 39 | // being always hidden. Compare Night Color KCM with | ||
39 | // the same issue. | 40 | // the same issue. | ||
40 | id: dangerousSaveMsg | 41 | id: dangerousSaveMsg | ||
▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 110 | onChanged: { | |||
111 | errSaveMsg.visible = false; | 112 | errSaveMsg.visible = false; | ||
112 | scaleMsg.visible = false; | 113 | scaleMsg.visible = false; | ||
113 | } | 114 | } | ||
114 | } | 115 | } | ||
115 | 116 | | |||
116 | Screen { | 117 | Screen { | ||
117 | id: screen | 118 | id: screen | ||
118 | Layout.fillWidth: true | 119 | Layout.fillWidth: true | ||
120 | Layout.margins: Kirigami.Units.largeSpacing | ||||
119 | enabled: kcm.outputModel && !kcm.backendError | 121 | enabled: kcm.outputModel && !kcm.backendError | ||
120 | outputs: kcm.outputModel | 122 | outputs: kcm.outputModel | ||
123 | // visible: kcm.numberOfOutputs > 1 // FIXME: this is -1 here; does it get set too late? | ||||
ngraham: And I could use some help with the issue detailed in the comment here. | |||||
You don't need any of that. Just do kcm.outputModel.count > 1. BTW, I'd also use a different minimum height if this component is hidden. GB_2: You don't need any of that. Just do `kcm.outputModel.count > 1`. BTW, I'd also use a different… | |||||
GB_2: Or even better: `outputs.count > 1` | |||||
121 | } | 124 | } | ||
122 | 125 | | |||
123 | Panel { | 126 | Panel { | ||
124 | enabled: kcm.outputModel && !kcm.backendError | 127 | enabled: kcm.outputModel && !kcm.backendError | ||
125 | Layout.fillWidth: true | 128 | Layout.fillWidth: true | ||
126 | } | 129 | } | ||
127 | } | 130 | } | ||
128 | } | 131 | } |
And I could use some help with the issue detailed in the comment here.