Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/lockscreen/LockScreenUi.qml
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | 126 | Component.onCompleted: { | |||
---|---|---|---|---|---|
127 | users.append({name: kscreenlocker_userName, | 127 | users.append({name: kscreenlocker_userName, | ||
128 | realName: kscreenlocker_userName, | 128 | realName: kscreenlocker_userName, | ||
129 | icon: kscreenlocker_userImage, | 129 | icon: kscreenlocker_userImage, | ||
130 | 130 | | |||
131 | }) | 131 | }) | ||
132 | } | 132 | } | ||
133 | } | 133 | } | ||
134 | 134 | | |||
135 | ColumnLayout { | ||||
mart: I would prefer not to have this layout, or can be also tried alternatively, just a Column… | |||||
136 | anchors.fill: parent | ||||
135 | StackView { | 137 | StackView { | ||
136 | id: mainStack | 138 | id: mainStack | ||
137 | anchors.fill: parent | 139 | Layout.fillWidth: true | ||
140 | Layout.fillHeight: true | ||||
138 | focus: true //StackView is an implicit focus scope, so we need to give this focus so the item inside will have it | 141 | focus: true //StackView is an implicit focus scope, so we need to give this focus so the item inside will have it | ||
139 | 142 | | |||
140 | initialItem: MainBlock { | 143 | initialItem: MainBlock { | ||
141 | id: mainBlock | 144 | id: mainBlock | ||
142 | 145 | | |||
143 | Stack.onStatusChanged: { | 146 | Stack.onStatusChanged: { | ||
144 | // prepare for presenting again to the user | 147 | // prepare for presenting again to the user | ||
145 | if (Stack.status == Stack.Activating) { | 148 | if (Stack.status == Stack.Activating) { | ||
Show All 32 Lines | |||||
178 | Loader { | 181 | Loader { | ||
179 | Layout.fillWidth: true | 182 | Layout.fillWidth: true | ||
180 | Layout.preferredHeight: item ? item.implicitHeight : 0 | 183 | Layout.preferredHeight: item ? item.implicitHeight : 0 | ||
181 | active: true // TODO configurable | 184 | active: true // TODO configurable | ||
182 | source: "MediaControls.qml" | 185 | source: "MediaControls.qml" | ||
183 | } | 186 | } | ||
184 | } | 187 | } | ||
185 | } | 188 | } | ||
189 | Loader { | ||||
190 | id: inputPanel | ||||
191 | property bool keyboardActive: item ? item.active : false | ||||
192 | Layout.fillWidth: true | ||||
193 | Layout.preferredHeight: item ? (item.active ? item.implicitHeight : 0) : 0 | ||||
194 | function showHide() { | ||||
195 | if (Qt.inputMethod.visible) { | ||||
196 | Qt.inputMethod.hide(); | ||||
197 | } else { | ||||
198 | item.activated = true; | ||||
199 | Qt.inputMethod.show(); | ||||
200 | } | ||||
201 | } | ||||
202 | Component.onCompleted: inputPanel.source = "VirtualKeyboard.qml" | ||||
203 | } | ||||
204 | } | ||||
186 | 205 | | |||
187 | Component { | 206 | Component { | ||
188 | id: switchSessionPage | 207 | id: switchSessionPage | ||
189 | SessionManagementScreen { | 208 | SessionManagementScreen { | ||
190 | property var switchSession: finalSwitchSession | 209 | property var switchSession: finalSwitchSession | ||
191 | 210 | | |||
192 | Stack.onStatusChanged: { | 211 | Stack.onStatusChanged: { | ||
193 | if (Stack.status == Stack.Activating) { | 212 | if (Stack.status == Stack.Activating) { | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 263 | RowLayout { | |||
245 | id: footer | 264 | id: footer | ||
246 | anchors { | 265 | anchors { | ||
247 | bottom: parent.bottom | 266 | bottom: parent.bottom | ||
248 | left: parent.left | 267 | left: parent.left | ||
249 | right: parent.right | 268 | right: parent.right | ||
250 | margins: units.smallSpacing | 269 | margins: units.smallSpacing | ||
251 | } | 270 | } | ||
252 | 271 | | |||
272 | PlasmaComponents.ToolButton { | ||||
273 | text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to show/hide virtual keyboard", "Virtual Keyboard") | ||||
274 | iconName: inputPanel.keyboardActive ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off" | ||||
275 | onClicked: inputPanel.showHide() | ||||
276 | } | ||||
277 | | ||||
253 | KeyboardLayoutButton { | 278 | KeyboardLayoutButton { | ||
254 | } | 279 | } | ||
255 | 280 | | |||
256 | Item { | 281 | Item { | ||
257 | Layout.fillWidth: true | 282 | Layout.fillWidth: true | ||
258 | } | 283 | } | ||
259 | 284 | | |||
260 | Battery {} | 285 | Battery {} | ||
Show All 11 Lines |
I would prefer not to have this layout, or can be also tried alternatively, just a Column (which doesn't resize its children)
i would add a state machine there that distinguish between visible and hidden keyboard, when visible, the whole area slides up (will have a negative y) and with a transition animation