Review Request 108433: [High-dpi issues] Fix color kcm list when using big fonts

Thomas Lübking thomas.luebking at gmail.com
Wed Jan 16 13:46:38 GMT 2013



> On Jan. 16, 2013, 10:10 a.m., Thomas Lübking wrote:
> > kcontrol/colors/colorscm.cpp, line 747
> > <http://git.reviewboard.kde.org/r/108433/diff/1/?file=107425#file107425line747>
> >
> >     w/o having checked code it seems the view has a static row height and the last kid would by this set the game.
> >     
> >     i'd say minHeight should be determined as qMax(minHeight, btn->sizeHint().height()) and initialized by the font height (given the font is equal for all elements, otherwise needs to be qMax'd in every row as well)
> >     
> >     ultimately in a second pass set all row heights, while probably even setting one would be sufficient
> 
> Kai Uwe Broulik wrote:
>     minHeight is calculated by the Varies button which is the biggest element here (font + margin), the font is equal, yes.
>     Also, all rows are getting a minHeight (it's a for..next loop)

The problem is that you estimate on pre-"known" data ("varies" could be very tiny by fontsize or locle - not that the current situation would be any correct), so the minHeight should be set after the button (or stacked widget) has been created (so that the biggest element determines the height) and then set afterwards.

By "view has a static row height" i meant the "uniformItemSize" atribute is likely set but it seems that is actually a QTableWidget (lol ;-) so that the last time one calls "setRowHieght()" would determine the height of all rows. (looks much like this on the second screenshot)


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108433/#review25637
-----------------------------------------------------------


On Jan. 16, 2013, 1:56 a.m., Kai Uwe Broulik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108433/
> -----------------------------------------------------------
> 
> (Updated Jan. 16, 2013, 1:56 a.m.)
> 
> 
> Review request for kde-workspace.
> 
> 
> Description
> -------
> 
> This makes the row height of color list depend on the height of the "Varies" button.
> 
> The KColorButtons on the other pages also need fixing but this should be done in KColorButton in kdelibs rather than hacking in the "Varies" thing there as well.
> 
> (Not sure if I need to delete that PushButton afterwards)
> 
> 
> Diffs
> -----
> 
>   kcontrol/colors/colorscm.cpp b9b911f 
> 
> Diff: http://git.reviewboard.kde.org/r/108433/diff/
> 
> 
> Testing
> -------
> 
> Yup, see screenshots.
> 
> 
> File Attachments
> ----------------
> 
> After with normal fonts
>   http://git.reviewboard.kde.org/media/uploaded/files/2013/01/16/colornormalsize.png
> Before with huge fonts
>   http://git.reviewboard.kde.org/media/uploaded/files/2013/01/16/colorbigsizebefore.png
> After with huge fonts
>   http://git.reviewboard.kde.org/media/uploaded/files/2013/01/16/colorbigsizeafter.png
> 
> 
> Thanks,
> 
> Kai Uwe Broulik
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130116/d9b508ee/attachment.htm>


More information about the kde-core-devel mailing list