Bug 403153 - ComboBox entry popup is not resized to delegate width
Summary: ComboBox entry popup is not resized to delegate width
Status: RESOLVED FIXED
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.66.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL: https://doc.qt.io/qt-6/qml-qtquick-co...
Keywords:
: 364871 414443 418157 421746 432829 437362 445394 446878 448073 449640 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-01-12 19:12 UTC by Patrick Silva
Modified: 2022-05-09 15:55 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.91
Sentry Crash Report:


Attachments
screenshot (70.12 KB, image/png)
2019-01-12 19:12 UTC, Patrick Silva
Details
screenshot of screen locker settings (188.56 KB, image/png)
2020-08-13 19:46 UTC, Patrick Silva
Details
new screenshot of Screen Locking KCM (132.35 KB, image/png)
2022-05-08 13:28 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2019-01-12 19:12:13 UTC
Created attachment 117426 [details]
screenshot

SUMMARY
I'm testing the new virtual desktops kcm on neon dev unstable, my system language is pt-br.

STEPS TO REPRODUCE
1. search for the "virtual desktops" kcm in the apps launcher and open it 
2. open "Show an animation when change" dropdown
3. 

OBSERVED RESULT
two options available are not entirely readable.
See the screenshot taken on neon dev unstable please.

EXPECTED RESULT
all options available are entirely readable

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2019-01-15 16:48:36 UTC
Confirmed. Possibly a QQC2-desktop-style issue?
Comment 2 David Edmundson 2019-01-16 12:46:12 UTC
Git commit c4a35f5e36bd5d5814b7288e991e125792e24d2c by David Edmundson.
Committed on 16/01/2019 at 12:45.
Pushed by davidedmundson into branch 'master'.

Set CombooBox QStyleOptionState == On rather than Sunken to match qwidgets

Summary:
See the end of QComboBox::initStyleOption

    if (d->container && d->container->isVisible())
        option->state |= QStyle::State_On;

The relevant breeze code reads:

        const bool hasFocus( enabled && ( state & (State_HasFocus |
State_Sunken ) ) );
        const bool sunken( state & (State_On|State_Sunken) );

So we still remain sunken in breeze, but we don't assume hasFocus, which
gives the background an incorrect colour.

Test Plan:
Ran testComboBox from Aleix
Debug inside Breeze QStyle + reading Qt code

Reviewers: broulik

Reviewed By: broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

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

M  +1    -2    org.kde.desktop/ComboBox.qml

