Merge lp://qastaging/~3v1n0/unity/panel-p-cleanup into lp://qastaging/unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: no longer in the source branch.
Merged at revision: 2242
Proposed branch: lp://qastaging/~3v1n0/unity/panel-p-cleanup
Merge into: lp://qastaging/unity
Diff against target: 7874 lines (+3128/-2131)
28 files modified
UnityCore/Variant.cpp (+31/-2)
UnityCore/Variant.h (+6/-1)
plugins/unityshell/src/DashController.cpp (+5/-3)
plugins/unityshell/src/DashController.h (+1/-0)
plugins/unityshell/src/LauncherController.cpp (+51/-8)
plugins/unityshell/src/PanelController.cpp (+27/-20)
plugins/unityshell/src/PanelController.h (+2/-4)
plugins/unityshell/src/PanelIndicatorEntryView.cpp (+440/-347)
plugins/unityshell/src/PanelIndicatorEntryView.h (+69/-45)
plugins/unityshell/src/PanelIndicatorsView.cpp (+103/-42)
plugins/unityshell/src/PanelIndicatorsView.h (+27/-18)
plugins/unityshell/src/PanelMenuView.cpp (+934/-859)
plugins/unityshell/src/PanelMenuView.h (+78/-90)
plugins/unityshell/src/PanelTitlebarGrabAreaView.cpp (+125/-13)
plugins/unityshell/src/PanelTitlebarGrabAreaView.h (+27/-6)
plugins/unityshell/src/PanelTray.cpp (+92/-115)
plugins/unityshell/src/PanelTray.h (+21/-24)
plugins/unityshell/src/PanelView.cpp (+123/-149)
plugins/unityshell/src/PanelView.h (+40/-45)
plugins/unityshell/src/PluginAdapter.cpp (+158/-24)
plugins/unityshell/src/PluginAdapter.h (+12/-3)
plugins/unityshell/src/SwitcherController.cpp (+9/-2)
plugins/unityshell/src/UBusMessages.h (+1/-0)
plugins/unityshell/src/WindowButtons.cpp (+587/-220)
plugins/unityshell/src/WindowButtons.h (+33/-12)
plugins/unityshell/src/WindowManager.cpp (+38/-10)
plugins/unityshell/src/WindowManager.h (+12/-6)
plugins/unityshell/src/unityshell.cpp (+76/-63)
To merge this branch: bzr merge lp://qastaging/~3v1n0/unity/panel-p-cleanup
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+99950@code.qastaging.launchpad.net

Commit message

A lot of panel fixes with code cleanup and improvements to the panel code.

This branch introduces a lot of code cleanup and improvements to the panel code.

A part the linked bugs fixed, this changes:
 - PanelStyle: used now to check all the panel related settings, including
   fonts and DPI. Emitting the changed signal when they get changed (so now
   when changing the title font, it gets updated immediately).
   Added better support for HighContrast themes and fallback buttons.
   Used ti everywhere to remove the "24" height magic number.

 - PanelIndicatorEntryView: code cleaned a lot to be more C++ conformant,
   and modified to be easily extendible in the near future. Also fixed issues
   with the indicator entries and Scale/Expo

 - PanelMenuView: the layout system has been rewritten and now it works
   natively without the workarounds we were using before,
   fixed the panel paddings to match design specs;
   Optimized the drawing operations, now the title texture is cached and
   rebuilt only if really needed.
   Fixed the panel title on Expo and Scale.
   Improved the detection of the panel used to draw the app title on
   multi-monitor (disabled otherwise), and the alt+tab/alt conflict.
   Maximized windows list is re-populated on startup or when adding a new
   screen.

 - PanelTitlebarGrabArea: rewritten to better handle the grabbing of the panel
   and clicks over it.

 - WindowButtons: rewritten using in a better way the subclass nux::Button
   features, factorizing some code for each button into WindowButtons. Also
   the handling of the controlled window is now done internally, not by the
   PanelMenuView.

Description of the change

A lot of panel fixes... Into one branch, because they should go together, but the single changes are shown on these single code reviews:

