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

Aaron J. Seigo aseigo at kde.org
Thu Oct 25 09:44:06 UTC 2012


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


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.


plasma/generic/applets/activitybar/activitybar.cpp
<http://git.reviewboard.kde.org/r/106978/#comment16453>

    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



plasma/generic/applets/activitybar/activitybar.cpp
<http://git.reviewboard.kde.org/r/106978/#comment16455>

    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)



plasma/generic/applets/activitybar/activitybar.cpp
<http://git.reviewboard.kde.org/r/106978/#comment16454>

    in these cases, pref size should be set to m_tabBar->nativeWidget()->sizeHint()



plasma/generic/applets/activitybar/activitybar.cpp
<http://git.reviewboard.kde.org/r/106978/#comment16458>

    this belongs in constraintsEvent, not here.



plasma/generic/applets/activitybar/activitybar.cpp
<http://git.reviewboard.kde.org/r/106978/#comment16461>

    this should never be used as it assumes all sorts of things that not guaranteed at all, e.g. that the applets in the panel are laid out linearly with respect to each other.



plasma/generic/applets/activitybar/activitybar.cpp
<http://git.reviewboard.kde.org/r/106978/#comment16460>

    and for non-horz/vert? remember that it can be moved between form factors :)



plasma/generic/applets/activitybar/activitybar.cpp
<http://git.reviewboard.kde.org/r/106978/#comment16459>

    should be on same line: } else {


- Aaron J. Seigo


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/20121025/8c9669e5/attachment-0001.html>


More information about the Plasma-devel mailing list