Bug 362986 - Application Dashboard needs an option for the name to have two lines
Summary: Application Dashboard needs an option for the name to have two lines
Status: RESOLVED FIXED
Alias: None
Product: kdeplasma-addons
Classification: Plasma
Component: Application Dashboard (show other bugs)
Version: 5.15.2
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Eike Hein
URL:
Keywords: usability
: 373328 379347 393264 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-12 15:10 UTC by Bladeforce
Modified: 2024-03-12 14:18 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26


Attachments
plasma 5.14 beta, Arch (1.62 MB, image/png)
2018-09-16 11:28 UTC, Patrick Silva
Details
This is showing the fix (447.71 KB, image/png)
2022-09-25 10:47 UTC, tomashnyk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bladeforce 2016-05-12 15:10:38 UTC
The application Dashbaord needs an option to allow the shortcut names to fill two lines instead of one. Hence no cut offs in the name

Reproducible: Always

Steps to Reproduce:
1.Add/install program/game
2.Open application Dashboard
3.If installed program has a name longer than "x" character it gets cut off for  example Google Chrome becomes Google Chro...
Comment 1 Eike Hein 2018-04-18 17:21:45 UTC
*** Bug 379347 has been marked as a duplicate of this bug. ***
Comment 2 Eike Hein 2018-04-18 17:21:49 UTC
*** Bug 393264 has been marked as a duplicate of this bug. ***
Comment 3 Scott Harvey 2018-05-26 03:19:42 UTC
Git commit cd7252e9fa0722c912f93595100d540d2842ed12 by Scott Harvey.
Committed on 26/05/2018 at 03:19.
Pushed by sharvey into branch 'master'.

Add second line of text for KickerDash item descriptions

Summary:
Adds a second line of text under icon/doc icons for more clarity.
Will stop at two lines; if text continues, it will be elided.

Test Plan:
- Install Application Dashboard, identify a one-line elided item
- Apply patch and compile
- Check that item text is now two lines but does not overlap next row

Reviewers: ngraham, hein, #plasma

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D13122

M  +2    -1    applets/kicker/package/contents/ui/ItemGridDelegate.qml

https://commits.kde.org/plasma-desktop/cd7252e9fa0722c912f93595100d540d2842ed12
Comment 4 Bhushan Shah 2018-05-28 11:48:24 UTC
Git commit 52cd092af19934424e0f1a6d5b3e469c149de2ef by Bhushan Shah, on behalf of Scott Harvey.
Committed on 28/05/2018 at 11:48.
Pushed by bshah into branch 'master'.

Add second line of text for KickerDash item descriptions

Summary:
Adds a second line of text under icon/doc icons for more clarity.
Will stop at two lines; if text continues, it will be elided.

Test Plan:
- Install Application Dashboard, identify a one-line elided item
- Apply patch and compile
- Check that item text is now two lines but does not overlap next row

Reviewers: ngraham, hein, #plasma

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D13122

M  +2    -1    applets/kicker/package/contents/ui/ItemGridDelegate.qml

https://commits.kde.org/plasma-desktop/52cd092af19934424e0f1a6d5b3e469c149de2ef
Comment 5 Nate Graham 2018-08-29 19:02:43 UTC
*** Bug 373328 has been marked as a duplicate of this bug. ***
Comment 6 Patrick Silva 2018-09-16 11:28:57 UTC
Created attachment 115000 [details]
plasma 5.14 beta, Arch

Is the fix included in plasma 5.14 beta?
I'm testing plasma 5.14 beta on Arch and the bug persists.
See the screenshot.
Comment 7 Nate Graham 2018-09-16 22:09:35 UTC
Can confirm that the patch is present in 5.14 and master, but that the issue is not actually fixed. :<

I could have sworn that I tested this out and confirmed that the patch fixed things when I reviewed it. And Scott posted a screenshot showing multi-line strings, too. Maybe it got broken since then by something else...

Scott, do you think you could you take a look?
Comment 8 Scott Harvey 2018-09-16 23:29:48 UTC
I'm on git/master too and the eliding of the titles is back. But - why?
Comment 9 Scott Harvey 2018-09-16 23:46:57 UTC
The code is (still) correct, according to the current Qt 5.11 documentation - nothing deprecated or changed. There's no other way to achieve this outcome - we're using all the right functions and setting the appropriate values. 

