This partially reverts commit d2bb480706.
Something unhealthy is going on with that lastIndex that prevents it
from functioning normally when currentIndex is bound to it from the
beginning. Maybe it just needs an on*Changed() signal, so that the
instantiator has already created its objects by that time? Session button
is different from keyboard layouts button which uses pre-baked QList as
its model.
Component.onCompleted blocks were unnecessary and redundant.
This patch also cleans up QML code style, and swaps visible/text lines to
make both buttons code more similar.
This is a stripped down version of customizable demo available at my
invent repo[1]. It is optimized for this particular use-case. Animation
honors right-to-left application layout and "instant animation speed"
preference.
[1]: https://invent.kde.org/ratijas/reject-input-animation/
Because why not; and also because it makes for a nice flow when user
does not have a password set: just press Enter (twice, if focused on a
user list).
It was lost during refactoring some time ago, but the intention was
to give focus to the next item in focus chain assuming that's either a
username or a password field.
This patch is a less flexible but also less messy and more direct way to
achieve practically the same thing. Additionally, explicit Tab focus
reason gives a loginButton a nice visual focus which one would expect
to see instead of no visual changes. It was tempting to directly call
startLogin when password is not required, but that would be surprising
when the signal itself is triggered by the Escape key.
CCBUG: 336368
It used to cause an error like this:
[03:21:31.246] (WW) GREETER: file:///usr/share/sddm/themes/breeze/KeyboardButton.qml:19: TypeError: Cannot read property 'shortName' of null
We already force focus to the password field after showing or hiding the
virtual keyboard, since otherwise it's annoying and you have to manually
re-focus it. Let's do the same for the session and keyboard layout
choosers to save the user a click and some annoyance.
BUG: 451361
FIXED-IN: 5.25
Right now we change the intensity of shadows based on the color scheme's
text color, but with a property called "lightBackground". This indicates
that we wanted to do it based on the background color itself, but did
not or could not, so settled on using the text color as a proxy. However
this is wrong; there is no relationship between the active color
scheme's text color and the color of the background image.
Even if we could or did fix that, it would probably still be wrong,
because using lighter shadows on a genuinely light background would
result in worse contrast and readability, especially if the light
background was very visually busy.
For these reasons, in most other places, we have since settled on the
mantra of "shadows should be black", and this commit makes the lock and
login screens follow that convention as well.
BUG: 449985
FIXED-IN: 5.24.2
The Plasma 5.24 wallpaper changed to a JPEG but this change had to be
reflected in the SDDM config file, which calls out the wallpaper by its
exact file path. This commit does that.
On this page there is no concept of the user being passwordless because
no username has been specified by the user yet; we cannot know ahead of
time. As a result, userList.currentItem.needsPassword is blank so the
password field gets hidden.
We should just assume that in username/password entry mode, all users
have a password set. For any users where this is not the case, they can
just leave the password blank, and it's not any worse than it was in
Plasma 5.22.
BUG: 443737
FIXED-IN: 5.23.1
The UserDelegate has no "m" member (anymore?) and thus that was always
undefined. Expose it through a property instead.
Additionally, reset the login button's preferred width by setting it to -1.
"undefined" is not a valid value for the Layout property.
This reverts commit 2e4b1e1f2d.
That commit was too broad in scope and changed the sizes of more pieces
of text than were needed to fix Bug 442650. It is fixed correctly in
this commit.
CCBUG: 442650
As described here https://github.com/sddm/sddm/issues/751#issuecomment-847347450
SDDM provides the `needsPassword` property, which can be used to hide the
password prompt for passwordless accounts.
This merge request provides a basic implementation for the breeze SDDM theme.
The shadows can look rather harsh against light backgrounds; this commit
softens them a little bitty bit to reduce that effect, while still
preserving adequate contrast to keep the text readable.
BUG: 436247
FIXED-IN: 5.22
The context property version is slower to access and won't be supported
in Qt6. Let's port away from it and use the singleton version instead.
Here was my full process for making this change:
1. Made the change with `find . -name '*.qml' | xargs perl -pi -e 's/units\./PlasmaCore\.Units\./g'`
2. Verified no more occurrences with `grep -r " units."`
3. Made sure this didn't change any comments in a silly way by inspecting the output of `git diff | grep "+ " | grep "//"`
4. Manually inspected the full git diff to make sure there were no other unintentional or silly changes (there were none)
5. verified that all changed files have the PlasmaCore import with the correct name with `for FILE in `git status | grep modified | cut -d ":" -f 3`; do grep -q "as PlasmaCore" $FILE || echo "$FILE needs the PlasmaCore import"; done`