Merge lp:~didrocks/unity/fix-705697-705803 into lp:unity

Proposed by Didier Roche-Tolomelli
Status: Merged
Merged at revision: 786
Proposed branch: lp:~didrocks/unity/fix-705697-705803
Merge into: lp:unity
Diff against target: 65 lines (+8/-4)
4 files modified
src/PanelIndicatorObjectEntryView.h (+0/-1)
src/PanelIndicatorObjectView.cpp (+6/-2)
src/PanelIndicatorObjectView.h (+2/-0)
src/PanelMenuView.cpp (+0/-1)
To merge this branch: bzr merge lp:~didrocks/unity/fix-705697-705803
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+47406@code.launchpad.net

Description of the change

This branch with two bugs introduced when the padding was made variable
(3 pixels instead of 6) in the indicator:
- extra blank space between some indicator groups (which are unclickeable)
- the session indicator isn't in the top right corner

Furthemore, we ensure that the session indicator will still be in the top right
corner even if we mess again with size.

To post a comment you must log in.
Revision history for this message
Neil J. Patel (njpatel) wrote :

looks good. approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/PanelIndicatorObjectEntryView.h'
2--- src/PanelIndicatorObjectEntryView.h 2011-01-20 12:48:09 +0000
3+++ src/PanelIndicatorObjectEntryView.h 2011-01-25 15:49:09 +0000
4@@ -30,7 +30,6 @@
5 #include "Introspectable.h"
6
7 #define PANEL_HEIGHT 24
8-//#define PADDING 6
9 #define SPACING 3
10
11 class PanelIndicatorObjectEntryView : public nux::TextureArea, public Introspectable
12
13=== modified file 'src/PanelIndicatorObjectView.cpp'
14--- src/PanelIndicatorObjectView.cpp 2010-12-17 14:07:11 +0000
15+++ src/PanelIndicatorObjectView.cpp 2011-01-25 15:49:09 +0000
16@@ -43,10 +43,14 @@
17 _proxy (proxy),
18 _entries ()
19 {
20- printf ("IndicatorAdded: %s\n", _proxy->GetName ().c_str ());
21+ g_debug ("IndicatorAdded: %s", _proxy->GetName ().c_str ());
22 _layout = new nux::HLayout ("", NUX_TRACKER_LOCATION);
23
24 SetCompositionLayout (_layout);
25+
26+ // default in Nux is 32, we have some PanelIndicatorObjectEntryView which are smaller than that.
27+ // so redefining the minimum value for them.
28+ SetMinimumWidth (MINIMUM_INDICATOR_WIDTH);
29
30 _proxy->OnEntryAdded.connect (sigc::mem_fun (this, &PanelIndicatorObjectView::OnEntryAdded));
31 _proxy->OnEntryMoved.connect (sigc::mem_fun (this, &PanelIndicatorObjectView::OnEntryMoved));
32@@ -84,7 +88,7 @@
33 {
34 PanelIndicatorObjectEntryView *view = new PanelIndicatorObjectEntryView (proxy);
35 _layout->AddView (view, 0, nux::eCenter, nux::eFull);
36- _layout->SetContentDistribution (nux::eStackLeft);
37+ _layout->SetContentDistribution (nux::eStackRight);
38
39 _entries.push_back (view);
40
41
42=== modified file 'src/PanelIndicatorObjectView.h'
43--- src/PanelIndicatorObjectView.h 2010-12-17 14:07:11 +0000
44+++ src/PanelIndicatorObjectView.h 2011-01-25 15:49:09 +0000
45@@ -27,6 +27,8 @@
46
47 #include "Introspectable.h"
48
49+#define MINIMUM_INDICATOR_WIDTH 12
50+
51 class PanelIndicatorObjectView : public nux::View, public Introspectable
52 {
53 public:
54
55=== modified file 'src/PanelMenuView.cpp'
56--- src/PanelMenuView.cpp 2011-01-20 13:45:55 +0000
57+++ src/PanelMenuView.cpp 2011-01-25 15:49:09 +0000
58@@ -117,7 +117,6 @@
59 PanelMenuView::SetProxy (IndicatorObjectProxy *proxy)
60 {
61 _proxy = proxy;
62- printf ("IndicatorAdded: %s\n", _proxy->GetName ().c_str ());
63
64 _proxy->OnEntryAdded.connect (sigc::mem_fun (this, &PanelMenuView::OnEntryAdded));
65 _proxy->OnEntryMoved.connect (sigc::mem_fun (this, &PanelMenuView::OnEntryMoved));