Nate - could it be related to this bug?
https://bugreports.qt.io/browse/QTBUG-66495
Comment 10 Nate Graham 2018-09-21 03:39:00 UTC
Hmm, I'm not sure. That was reported against 5.10, but I'm guessing you were already using 5.11 when you first wrote the patch.
Comment 11 Björn Feber 2019-10-04 14:06:34 UTC
Weird, it works with a PlasmaComponents3 label.
Comment 12 tomashnyk 2022-01-07 15:59:00 UTC
(In reply to Björn Feber from comment #11)
> Weird, it works with a PlasmaComponents3 label.

Well, it still does not work on 5.23.5 on X (and is rather annoying).
Comment 13 tomashnyk 2022-09-25 10:31:44 UTC
So, in this file: https://github.com/KDE/plasma-desktop/blob/master/applets/kicker/package/contents/ui/ItemGridDelegate.qml changing line 86 

elide: Text.ElideRight

to

elide: Text.ElideMiddle

fixes this. Reading the documentation: https://doc.qt.io/qt-6/qml-qtquick-text.html#elide-prop I have no idea why. If I understand it correctly, seting the elide mode to something else but ElideRight, it enables wrapping. However, the opposite seems to be true. 

By the way, is there a more intelligent way to test this than editing 

/usr/share/plasma/plasmoids/org.kde.plasma.kicker/contents/ui/ItemGridDelegate.qml

and loggin out and in? I tried playing with plasmashell --replace etc. with no effect, plasmawindowed just shows the icon of the dashboard, but it does not expand when clicked. I guess I should install KDE Neon in to a virtual machine, but maybe there is a smarter solution?




(In reply to Björn Feber from comment #11)
> Weird, it works with a PlasmaComponents3 label.

What do you mean by that? I tried changind the line

PlasmaComponents.Label {

to

PlasmaComponents.Label {

but then Dashboard just does not show.
Comment 14 tomashnyk 2022-09-25 10:47:02 UTC
Created attachment 152409 [details]
This is showing the fix

Do not mind the green - I changed the colour to check if my changes were being applied. This shows two lines being displayed.

Two problems with that:
1) If there are two categoreis displayed - here "Applications" and "Command line", the second line gets half hidden. I guess anchors would neet to be adjusted.

2) for some applications, it still does not seem to be enough. Actually, I am confused. When I launch the Dashboard, a default application displayed is "Libre Office Writer (Word". When I press "l" it changes to "Libre Office Writer" - the parenthesis dissappears). I assume "GenericName=Word Processor" from /usr/share/applications/libreoffice-writer.desktop is displayed but since it disappears and is not wholly displayed, I do not much see the point.
Comment 15 tomashnyk 2022-09-27 01:13:07 UTC
I think this should fix this: https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1180

Not much idea why exactly :-).

This does not provide an option as OP requested but sets default to two lines. That seems reasonable at least on my system, as I applications names in general fit to two lines and there are many applications where two lines are needed.
Comment 16 Nate Graham 2022-09-27 16:27:38 UTC
Git commit 49d3b465877f93db823c34e3519510c1450748b6 by Nate Graham, on behalf of Tomáš Hnyk.
Committed on 27/09/2022 at 16:27.
Pushed by ngraham into branch 'master'.

applets/kicker: in Dashboard representation, allow two lines for application name
FIXED-IN: 5.26

M  +1    -1    applets/kicker/package/contents/ui/DashboardRepresentation.qml
M  +1    -1    applets/kicker/package/contents/ui/ItemGridDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/49d3b465877f93db823c34e3519510c1450748b6
Comment 17 Nate Graham 2022-09-27 16:28:43 UTC
Git commit af1d7d4f31ce67b157a749deeff9ce7ffcf01bed by Nate Graham, on behalf of Tomáš Hnyk.
Committed on 27/09/2022 at 16:28.
Pushed by ngraham into branch 'Plasma/5.26'.

applets/kicker: in Dashboard representation, allow two lines for application name
FIXED-IN: 5.26


(cherry picked from commit 49d3b465877f93db823c34e3519510c1450748b6)

M  +1    -1    applets/kicker/package/contents/ui/DashboardRepresentation.qml
M  +1    -1    applets/kicker/package/contents/ui/ItemGridDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/commit/af1d7d4f31ce67b157a749deeff9ce7ffcf01bed