Changeset View
Changeset View
Standalone View
Standalone View
sddm-theme/Main.qml
Show First 20 Lines • Show All 403 Lines • ▼ Show 20 Line(s) | 402 | ActionButton { | |||
---|---|---|---|---|---|
404 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","List Users") | 404 | text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","List Users") | ||
405 | onClicked: mainStack.pop() | 405 | onClicked: mainStack.pop() | ||
406 | visible: !inputPanel.keyboardActive | 406 | visible: !inputPanel.keyboardActive | ||
407 | } | 407 | } | ||
408 | ] | 408 | ] | ||
409 | } | 409 | } | ||
410 | } | 410 | } | ||
411 | 411 | | |||
412 | Image { | ||||
413 | id: logo | ||||
414 | visible: config.showdistrologo == "shown" | ||||
broulik: Why not just a bool? | |||||
cblack: the config object exposes `true` as `"true"`, not `true`, so ¯\_(ツ)_/¯ | |||||
415 | source: config.distrologo | ||||
broulik: Also set a `sourceSize` and probably `asynchronous: true` | |||||
cblack: I haven't a clue what I should set `sourceSize` to ¯\_(ツ)_/¯ | |||||
to the height and width of the item I believe, at least that's what I did here: https://github.com/KDE/sddm-kcm/blob/master/src/qml/main.qml#L54 filipf: to the height and width of the item I believe, at least that's what I did here: https://github. | |||||
I don't really have a defined width, but I guess I could define the height cblack: I don't really have a defined width, but I guess I could define the height | |||||
You'll notice that in my example I didn't have height defined, but the sourceSize code should still work because the fillMode magic does set some definitive width. filipf: You'll notice that in my example I didn't have height defined, but the `sourceSize `code should… | |||||
416 | anchors.horizontalCenter: parent.horizontalCenter | ||||
417 | anchors.bottom: footer.top | ||||
418 | anchors.bottomMargin: units.largeSpacing | ||||
419 | opacity: loginScreenRoot.uiVisible ? 0 : 1 | ||||
420 | fillMode: Image.PreserveAspectFit | ||||
421 | height: units.largeSpacing * 8 | ||||
broulik: This is not what `spacing` is supposed to be used for. Try `units.gridUnit` | |||||
filipf: try implicitWidth to avoid binding loop | |||||
davidedmundson: Just remove sourceSize.width
We dont define a width.
| |||||
422 | Behavior on opacity { | ||||
423 | NumberAnimation { | ||||
davidedmundson: OpacityAnimator is better where possible
| |||||
424 | duration: units.longDuration | ||||
Match the duration for other opacity animation effects (i.e. use units.longDuration) ngraham: Match the duration for other opacity animation effects (i.e. use `units.longDuration`) | |||||
filipf: units.gridUnit is larger than units.largeSpacing, you can't keep 8 as the multiplier… | |||||
425 | easing.type: Easing.InOutQuad | ||||
426 | } | ||||
427 | } | ||||
428 | } | ||||
429 | | ||||
430 | DropShadow { | ||||
431 | id: logoShadow | ||||
432 | anchors.fill: logo | ||||
433 | source: logo | ||||
434 | visible: !softwareRendering && config.showdistrologo == "shown" | ||||
435 | horizontalOffset: 1 | ||||
436 | verticalOffset: 1 | ||||
437 | radius: 6 | ||||
438 | samples: 14 | ||||
439 | spread: 0.3 | ||||
440 | color: "black" // matches Breeze window decoration and desktopcontainment | ||||
441 | opacity: loginScreenRoot.uiVisible ? 0 : 1 | ||||
442 | Behavior on opacity { | ||||
443 | NumberAnimation { | ||||
444 | duration: units.longDuration | ||||
ngraham: ditto | |||||
445 | easing.type: Easing.InOutQuad | ||||
446 | } | ||||
447 | } | ||||
448 | } | ||||
449 | | ||||
412 | //Footer | 450 | //Footer | ||
413 | RowLayout { | 451 | RowLayout { | ||
414 | id: footer | 452 | id: footer | ||
415 | anchors { | 453 | anchors { | ||
416 | bottom: parent.bottom | 454 | bottom: parent.bottom | ||
417 | left: parent.left | 455 | left: parent.left | ||
418 | right: parent.right | 456 | right: parent.right | ||
419 | margins: units.smallSpacing | 457 | margins: units.smallSpacing | ||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |
Why not just a bool?