Review Request: Fix Inconsistencies and Bugs in Activity Bar's Size Hinting

David Narváez david.narvaez at computer.org
Sat Oct 27 12:02:57 UTC 2012



> On Oct. 25, 2012, 9:44 a.m., Aaron J. Seigo wrote:
> > there are a number of style issues with this patch, but the real problem is setting it to a hardcoded 1/3rd of the panel.
> > 
> > i would suggest that the real underlying problem here is that the m_tabBar sizehint keeps changing so radically.

I have limited internet access from my development machine during these days, but I'll try addressing the m_tabBar sizeHint issue ASAP. Yet, even if that bug is fixed, for 8+ activities, I personallly prefer the tab bar to take only a given amount of space (independent of the number of tabs) and display arrows, see

http://mail.kde.org/pipermail/plasma-devel/2011-November/017890.html

I will work through the style issues if possible, but there are some comments below I'd like to discuss.


> On Oct. 25, 2012, 9:44 a.m., Aaron J. Seigo wrote:
> > plasma/generic/applets/activitybar/activitybar.cpp, line 37
> > <http://git.reviewboard.kde.org/r/106978/diff/1/?file=91763#file91763line37>
> >
> >     this should be a member of the class (the hint should have been passing in *this constantly); perhaps call it 'calculatePreferredSize" to avoid conflicting with setPreferredSize

I obviously chose this design to avoid braking the ABI.


> On Oct. 25, 2012, 9:44 a.m., Aaron J. Seigo wrote:
> > plasma/generic/applets/activitybar/activitybar.cpp, lines 42-45
> > <http://git.reviewboard.kde.org/r/106978/diff/1/?file=91763#file91763line42>
> >
> >     1/3rd looks wrong and is going to give incorrect results in several situations (e.g. when pref size of all plasmoids fit, but the activity bar has fewer buttons than the space it is alloted)

That's intended. If the space alloted is greater than the size required to display the few tabs, the tabs expand to fit the size and the look is similar to what we have now (which is, by the way, horrible) just not constantly expanding. On the other hand, if you have 8+ tabs, they will not fit in the 1/3 size and the tab bar will display arrows for scrolling left or right.

Taking any approach that varies with the amount of tabs is actually against the principle of least astonishment, from my point of view.


- David


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


On Oct. 22, 2012, 2:27 a.m., David Narváez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106978/
> -----------------------------------------------------------
> 
> (Updated Oct. 22, 2012, 2:27 a.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Description
> -------
> 
> The main issue was caused by the fact that asking the tab bar native widget to provide a size hint was giving a different size every time which caused the activity bar to expand or shrink in the presence of another expanding widget (in my case, the taskbar), so this patch decides a size hint from the size of the containment (one third of the width of height depending on the form factor) but the size policy is set to expand when the activity bar is the only widget in the containment.
> 
> 
> This addresses bug 225078.
>     http://bugs.kde.org/show_bug.cgi?id=225078
> 
> 
> Diffs
> -----
> 
>   plasma/generic/applets/activitybar/activitybar.cpp e66bf04 
> 
> Diff: http://git.reviewboard.kde.org/r/106978/diff/
> 
> 
> Testing
> -------
> 
> 1) Add a panel with an actyivity bar and a task bar
> 2) Add a panel with an activty bar only
> 3) Change activities
> 
> Before this patch, the activity bar in the panel with a task bar shrinks or enlarges with every activity change; while the size of the activity bar in the second panel remains constant. After this patch, the size of the activity bar in both panels remains constant.
> 
> 
> Thanks,
> 
> David Narváez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20121027/b1bc4cfa/attachment.html>


More information about the Plasma-devel mailing list