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
=== modified file 'src/PanelIndicatorObjectEntryView.h'
--- src/PanelIndicatorObjectEntryView.h 2011-01-20 12:48:09 +0000
+++ src/PanelIndicatorObjectEntryView.h 2011-01-25 15:49:09 +0000
@@ -30,7 +30,6 @@
30#include "Introspectable.h"30#include "Introspectable.h"
3131
32#define PANEL_HEIGHT 2432#define PANEL_HEIGHT 24
33//#define PADDING 6
34#define SPACING 333#define SPACING 3
3534
36class PanelIndicatorObjectEntryView : public nux::TextureArea, public Introspectable35class PanelIndicatorObjectEntryView : public nux::TextureArea, public Introspectable
3736
=== modified file 'src/PanelIndicatorObjectView.cpp'
--- src/PanelIndicatorObjectView.cpp 2010-12-17 14:07:11 +0000
+++ src/PanelIndicatorObjectView.cpp 2011-01-25 15:49:09 +0000
@@ -43,10 +43,14 @@
43 _proxy (proxy),43 _proxy (proxy),
44 _entries ()44 _entries ()
45{45{
46 printf ("IndicatorAdded: %s\n", _proxy->GetName ().c_str ());46 g_debug ("IndicatorAdded: %s", _proxy->GetName ().c_str ());
47 _layout = new nux::HLayout ("", NUX_TRACKER_LOCATION);47 _layout = new nux::HLayout ("", NUX_TRACKER_LOCATION);
4848
49 SetCompositionLayout (_layout);49 SetCompositionLayout (_layout);
50
51 // default in Nux is 32, we have some PanelIndicatorObjectEntryView which are smaller than that.
52 // so redefining the minimum value for them.
53 SetMinimumWidth (MINIMUM_INDICATOR_WIDTH);
50 54
51 _proxy->OnEntryAdded.connect (sigc::mem_fun (this, &PanelIndicatorObjectView::OnEntryAdded));55 _proxy->OnEntryAdded.connect (sigc::mem_fun (this, &PanelIndicatorObjectView::OnEntryAdded));
52 _proxy->OnEntryMoved.connect (sigc::mem_fun (this, &PanelIndicatorObjectView::OnEntryMoved));56 _proxy->OnEntryMoved.connect (sigc::mem_fun (this, &PanelIndicatorObjectView::OnEntryMoved));
@@ -84,7 +88,7 @@
84{88{
85 PanelIndicatorObjectEntryView *view = new PanelIndicatorObjectEntryView (proxy);89 PanelIndicatorObjectEntryView *view = new PanelIndicatorObjectEntryView (proxy);
86 _layout->AddView (view, 0, nux::eCenter, nux::eFull);90 _layout->AddView (view, 0, nux::eCenter, nux::eFull);
87 _layout->SetContentDistribution (nux::eStackLeft);91 _layout->SetContentDistribution (nux::eStackRight);
8892
89 _entries.push_back (view);93 _entries.push_back (view);
9094
9195
=== modified file 'src/PanelIndicatorObjectView.h'
--- src/PanelIndicatorObjectView.h 2010-12-17 14:07:11 +0000
+++ src/PanelIndicatorObjectView.h 2011-01-25 15:49:09 +0000
@@ -27,6 +27,8 @@
2727
28#include "Introspectable.h"28#include "Introspectable.h"
2929
30#define MINIMUM_INDICATOR_WIDTH 12
31
30class PanelIndicatorObjectView : public nux::View, public Introspectable32class PanelIndicatorObjectView : public nux::View, public Introspectable
31{33{
32public:34public:
3335
=== modified file 'src/PanelMenuView.cpp'
--- src/PanelMenuView.cpp 2011-01-20 13:45:55 +0000
+++ src/PanelMenuView.cpp 2011-01-25 15:49:09 +0000
@@ -117,7 +117,6 @@
117PanelMenuView::SetProxy (IndicatorObjectProxy *proxy)117PanelMenuView::SetProxy (IndicatorObjectProxy *proxy)
118{118{
119 _proxy = proxy;119 _proxy = proxy;
120 printf ("IndicatorAdded: %s\n", _proxy->GetName ().c_str ());
121120
122 _proxy->OnEntryAdded.connect (sigc::mem_fun (this, &PanelMenuView::OnEntryAdded));121 _proxy->OnEntryAdded.connect (sigc::mem_fun (this, &PanelMenuView::OnEntryAdded));
123 _proxy->OnEntryMoved.connect (sigc::mem_fun (this, &PanelMenuView::OnEntryMoved));122 _proxy->OnEntryMoved.connect (sigc::mem_fun (this, &PanelMenuView::OnEntryMoved));