Sent from my BlackBerry 10 smartphone.
On January 16th, 2013, 10:10 a.m. UTC, Thomas Lübking wrote:
|
kcontrol/colors/colorscm.cpp
(Diff revision 1)
|
void KColorCm::setupColorTable() |
| 744 |
commonColorTable->setRowHeight(i, button->sizeHint().height()); |
747 |
commonColorTable->setRowHeight(i, minHeight); |
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
On January 16th, 2013, 1:29 p.m. UTC, 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
On January 16th, 2013, 1:56 a.m. UTC, Kai Uwe Broulik wrote:
|
Review request for kde-workspace.
By Kai Uwe Broulik.
Updated Jan. 16, 2013, 1:56 a.m.
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)
|
Testing
Diffs
- kcontrol/colors/colorscm.cpp (b9b911f)
View Diff
File Attachments
|