https://commits.kde.org/qqc2-desktop-style/c4a35f5e36bd5d5814b7288e991e125792e24d2c
Comment 3 Méven Car 2019-04-16 06:52:31 UTC
Seeing last commit, should it be considered fixed ?
Comment 4 Nate Graham 2019-04-16 13:58:12 UTC
Yeah, I haven't seen this broken again. Let's call it fixed unless it starts happening once more!
Comment 5 Filip Fila 2019-05-02 20:03:05 UTC
(In reply to Nate Graham from comment #4)
> Yeah, I haven't seen this broken again. Let's call it fixed unless it starts
> happening once more!

I think it's still happening: https://phabricator.kde.org/file/data/ikkaw7cy5onaevd7uuhq/PHID-FILE-frrm7ezidk4god56xu6l/image.png
Comment 6 David Edmundson 2019-05-02 21:19:46 UTC
It's not fixed, my patch just adjusted some colouring which is what I understood this bug to be. It originally said "text is not readable" or something.

After committing it was explained and I reopened and reworded the title to be clearer.
Comment 7 Nate Graham 2019-11-24 16:03:39 UTC
*** Bug 414443 has been marked as a duplicate of this bug. ***
Comment 8 Nate Graham 2020-02-26 18:51:44 UTC
*** Bug 418157 has been marked as a duplicate of this bug. ***
Comment 9 launchpad 2020-02-27 00:59:44 UTC
(In reply to Nate Graham from comment #8)
> *** Bug 418157 has been marked as a duplicate of this bug. ***

I hope this issue can be addressed at a fundamental level and not just on a case by case basis. That control is used in numerous dialogs throughout KDE and the issue of it truncating and elipsifying unnecessarily (instead utilizing more of the available horizontal space) is ubiquitous; it becomes especially emphasized when users have font-sizes set to a larger font than the 10pt default.

Hopefully, developers can change the way that control acts in one code-place, but in a manner that all instances (where that control is used) will benefit from those efforts and not just a single specific dialog.
Comment 10 Nate Graham 2020-02-27 03:05:06 UTC
Yes, that's what this bug reports is all about. :)
Comment 11 Nate Graham 2020-06-10 21:20:39 UTC
*** Bug 421746 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2020-06-15 14:06:51 UTC
*** Bug 364871 has been marked as a duplicate of this bug. ***
Comment 13 Patrick Silva 2020-08-13 19:46:32 UTC
Created attachment 130859 [details]
screenshot of screen locker settings

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.19.80
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Comment 14 Mikel Johnson 2021-01-11 09:48:32 UTC
should be fixed in qt 6 with https://doc.qt.io/qt-6/qml-qtquick-controls2-combobox.html#implicitContentWidthPolicy-prop
Comment 15 Nate Graham 2021-01-14 19:55:36 UTC
Thanks for finding that!

I guess once Qt6 comes out, we can mark this as RESOLVED UPSTREAM.
Comment 16 Nate Graham 2021-02-12 17:40:06 UTC
*** Bug 432829 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2021-05-19 18:45:32 UTC
*** Bug 437362 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2021-08-10 20:58:42 UTC
Eh, I guess we can do it now.
Comment 19 Patrick Silva 2021-08-11 19:00:43 UTC
at least duplicates bug 432829 and bug 421746 are still reproducible on neon unstable,
Comment 20 Nate Graham 2021-08-12 14:19:19 UTC
I'm sure all of them are still reproducible, since this is fixed only in Qt 6 and we're still using Qt 5. :)
Comment 21 Patrick Silva 2021-08-12 15:27:15 UTC
Can the fix be backported to KDE Qt?
Comment 22 Nate Graham 2021-08-12 15:52:54 UTC
Not sure, but that would be a question for someone else. :) Maybe ask on kde-devel@kde.org?
Comment 23 Nate Graham 2021-11-12 23:03:21 UTC
*** Bug 445394 has been marked as a duplicate of this bug. ***
Comment 24 Nate Graham 2021-12-14 18:40:18 UTC
*** Bug 446878 has been marked as a duplicate of this bug. ***
Comment 25 Nate Graham 2022-01-13 04:27:14 UTC
*** Bug 448073 has been marked as a duplicate of this bug. ***
Comment 26 Marco Martin 2022-01-13 10:20:52 UTC
The problem is that internally that is a ListView, which is not trivial to have "the implicit width of the largest of its items" as that one may not even be instantiated..

It may be replaced with a Repeater and a Layout, tough that could be havier... usually comboboxes don't have that many items, so would usually be fine, not sure
Comment 28 Alexander Stippich 2022-01-20 19:41:09 UTC
Git commit bd16e48af6b6a99d8008e2950fe97503a3007a13 by Alexander Stippich.
Committed on 20/01/2022 at 19:36.
Pushed by astippich into branch 'master'.

adapt width of combobox to its content

M  +16   -2    org.kde.desktop/ComboBox.qml

https://invent.kde.org/frameworks/qqc2-desktop-style/commit/bd16e48af6b6a99d8008e2950fe97503a3007a13
Comment 29 Patrick Silva 2022-02-05 14:42:26 UTC
*** Bug 449640 has been marked as a duplicate of this bug. ***
Comment 30 Patrick Silva 2022-05-08 13:28:05 UTC
Created attachment 148660 [details]
new screenshot of Screen Locking KCM

This bug persists with Screen Locking KCM.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 31 Nate Graham 2022-05-09 15:55:07 UTC
I can reproduce that issue, but it seems specific to the Screen Locking KCM. If you open the same UI (Plasma Wallpaper settings) from the desktop, the bug doesn't happen there. And it doesn't happen in any other comboboxes with long text that I tried.

Can you file a new bug report about this issue in System Settings | kcm_screenlocker? Thanks!