Bug 353584 - Keyboard layout switch button in the lockscreen is tiny and its text overflows
Summary: Keyboard layout switch button in the lockscreen is tiny and its text overflows
Status: RESOLVED FIXED
Alias: None
Product: ksmserver
Classification: Plasma
Component: lockscreen (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-06 01:03 UTC by Jan Kundrát
Modified: 2015-12-02 14:19 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Photo of wrong text wrap (1.66 MB, image/jpeg)
2015-10-18 10:51 UTC, blackredprince
Details
Missing keyboard layout at all (1.07 MB, image/png)
2015-10-29 08:38 UTC, Kiril Vladimirov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kundrát 2015-10-06 01:03:27 UTC
I've updated from a git snapshot from during Akademy to whatever was current in master of all of KF5, Qt 5.5 and plasma5. Even after reboot, the button for switching keyboard layouts (left of the password input field) is now too narrow, the width looks as if it could only accommodate one letter. The text is barely visible, stuff is shown, but the text overflows to the empty space with colorful background.

Reproducible: Always
Comment 1 blackredprince 2015-10-18 10:51:47 UTC
Created attachment 95027 [details]
Photo of wrong text wrap
Comment 2 David Edmundson 2015-10-18 14:43:05 UTC
Oh wow, that's bad. 

Will fix, thanks
Comment 3 David Edmundson 2015-10-19 10:31:02 UTC
Git commit 1a4c1d7eebcf1e901b3109b26bae70c56a80f0d2 by David Edmundson.
Committed on 19/10/2015 at 10:30.
Pushed by davidedmundson into branch 'master'.

Fix Button minimumWidth property

Plasma's Button has an extra property "minimumWidth" which is an extra
hint not in QQC to say "what is the size to exactly fit the contents".

(it's a bit confusing, as we can perfectly handle a button below it's
"minmimum" size)

This should be based on the size the contents want to be (the
implicitWidth), not how small the contents can go (which with is pretty
meaningless when our button can elide)

It got broken at some point recently.
Change-Id: I637898c3abf98183bbae30d8f15c4d72801a3650
REVIEW: 125698

M  +3    -2    src/declarativeimports/plasmastyle/ButtonStyle.qml
M  +12   -1    tests/components/button.qml

http://commits.kde.org/plasma-framework/1a4c1d7eebcf1e901b3109b26bae70c56a80f0d2
Comment 4 Kiril Vladimirov 2015-10-29 08:38:43 UTC
On my machine I can see that the layout switch button in the lockscreen is too tiny, too, but before I click it I see no layout whatsoever.

So, when I go to the lockscreen I simply see the empty button without knowing which is the current layout (see attached file). After I actually click it I get the same result as  Jan Kundrát. As far as I can see you're fixing the minimum width of this button, but could it be that the actual issue is a fail in retrieval the current keyboard layout initially when starting the lockscreen?

I'm not sure how/when this is possible, because I've never succeeded when trying to make `qdbus org.kde.keyboard /Layouts org.kde.KeyboardLayouts.getCurrentLayout` fail, however.

I will not re-open that one, because I'm not sure if my assumption is correct. Can you try it first?
Comment 5 Kiril Vladimirov 2015-10-29 08:38:47 UTC
Created attachment 95201 [details]
Missing keyboard layout at all
Comment 6 Martin Kostolný 2015-11-08 15:11:22 UTC
@Kiril: I have exactly the same issue you are having. After applying the above patch all is fine again, the button is not empty anymore.
Comment 7 David Edmundson 2015-12-02 14:19:21 UTC
*** Bug 356021 has been marked as a duplicate of this bug. ***