Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/lockscreen/LockScreenUi.qml
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | 119 | Component.onCompleted: { | |||
---|---|---|---|---|---|
120 | users.append({name: kscreenlocker_userName, | 120 | users.append({name: kscreenlocker_userName, | ||
121 | realName: kscreenlocker_userName, | 121 | realName: kscreenlocker_userName, | ||
122 | icon: kscreenlocker_userImage, | 122 | icon: kscreenlocker_userImage, | ||
123 | 123 | | |||
124 | }) | 124 | }) | ||
125 | } | 125 | } | ||
126 | } | 126 | } | ||
127 | 127 | | |||
128 | ColumnLayout { | ||||
mart: I would prefer not to have this layout, or can be also tried alternatively, just a Column… | |||||
129 | anchors.fill: parent | ||||
128 | StackView { | 130 | StackView { | ||
129 | id: mainStack | 131 | id: mainStack | ||
130 | anchors.fill: parent | 132 | Layout.fillWidth: true | ||
133 | Layout.fillHeight: true | ||||
131 | focus: true //StackView is an implicit focus scope, so we need to give this focus so the item inside will have it | 134 | focus: true //StackView is an implicit focus scope, so we need to give this focus so the item inside will have it | ||
132 | 135 | | |||
133 | initialItem: MainBlock { | 136 | initialItem: MainBlock { | ||
134 | id: mainBlock | 137 | id: mainBlock | ||
135 | 138 | | |||
136 | Stack.onStatusChanged: { | 139 | Stack.onStatusChanged: { | ||
137 | // prepare for presenting again to the user | 140 | // prepare for presenting again to the user | ||
138 | if (Stack.status == Stack.Activating) { | 141 | if (Stack.status == Stack.Activating) { | ||
Show All 32 Lines | |||||
171 | Loader { | 174 | Loader { | ||
172 | Layout.fillWidth: true | 175 | Layout.fillWidth: true | ||
173 | Layout.preferredHeight: item ? item.implicitHeight : 0 | 176 | Layout.preferredHeight: item ? item.implicitHeight : 0 | ||
174 | active: true // TODO configurable | 177 | active: true // TODO configurable | ||
175 | source: "MediaControls.qml" | 178 | source: "MediaControls.qml" | ||
176 | } | 179 | } | ||
177 | } | 180 | } | ||
178 | } | 181 | } | ||
182 | Loader { | ||||
183 | id: inputPanel | ||||
184 | property bool keyboardActive: item ? item.active : false | ||||
185 | Layout.fillWidth: true | ||||
186 | Layout.preferredHeight: item ? (item.active ? item.implicitHeight : 0) : 0 | ||||
187 | function showHide() { | ||||
188 | if (!inputPanel.item) { | ||||
189 | inputPanel.source = "VirtualKeyboard.qml" | ||||
190 | } else { | ||||
191 | item.active = !item.active | ||||
192 | } | ||||
193 | } | ||||
194 | Component.onCompleted: inputPanel.source = "VirtualKeyboard.qml" | ||||
195 | } | ||||
196 | } | ||||
179 | 197 | | |||
180 | Component { | 198 | Component { | ||
181 | id: switchSessionPage | 199 | id: switchSessionPage | ||
182 | SessionManagementScreen { | 200 | SessionManagementScreen { | ||
183 | property var switchSession: finalSwitchSession | 201 | property var switchSession: finalSwitchSession | ||
184 | 202 | | |||
185 | Stack.onStatusChanged: { | 203 | Stack.onStatusChanged: { | ||
186 | if (Stack.status == Stack.Activating) { | 204 | if (Stack.status == Stack.Activating) { | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 255 | RowLayout { | |||
238 | id: footer | 256 | id: footer | ||
239 | anchors { | 257 | anchors { | ||
240 | bottom: parent.bottom | 258 | bottom: parent.bottom | ||
241 | left: parent.left | 259 | left: parent.left | ||
242 | right: parent.right | 260 | right: parent.right | ||
243 | margins: units.smallSpacing | 261 | margins: units.smallSpacing | ||
244 | } | 262 | } | ||
245 | 263 | | |||
264 | PlasmaComponents.ToolButton { | ||||
265 | text: i18ndc("plasma_lookandfeel_org.kde.lookandfeel", "Button to show/hide virtual keyboard", "Virtual Keyboard") | ||||
266 | iconName: inputPanel.keyboardActive ? "input-keyboard-virtual-on" : "input-keyboard-virtual-off" | ||||
267 | onClicked: inputPanel.showHide() | ||||
268 | } | ||||
269 | | ||||
246 | KeyboardLayoutButton { | 270 | KeyboardLayoutButton { | ||
247 | } | 271 | } | ||
248 | 272 | | |||
249 | Item { | 273 | Item { | ||
250 | Layout.fillWidth: true | 274 | Layout.fillWidth: true | ||
251 | } | 275 | } | ||
252 | 276 | | |||
253 | Battery {} | 277 | 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