1) PanelStyle changes: http://go.3v1n0.net/Hs4YM6 [Tim: Approved]
2) Indicator Entry changes: http://go.3v1n0.net/Hp8VDp [Tim: Approved]
3) Indicators View changes: http://go.3v1n0.net/GXHKN3 [Tim: Approved]
4) Window buttons changes: http://go.3v1n0.net/GZHigm [Tim: Approved]
5) Grab area changes: http://go.3v1n0.net/H81Syb [Tim: Approved]
6) Tray changes: http://go.3v1n0.net/H6yqba [Tim: Approved]
7) Window Manager changes: http://go.3v1n0.net/H2GDwr [Tim: Approved]
8) Core changes: http://go.3v1n0.net/H1qokF [Tim: Approved]
9) Menu view changes: http://go.3v1n0.net/HwATeM [Tim: Approved]
10) Panel view changes: http://go.3v1n0.net/H8lwdB [Tim: Approved]

This branch introduces a lot of code cleanup and improvements to the panel code.

A part the linked bugs fixed, this changes:
 - PanelStyle: used now to check all the panel related settings, including
   fonts and DPI. Emitting the changed signal when they get changed (so now
   when changing the title font, it gets updated immediately).
   Added better support for HighContrast themes and fallback buttons.
   Used ti everywhere to remove the "24" height magic number.

 - PanelIndicatorEntryView: code cleaned a lot to be more C++ conformant,
   and modified to be easily extendible in the near future. Also fixed issues
   with the indicator entries and Scale/Expo

 - PanelMenuView: the layout system has been rewritten and now it works
   natively without the workarounds we were using before,
   fixed the panel paddings to match design specs;
   Optimized the drawing operations, now the title texture is cached and
   rebuilt only if really needed.
   Fixed the panel title on Expo and Scale.
   Improved the detection of the panel used to draw the app title on
   multi-monitor (disabled otherwise), and the alt+tab/alt conflict.
   Maximized windows list is re-populated on startup or when adding a new
   screen.

 - PanelTitlebarGrabArea: rewritten to better handle the grabbing of the panel
   and clicks over it.

 - WindowButtons: rewritten using in a better way the subclass nux::Button
   features, factorizing some code for each button into WindowButtons. Also
   the handling of the controlled window is now done internally, not by the
   PanelMenuView.

Testing:
 - All the panel items now are introspectable. And this allow AP testing.
 - The branch with all the brand new tests for the panel are at:
   lp:~3v1n0/unity/panel-p-tests

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

OMG, WTF? 7.5k lines in the last week? This had better work :-)

Revision history for this message
Tim Penhey (thumper) wrote :

Also, in the breakup way, you should be using chained merge proposals using prerequisite branches.

Revision history for this message
Tim Penhey (thumper) wrote :

Reviews in progress on the others.

review: Needs Fixing
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> Also, in the breakup way, you should be using chained merge proposals using
> prerequisite branches.

Yes, I know, but since I've splitted it later, I didn't want to cause temporary breakage in trunk when merging just partial changes, so I want to keep this top branch updated and make it go into trunk, while the partial changes are here only for reviewing (even if they reflect the reality since I'm updating them using bzr pipeline)

Revision history for this message
Tim Penhey (thumper) wrote :

You have a lot of bugs linked to this branch. Where are the tests confirming fixes?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> You have a lot of bugs linked to this branch. Where are the tests confirming
> fixes?

I'm currently writing them, considering the size of this branch I want to keep the tests in another branches, while this get reviewed.

Revision history for this message
Brandon Schaefer (brandontschaefer) wrote :

** Note, I couldn't test any bug that dealt with multi monitors. **

Ok, lots of code. Confirmed this branch fixes all of these bugs:

Bug #655184: Top bar - Menus should be condensed to fit panel/overlay of appmenu
Bug #839690: Topbar - window controls for maximised windows in the top bar should conform to Fitts's law
Bug #875932: window selected via ALT+F1 doesn't get focus in unity
Bug #934680: Window management - Dragging down a maximized window from the panel has not predictable results
Bug #936425: Not minimizable windows have an enabled "minimize" button on the unity panel
Bug #939054: HUD maximize button affects Dash
Bug #962410: Menu bar not transparent when invoking dash with super key whilst HUD enabled and vice versa
Bug #963118: Windows controls lost if dash is opened after HUD
Bug #963134: Opening HUD after dash shows window title in the panel
Bug #970420: Super+Tab, super, loses focus
Bug #971947: PanelMenuView causes gtk assertion to fail
Bug #940683: Panel opacity toggle doesn't quite work

When the test are done this branch will be look good :). Awesome work!

Revision history for this message
Tim Penhey (thumper) wrote :

The test branch landing is coming next, for some reason tarmac gets itself in a twist.

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.