Summary: | Lock/Logout icon size changes when only one action is visible | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Yannick Bruneau <yb21com> |
Component: | Lock/logout | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | adam.m.fontenot+kde, farline99, lebedev.ri, nate, yb21com |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/-/commit/2ef898810597cf23218029cfcd1cdbef8061e605 | Version Fixed In: | 6.0 |
Sentry Crash Report: | |||
Attachments: |
5 widgets side-by-side, the first has 3 actions, and the 4 others have each 1 action.
attachment-796518-0.html attachment-879328-0.html |
Description
Yannick Bruneau
2023-09-03 08:48:13 UTC
I've found the issue in the file /usr/share/plasma/plasmoids/org.kde.plasma.lock_logout/contents/ui/lockout.qml. The solution to fix the issue is to remove the " - 1" to the following lines of code : #21 : return height < minButtonSize * visibleButtons ? height * visibleButtons : height / visibleButtons - 1; FIX : return height < minButtonSize * visibleButtons ? height * visibleButtons : height / visibleButtons ; #28 : return width >= minButtonSize * visibleButtons ? width / visibleButtons - 1 : width * visibleButtons FIX : return width >= minButtonSize * visibleButtons ? width / visibleButtons : width * visibleButtons I've only tested the with the top bar with 24px height, and it works fine. I've just added a "default panel" and it appeared to the left edge of the screen. I've tested the existing widget and then the one I've fixed, there is no regression, it works the same : - 1 icon fills the width of the panel - 2 icons fill the width of the panel but they are aside so their sizes are smaller - 3 icons or more, each icon fills the width of the panel and is put above/below the others. Then, I've moved that new panel to the top edge of the screen (the panel is bigger than mine and is above/over it). I've added the existing widget and the one I've fixed, both work the same, no regression : - 1 icon fill the the height of the panel - 2 icons fill the height of the panel, they have smaller icon sizes and 1 icon is above the other. - 3 icons or more, each icon takes all the height and icons are after/before the others. So, the fix works for tiny bars. This looks like a correct fix to me! I wonder why that random -1 was in there to begin with. Would you like to submit a merge request at https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/? Created attachment 161459 [details] attachment-796518-0.html Hi Nate, I'd looked for it the other day, but I don't how to do it and where at. I'd found a kde.org webpage where it says where to go whether we need to declare a bug or want to contribute to an existing project or submit a merge request, etc. My understanding is that we need to have an account, fins the project then fork the project, and have a git repository, ...All that complexity just to change one file !?So I chose to upload that single file within the bug page to let someone like you or the author to check if the fix is okay and then merge it. I also wonder why the -1 was there and its purpose. Maybe it was useful at sometime as a workaround to a panel bug that might have been fixed in the meantime, and now that -1 is useless and causes a graphical bug in some cases. Le mar., sept. 5, 2023 à 22:30, Nate Graham<bugzilla_noreply@kde.org> a écrit: https://bugs.kde.org/show_bug.cgi?id=474083 Nate Graham <nate@kde.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor > All that complexity just to change one file
Yep, that's how software dev works. :) The good news is that it only needs to be done once. But if it seems like too much, I'm happy to do it myself.
Git commit 2ef898810597cf23218029cfcd1cdbef8061e605 by Nate Graham. Committed on 07/09/2023 at 15:40. Pushed by ngraham into branch 'master'. applets/lock_logout: don't unnecessarily reduce height for single items Co-authored-by: Yannick <yb21com@yahoo.fr> FIXED-IN: 6.0 M +2 -2 applets/lock_logout/contents/ui/lockout.qml https://invent.kde.org/plasma/plasma-workspace/-/commit/2ef898810597cf23218029cfcd1cdbef8061e605 *** Bug 467564 has been marked as a duplicate of this bug. *** *** Bug 468475 has been marked as a duplicate of this bug. *** Created attachment 161500 [details] attachment-879328-0.html Great ! I'm glad I fixed this issue that was irritating me... and happy I could find it pretty quickly and give a first concrete contribution to the KDE Plasma project. I'm aware of the tools that exist for devs work, as my job is project/product owner. The projects or products I own strongly rely on IT projects, like were my studies (computer science). I didn't want to lose time in finding how to do a merge request just for 2 lines of code. Though I know the existence and purpose of tools like Git, I didn't want to take the hassle just for once. Thank you Nate for the time you spent for initiating the merge request and giving me credit (as co-author). It's very nice ! Le jeu., sept. 7, 2023 à 15:42, Nate Graham<bugzilla_noreply@kde.org> a écrit: https://bugs.kde.org/show_bug.cgi?id=474083 Nate Graham <nate@kde.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adam.m.fontenot+kde@gmail.c | |om --- Comment #8 from Nate Graham <nate@kde.org> --- *** Bug 468475 has been marked as a duplicate of this bug. *** You're very welcome! *** Bug 370640 has been marked as a duplicate of this bug. *** |