Bug 237770 - Oxygen breaks usage of widgets in item delegates
Summary: Oxygen breaks usage of widgets in item delegates
Status: CONFIRMED
Alias: None
Product: Oxygen
Classification: Plasma
Component: style (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-15 23:37 UTC by Tobias Koenig
Modified: 2021-03-09 23:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
A screenshot collection that compares different widgets in Plastique and Oxygen (23.49 KB, image/png)
2010-05-15 23:39 UTC, Tobias Koenig
Details
(applies to kdelibs/kdeui/kernel/kstyle.cpp) (789 bytes, patch)
2010-05-19 01:50 UTC, Hugo Pereira Da Costa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Koenig 2010-05-15 23:37:46 UTC
Version:            (using Devel)
Installed from:    Compiled sources

When implementing editor in custom item delegates, you use setFrame(false) on QLineEdit/QSpinBox or QDateTimeEdit, to use as much space as possible for the edit widget (that's the way how it is done in Qt sources as well).
However when using Oxygen, the height of the widgets is too small and they are hardly usable. I'll attach a screenshot collection, where you can see the differences between Plastique and Oxygen when using aboved mentioned widgets inside an delegate. Please note that Oxygen does not draw the blue focus frame, which makes it really difficult to see where the bounds of the widget are. The QLineEdit has the additional issue, that the width seems to be truncated to the width of the text, also not the right behavior IMHO.

Can you please try to fix this? We make use of custom delegates in KDEPIM at several points and with Oxygen these are nearly unusable.
Comment 1 Tobias Koenig 2010-05-15 23:39:30 UTC
Created attachment 43619 [details]
A screenshot collection that compares different widgets in Plastique and Oxygen
Comment 2 Hugo Pereira Da Costa 2010-05-19 01:35:07 UTC
Hello Tobias,
just to make sure: the top right item is fine, is it ? 
For the other two I agree there is obviously a problem. Will see what I can do. 
It should at least look like the top one.
Comment 3 Hugo Pereira Da Costa 2010-05-19 01:49:22 UTC
its actually a bug in kstyle (and actually, the delegate comes from kstyle too, but that's somewhat unrelated.)

Patch attached in next comment.
I'll commit as soon as I've tested enough.
Feel free to give it a shot on your side.
Comment 4 Hugo Pereira Da Costa 2010-05-19 01:50:18 UTC
Created attachment 43705 [details]
(applies to kdelibs/kdeui/kernel/kstyle.cpp)

Account for spinbox flatness when calculating edit-field width
Comment 5 Hugo Pereira Da Costa 2010-05-19 01:50:48 UTC
PS: there might be other widgets with similar issues (comboboxes?). I'll be checking.
Comment 6 Hugo Pereira Da Costa 2010-05-19 02:08:00 UTC
ok (sorry for the many messages) its actually an oxygen bug (or missing feature).
The patch above works but is just a workaround.
Comment 7 Hugo Pereira Da Costa 2010-05-19 02:10:45 UTC
SVN commit 1128339 by hpereiradacosta:

announce to kstyle that comboboxes and spinboxes can be painted frameless. This increases the 
available edition rect.
CCBUG: 237770


 M  +2 -0      oxygenstyle.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1128339
Comment 8 Hugo Pereira Da Costa 2010-05-19 02:20:06 UTC
SVN commit 1128341 by hpereiradacosta:

backport r1128339
announce to kstyle that comboboxes and spinboxes can be painted frameless. This increases the 
available edition rect.

CCBUG: 237770


 M  +2 -0      oxygen.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1128341
Comment 9 Tobias Koenig 2010-05-22 08:38:37 UTC
Hej Hugo,

thank for the fast fix, QSpinBox and QDateTime widgets looks ok now :)
Regarding the QLineEdit (the widget in the top right position you asked about in comment #2), is it normal that the lineedit is completely blue starting right after the text until the end of the widget? The normal lineedit is completely white when typing something into it. Especially when the user starts editing such an frameless lineedit, he sees only a small white vertical bar which is really confusing if you are used to the normal behavior/appearance of a lineedit.
Comment 10 Hugo Pereira Da Costa 2010-05-22 18:44:50 UTC
@Tobias,
No it is not normal that the white rect does not extend in the entire column. I have the same observation as you; the behavior is style dependent, but so far I have been unable to track down the origin of this. Still working on it. That's why I did not close the bug ;-)
Comment 11 Justin Zobel 2021-03-09 23:58:27 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.