Changeset View
Changeset View
Standalone View
Standalone View
applets/batterymonitor/package/contents/ui/PopupDialog.qml
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 41 | Component.onCompleted: { | |||
---|---|---|---|---|---|
48 | keyboardBrightnessSlider.valueChanged.connect(function() { | 48 | keyboardBrightnessSlider.valueChanged.connect(function() { | ||
49 | batterymonitor.keyboardBrightness = keyboardBrightnessSlider.value | 49 | batterymonitor.keyboardBrightness = keyboardBrightnessSlider.value | ||
50 | }) | 50 | }) | ||
51 | } | 51 | } | ||
52 | 52 | | |||
53 | Column { | 53 | Column { | ||
54 | id: settingsColumn | 54 | id: settingsColumn | ||
55 | anchors.horizontalCenter: parent.horizontalCenter | 55 | anchors.horizontalCenter: parent.horizontalCenter | ||
56 | width: parent.width - units.gridUnit | 56 | width: parent.width - units.smallSpacing * 2 | ||
57 | spacing: Math.round(units.gridUnit / 2) | 57 | spacing: units.gridUnit | ||
58 | 58 | | |||
59 | Components.Label { | 59 | Components.Label { | ||
60 | // this is just for metrics, TODO use TextMetrics in 5.4 instead | 60 | // this is just for metrics, TODO use TextMetrics in 5.4 instead | ||
61 | id: percentageMeasurementLabel | 61 | id: percentageMeasurementLabel | ||
62 | text: i18nc("Used for measurement", "100%") | 62 | text: i18nc("Used for measurement", "100%") | ||
63 | visible: false | 63 | visible: false | ||
64 | } | 64 | } | ||
65 | 65 | | |||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 93 | BrightnessItem { | |||
109 | } | 109 | } | ||
110 | } | 110 | } | ||
111 | } | 111 | } | ||
112 | 112 | | |||
113 | PlasmaExtras.ScrollArea { | 113 | PlasmaExtras.ScrollArea { | ||
114 | anchors { | 114 | anchors { | ||
115 | horizontalCenter: parent.horizontalCenter | 115 | horizontalCenter: parent.horizontalCenter | ||
116 | top: settingsColumn.bottom | 116 | top: settingsColumn.bottom | ||
117 | topMargin: units.gridUnit // not divided by 2 for unified looks | 117 | topMargin: units.gridUnit | ||
118 | leftMargin: units.smallSpacing | ||||
118 | bottom: dialog.bottom | 119 | bottom: dialog.bottom | ||
119 | } | 120 | } | ||
120 | width: parent.width - units.gridUnit | 121 | width: parent.width - units.smallSpacing * 2 | ||
121 | 122 | | |||
122 | ListView { | 123 | ListView { | ||
123 | id: batteryList | 124 | id: batteryList | ||
124 | 125 | | |||
125 | boundsBehavior: Flickable.StopAtBounds | 126 | boundsBehavior: Flickable.StopAtBounds | ||
126 | spacing: Math.round(units.gridUnit / 2) | 127 | spacing: Math.round(units.smallSpacing / 2) | ||
127 | 128 | | |||
128 | KeyNavigation.tab: brightnessSlider | 129 | KeyNavigation.tab: brightnessSlider | ||
129 | KeyNavigation.backtab: pmSwitch | 130 | KeyNavigation.backtab: pmSwitch | ||
130 | 131 | | |||
131 | delegate: BatteryItem { | 132 | delegate: BatteryItem { | ||
132 | width: parent.width | 133 | width: parent.width | ||
133 | battery: model | 134 | battery: model | ||
134 | } | 135 | } | ||
135 | } | 136 | } | ||
136 | } | 137 | } | ||
137 | 138 | | |||
138 | } | 139 | } |