Merge lp:~azzar1/unity/fix-841907 into lp:unity

Proposed by Andrea Azzarone
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 2191
Proposed branch: lp:~azzar1/unity/fix-841907
Merge into: lp:unity
Diff against target: 348 lines (+45/-70)
7 files modified
plugins/unityshell/src/DashStyle.cpp (+1/-1)
plugins/unityshell/src/DashStyle.h (+0/-2)
plugins/unityshell/src/DashView.cpp (+5/-5)
plugins/unityshell/src/FilterBar.cpp (+1/-1)
plugins/unityshell/src/HudView.cpp (+4/-5)
plugins/unityshell/src/SearchBar.cpp (+32/-52)
plugins/unityshell/src/SearchBar.h (+2/-4)
To merge this branch: bzr merge lp:~azzar1/unity/fix-841907
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Andrea Cimitan (community) design Approve
Review via email: mp+99541@code.launchpad.net

Commit message

Makes the dash search entry horizontally extensible.

Description of the change

== Problem ==
The Dash search box should expand horizontally when the Dash switches to full screen mode

== Fix ==
Don't use a fixed width for the search bar but let's use nux layout sytem. I'd like to make the search entry a completely different widget but it's too late now.

== Test ==
Not applicable. It's a visual change and we just need design review.

== Screenshots ==
* http://ubuntuone.com/70SSXbKqoxAgsCBJIr93Am
* http://ubuntuone.com/4PPCiKC3JD1D9vmUJpDrVv
* http://ubuntuone.com/2ng5chy0faDhF3EYKgkxhr

To post a comment you must log in.
Revision history for this message
Omer Akram (om26er) wrote :

Aww man, I totally love u for this bug fix :-*

Revision history for this message
Andrea Cimitan (cimi) :
review: Approve (design)
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Cool, looks good, works well.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/unityshell/src/DashStyle.cpp'
--- plugins/unityshell/src/DashStyle.cpp 2012-03-21 14:18:06 +0000
+++ plugins/unityshell/src/DashStyle.cpp 2012-03-27 15:22:27 +0000
@@ -2235,7 +2235,7 @@
22352235
2236int Style::GetSpaceBetweenLensAndFilters() const2236int Style::GetSpaceBetweenLensAndFilters() const
2237{2237{
2238 return 9;2238 return 10;
2239}2239}
22402240
2241int Style::GetFilterViewRightPadding() const2241int Style::GetFilterViewRightPadding() const
22422242
=== modified file 'plugins/unityshell/src/DashStyle.h'
--- plugins/unityshell/src/DashStyle.h 2012-03-21 14:18:06 +0000
+++ plugins/unityshell/src/DashStyle.h 2012-03-27 15:22:27 +0000
@@ -228,8 +228,6 @@
228 int GetCategorySeparatorLeftPadding() const;228 int GetCategorySeparatorLeftPadding() const;
229 int GetCategorySeparatorRightPadding() const;229 int GetCategorySeparatorRightPadding() const;
230230
231 const static int SEARCH_BAR_EXTRA_PADDING = 1;
232
233 sigc::signal<void> changed;231 sigc::signal<void> changed;
234232
235private:233private:
236234
=== modified file 'plugins/unityshell/src/DashView.cpp'
--- plugins/unityshell/src/DashView.cpp 2012-03-22 09:02:06 +0000
+++ plugins/unityshell/src/DashView.cpp 2012-03-27 15:22:27 +0000
@@ -176,17 +176,17 @@
176 SetLayout(layout_);176 SetLayout(layout_);
177177
178 content_layout_ = new DashLayout(NUX_TRACKER_LOCATION);178 content_layout_ = new DashLayout(NUX_TRACKER_LOCATION);
179 content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding() - style.SEARCH_BAR_EXTRA_PADDING, 0);179 content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding(), 0);
180 layout_->AddLayout(content_layout_, 1, nux::MINOR_POSITION_LEFT, nux::MINOR_SIZE_FULL);180 layout_->AddLayout(content_layout_, 1, nux::MINOR_POSITION_LEFT, nux::MINOR_SIZE_FULL);
181181
182 search_bar_layout_ = new nux::HLayout();182 search_bar_layout_ = new nux::HLayout();
183 search_bar_layout_->SetLeftAndRightPadding(style.GetSearchBarLeftPadding() - style.SEARCH_BAR_EXTRA_PADDING, style.GetSearchBarLeftPadding() - style.GetFilterResultsHighlightRightPadding() - style.SEARCH_BAR_EXTRA_PADDING);183 search_bar_layout_->SetLeftAndRightPadding(style.GetSearchBarLeftPadding(), 0);
184 content_layout_->AddLayout(search_bar_layout_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);184 content_layout_->AddLayout(search_bar_layout_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
185185
186 search_bar_ = new SearchBar();186 search_bar_ = new SearchBar();
187 AddChild(search_bar_);187 AddChild(search_bar_);
188 search_bar_->SetMinimumHeight(style.GetSearchBarHeight() + style.SEARCH_BAR_EXTRA_PADDING * 2);188 search_bar_->SetMinimumHeight(style.GetSearchBarHeight());
189 search_bar_->SetMaximumHeight(style.GetSearchBarHeight() + style.SEARCH_BAR_EXTRA_PADDING * 2);189 search_bar_->SetMaximumHeight(style.GetSearchBarHeight());
190 search_bar_->activated.connect(sigc::mem_fun(this, &DashView::OnEntryActivated));190 search_bar_->activated.connect(sigc::mem_fun(this, &DashView::OnEntryActivated));
191 search_bar_->search_changed.connect(sigc::mem_fun(this, &DashView::OnSearchChanged));191 search_bar_->search_changed.connect(sigc::mem_fun(this, &DashView::OnSearchChanged));
192 search_bar_->live_search_reached.connect(sigc::mem_fun(this, &DashView::OnLiveSearchReached));192 search_bar_->live_search_reached.connect(sigc::mem_fun(this, &DashView::OnLiveSearchReached));
@@ -269,7 +269,7 @@
269269
270 width = MAX(width, tile_width * 6);270 width = MAX(width, tile_width * 6);
271271
272 width += 19 + 40; // add the left padding and the group plugin padding272 width += 20 + 40; // add the left padding and the group plugin padding
273273
274 height = search_bar_->GetGeometry().height;274 height = search_bar_->GetGeometry().height;
275 height += tile_height * 3;275 height += tile_height * 3;
276276
=== modified file 'plugins/unityshell/src/FilterBar.cpp'
--- plugins/unityshell/src/FilterBar.cpp 2012-03-21 14:18:06 +0000
+++ plugins/unityshell/src/FilterBar.cpp 2012-03-27 15:22:27 +0000
@@ -60,7 +60,7 @@
60 dash::Style& style = dash::Style::Instance();60 dash::Style& style = dash::Style::Instance();
6161
62 nux::LinearLayout* layout = new nux::VLayout(NUX_TRACKER_LOCATION);62 nux::LinearLayout* layout = new nux::VLayout(NUX_TRACKER_LOCATION);
63 layout->SetTopAndBottomPadding(style.GetFilterBarTopPadding() - style.GetFilterHighlightPadding() - style.SEARCH_BAR_EXTRA_PADDING);63 layout->SetTopAndBottomPadding(style.GetFilterBarTopPadding() - style.GetFilterHighlightPadding());
64 layout->SetSpaceBetweenChildren(style.GetSpaceBetweenFilterWidgets() - style.GetFilterHighlightPadding());64 layout->SetSpaceBetweenChildren(style.GetSpaceBetweenFilterWidgets() - style.GetFilterHighlightPadding());
65 SetLayout(layout);65 SetLayout(layout);
66}66}
6767
=== modified file 'plugins/unityshell/src/HudView.cpp'
--- plugins/unityshell/src/HudView.cpp 2012-03-21 15:07:29 +0000
+++ plugins/unityshell/src/HudView.cpp 2012-03-27 15:22:27 +0000
@@ -333,7 +333,7 @@
333333
334namespace334namespace
335{335{
336 const int top_spacing = 9;336 const int top_spacing = 11;
337 const int content_width = 941;337 const int content_width = 941;
338 const int icon_vertical_margin = 5;338 const int icon_vertical_margin = 5;
339 const int spacing_between_icon_and_content = 8;339 const int spacing_between_icon_and_content = 8;
@@ -369,10 +369,9 @@
369 content_layout_->AddLayout(new nux::SpaceLayout(top_spacing,top_spacing,top_spacing,top_spacing), 0);369 content_layout_->AddLayout(new nux::SpaceLayout(top_spacing,top_spacing,top_spacing,top_spacing), 0);
370370
371 // add the search bar to the composite371 // add the search bar to the composite
372 search_bar_ = new unity::SearchBar(content_width, true);372 search_bar_ = new unity::SearchBar(true);
373 search_bar_->disable_glow = true;373 search_bar_->SetMinimumHeight(style.GetSearchBarHeight());
374 search_bar_->SetMinimumHeight(style.GetSearchBarHeight() + style.SEARCH_BAR_EXTRA_PADDING * 2);374 search_bar_->SetMaximumHeight(style.GetSearchBarHeight());
375 search_bar_->SetMaximumHeight(style.GetSearchBarHeight() + style.SEARCH_BAR_EXTRA_PADDING * 2);
376 search_bar_->search_hint = default_text;375 search_bar_->search_hint = default_text;
377 search_bar_->search_changed.connect(sigc::mem_fun(this, &View::OnSearchChanged));376 search_bar_->search_changed.connect(sigc::mem_fun(this, &View::OnSearchChanged));
378 AddChild(search_bar_.GetPointer());377 AddChild(search_bar_.GetPointer());
379378
=== modified file 'plugins/unityshell/src/SearchBar.cpp'
--- plugins/unityshell/src/SearchBar.cpp 2012-03-21 18:37:19 +0000
+++ plugins/unityshell/src/SearchBar.cpp 2012-03-27 15:22:27 +0000
@@ -50,7 +50,9 @@
50const int SPINNER_TIMEOUT = 100;50const int SPINNER_TIMEOUT = 100;
5151
52const int SPACE_BETWEEN_SPINNER_AND_TEXT = 5;52const int SPACE_BETWEEN_SPINNER_AND_TEXT = 5;
53const int LEFT_INTERNAL_PADDING = 7;53const int SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT = 10;
54const int LEFT_INTERNAL_PADDING = 6;
55const int SEARCH_ENTRY_RIGHT_BORDER = 10;
5456
55const int HIGHLIGHT_HEIGHT = 24;57const int HIGHLIGHT_HEIGHT = 24;
5658
@@ -121,42 +123,23 @@
121 , search_hint("")123 , search_hint("")
122 , showing_filters(false)124 , showing_filters(false)
123 , can_refine_search(false)125 , can_refine_search(false)
124 , disable_glow(false)
125 , show_filter_hint_(true)126 , show_filter_hint_(true)
126 , expander_view_(nullptr)127 , expander_view_(nullptr)
127 , show_filters_(nullptr)128 , show_filters_(nullptr)
128 , search_bar_width_(621)
129 , live_search_timeout_(0)129 , live_search_timeout_(0)
130 , start_spinner_timeout_(0)130 , start_spinner_timeout_(0)
131{131{
132 Init();132 Init();
133}133}
134134
135SearchBar::SearchBar(int search_bar_width, bool show_filter_hint_, NUX_FILE_LINE_DECL)135SearchBar::SearchBar(bool show_filter_hint_, NUX_FILE_LINE_DECL)
136 : View(NUX_FILE_LINE_PARAM)136 : View(NUX_FILE_LINE_PARAM)
137 , search_hint("")137 , search_hint("")
138 , showing_filters(false)138 , showing_filters(false)
139 , can_refine_search(false)139 , can_refine_search(false)
140 , disable_glow(false)
141 , show_filter_hint_(show_filter_hint_)140 , show_filter_hint_(show_filter_hint_)
142 , expander_view_(nullptr)141 , expander_view_(nullptr)
143 , show_filters_(nullptr)142 , show_filters_(nullptr)
144 , search_bar_width_(search_bar_width)
145 , live_search_timeout_(0)
146 , start_spinner_timeout_(0)
147{
148 Init();
149}
150
151SearchBar::SearchBar(int search_bar_width, NUX_FILE_LINE_DECL)
152 : View(NUX_FILE_LINE_PARAM)
153 , search_hint("")
154 , showing_filters(false)
155 , can_refine_search(false)
156 , disable_glow(false)
157 , show_filter_hint_(true)
158 , expander_view_(nullptr)
159 , search_bar_width_(search_bar_width)
160 , live_search_timeout_(0)143 , live_search_timeout_(0)
161 , start_spinner_timeout_(0)144 , start_spinner_timeout_(0)
162{145{
@@ -165,25 +148,30 @@
165148
166void SearchBar::Init()149void SearchBar::Init()
167{150{
168 nux::BaseTexture* icon = dash::Style::Instance().GetSearchMagnifyIcon();151 dash::Style& style = dash::Style::Instance();
152 nux::BaseTexture* icon = style.GetSearchMagnifyIcon();
169153
170 bg_layer_ = new nux::ColorLayer(nux::Color(0xff595853), true);154 bg_layer_ = new nux::ColorLayer(nux::Color(0xff595853), true);
171155
172 layout_ = new nux::HLayout(NUX_TRACKER_LOCATION);156 layout_ = new nux::HLayout(NUX_TRACKER_LOCATION);
173 layout_->SetLeftAndRightPadding(LEFT_INTERNAL_PADDING, 10);157 layout_->SetLeftAndRightPadding(LEFT_INTERNAL_PADDING, SEARCH_ENTRY_RIGHT_BORDER);
174 layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_SPINNER_AND_TEXT);158 layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT);
175 SetLayout(layout_);159 SetLayout(layout_);
176160
161 entry_layout_ = new nux::HLayout(NUX_TRACKER_LOCATION);
162 entry_layout_->SetLeftAndRightPadding(0, 10);
163 layout_->AddLayout(entry_layout_);
164
177 spinner_ = new SearchBarSpinner();165 spinner_ = new SearchBarSpinner();
178 spinner_->SetMinMaxSize(icon->GetWidth(), icon->GetHeight());166 spinner_->SetMinMaxSize(icon->GetWidth(), icon->GetHeight());
179 spinner_->mouse_click.connect(sigc::mem_fun(this, &SearchBar::OnClearClicked));167 spinner_->mouse_click.connect(sigc::mem_fun(this, &SearchBar::OnClearClicked));
180 layout_->AddView(spinner_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);168 entry_layout_->AddView(spinner_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
169 entry_layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_SPINNER_AND_TEXT);
181170
182 nux::HLayout* hint_layout = new nux::HLayout(NUX_TRACKER_LOCATION);171 nux::HLayout* hint_layout = new nux::HLayout(NUX_TRACKER_LOCATION);
183172
184 hint_ = new nux::StaticCairoText(" ");173 hint_ = new nux::StaticCairoText(" ");
185 hint_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 0.5f));174 hint_->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, 0.5f));
186 hint_->SetMaximumWidth(search_bar_width_ - icon->GetWidth());
187 hint_->SetFont(HINT_LABEL_DEFAULT_FONT.c_str());175 hint_->SetFont(HINT_LABEL_DEFAULT_FONT.c_str());
188 hint_layout->AddView(hint_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);176 hint_layout->AddView(hint_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
189177
@@ -195,16 +183,13 @@
195 pango_entry_->cursor_moved.connect([&](int i) { QueueDraw(); });183 pango_entry_->cursor_moved.connect([&](int i) { QueueDraw(); });
196 pango_entry_->mouse_down.connect(sigc::mem_fun(this, &SearchBar::OnMouseButtonDown));184 pango_entry_->mouse_down.connect(sigc::mem_fun(this, &SearchBar::OnMouseButtonDown));
197 pango_entry_->end_key_focus.connect(sigc::mem_fun(this, &SearchBar::OnEndKeyFocus));185 pango_entry_->end_key_focus.connect(sigc::mem_fun(this, &SearchBar::OnEndKeyFocus));
198 pango_entry_->SetMaximumWidth(search_bar_width_ - 1.5 * icon->GetWidth());
199186
200 layered_layout_ = new nux::LayeredLayout();187 layered_layout_ = new nux::LayeredLayout();
201 layered_layout_->AddLayout(hint_layout);188 layered_layout_->AddLayout(hint_layout);
202 layered_layout_->AddLayer(pango_entry_);189 layered_layout_->AddLayer(pango_entry_);
203 layered_layout_->SetPaintAll(true);190 layered_layout_->SetPaintAll(true);
204 layered_layout_->SetActiveLayerN(1);191 layered_layout_->SetActiveLayerN(1);
205 layered_layout_->SetMinimumWidth(search_bar_width_);192 entry_layout_->AddView(layered_layout_, 1, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
206 layered_layout_->SetMaximumWidth(search_bar_width_);
207 layout_->AddView(layered_layout_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FIX);
208193
209 if (show_filter_hint_)194 if (show_filter_hint_)
210 {195 {
@@ -217,7 +202,7 @@
217 show_filters_->SetLines(1);202 show_filters_->SetLines(1);
218203
219 nux::BaseTexture* arrow;204 nux::BaseTexture* arrow;
220 arrow = dash::Style::Instance().GetGroupExpandIcon();205 arrow = style.GetGroupExpandIcon();
221 expand_icon_ = new IconTexture(arrow,206 expand_icon_ = new IconTexture(arrow,
222 arrow->GetWidth(),207 arrow->GetWidth(),
223 arrow->GetHeight());208 arrow->GetHeight());
@@ -227,6 +212,8 @@
227212
228 filter_layout_ = new nux::HLayout();213 filter_layout_ = new nux::HLayout();
229 filter_layout_->SetHorizontalInternalMargin(8);214 filter_layout_->SetHorizontalInternalMargin(8);
215 filter_layout_->SetLeftAndRightPadding(style.GetFilterResultsHighlightLeftPadding(), style.GetFilterResultsHighlightRightPadding());
216 filter_layout_->SetContentDistribution(nux::MAJOR_POSITION_END);
230 filter_layout_->AddView(show_filters_, 0, nux::MINOR_POSITION_CENTER);217 filter_layout_->AddView(show_filters_, 0, nux::MINOR_POSITION_CENTER);
231218
232 arrow_layout_ = new nux::VLayout();219 arrow_layout_ = new nux::VLayout();
@@ -238,16 +225,18 @@
238225
239 filter_layout_->AddView(arrow_layout_, 0, nux::MINOR_POSITION_CENTER);226 filter_layout_->AddView(arrow_layout_, 0, nux::MINOR_POSITION_CENTER);
240227
241 layout_->AddLayout(new nux::SpaceLayout(1, 10000, 0, 1), 1);
242
243 expander_view_ = new ExpanderView(NUX_TRACKER_LOCATION);228 expander_view_ = new ExpanderView(NUX_TRACKER_LOCATION);
244 expander_view_->SetVisible(false);229 expander_view_->SetVisible(false);
245 expander_view_->SetLayout(filter_layout_);230 expander_view_->SetLayout(filter_layout_);
246 layout_->AddView(expander_view_, 0, nux::MINOR_POSITION_RIGHT, nux::MINOR_SIZE_FULL);231 layout_->AddView(expander_view_, 0, nux::MINOR_POSITION_RIGHT, nux::MINOR_SIZE_FULL);
247232
248 // Fix bug #917047233 int width = style.GetFilterBarWidth() +
249 show_filters_->SetMaximumWidth(dash::Style::Instance().GetFilterBarWidth() - 60);234 style.GetFilterResultsHighlightLeftPadding() +
250 show_filters_->SetMinimumWidth(dash::Style::Instance().GetFilterBarWidth() - 60);235 style.GetFilterResultsHighlightRightPadding();
236
237 expander_view_->SetMaximumWidth(width);
238 expander_view_->SetMinimumWidth(width);
239 show_filters_->SetMaximumWidth(style.GetFilterBarWidth() - arrow_layout_->GetBaseWidth() - 8);
251240
252 // Lambda functions241 // Lambda functions
253 auto mouse_expand = [&](int, int, unsigned long, unsigned long)242 auto mouse_expand = [&](int, int, unsigned long, unsigned long)
@@ -293,15 +282,6 @@
293 expand_icon_->SetVisible(can_refine);282 expand_icon_->SetVisible(can_refine);
294 }283 }
295 });284 });
296
297 disable_glow.changed.connect([&](bool disabled)
298 {
299 layout_->SetVerticalExternalMargin(0);
300 layout_->SetHorizontalExternalMargin(0);
301 UpdateBackground(true);
302 QueueDraw();
303 });
304
305}285}
306286
307SearchBar::~SearchBar()287SearchBar::~SearchBar()
@@ -426,13 +406,10 @@
426 {406 {
427 dash::Style& style = dash::Style::Instance();407 dash::Style& style = dash::Style::Instance();
428408
429 nux::Geometry geo(show_filters_->GetGeometry());409 nux::Geometry geo(expander_view_->GetGeometry());
430 nux::Geometry const& geo_arrow = arrow_layout_->GetGeometry();
431410
432 geo.y -= (HIGHLIGHT_HEIGHT- geo.height) / 2;411 geo.y -= (HIGHLIGHT_HEIGHT- geo.height) / 2;
433 geo.height = HIGHLIGHT_HEIGHT;412 geo.height = HIGHLIGHT_HEIGHT;
434 geo.width = style.GetFilterBarWidth() + style.GetFilterBarLeftPadding() + style.GetFilterBarRightPadding();
435 geo.x = geo_arrow.x + (geo_arrow.width - 1) - geo.width + style.GetFilterBarLeftPadding();
436413
437 if (!highlight_layer_)414 if (!highlight_layer_)
438 highlight_layer_.reset(style.FocusOverlay(geo.width, geo.height));415 highlight_layer_.reset(style.FocusOverlay(geo.width, geo.height));
@@ -514,7 +491,10 @@
514{491{
515 int RADIUS = 5;492 int RADIUS = 5;
516 nux::Geometry geo(GetGeometry());493 nux::Geometry geo(GetGeometry());
517 geo.width = layered_layout_->GetGeometry().width;494 geo.width = layered_layout_->GetAbsoluteX() +
495 layered_layout_->GetAbsoluteWidth() -
496 GetAbsoluteX() +
497 SEARCH_ENTRY_RIGHT_BORDER;
518498
519 LOG_DEBUG(logger) << "height: "499 LOG_DEBUG(logger) << "height: "
520 << geo.height << " - "500 << geo.height << " - "
@@ -534,9 +514,9 @@
534514
535 cairo_graphics.DrawRoundedRectangle(cr,515 cairo_graphics.DrawRoundedRectangle(cr,
536 1.0f,516 1.0f,
537 1 + 0.5, 1 + 0.5,517 0.5, 0.5,
538 RADIUS,518 RADIUS,
539 last_width_ - 1 - 2, last_height_ - 1 - 2,519 last_width_ - 1, last_height_ - 1,
540 false);520 false);
541521
542 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);522 cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
543523
=== modified file 'plugins/unityshell/src/SearchBar.h'
--- plugins/unityshell/src/SearchBar.h 2012-03-14 06:24:18 +0000
+++ plugins/unityshell/src/SearchBar.h 2012-03-27 15:22:27 +0000
@@ -57,8 +57,7 @@
57public:57public:
58 typedef nux::ObjectPtr<SearchBar> Ptr;58 typedef nux::ObjectPtr<SearchBar> Ptr;
59 SearchBar(NUX_FILE_LINE_PROTO);59 SearchBar(NUX_FILE_LINE_PROTO);
60 SearchBar(int search_width, bool show_filter_hint, NUX_FILE_LINE_PROTO);60 SearchBar(bool show_filter_hint, NUX_FILE_LINE_PROTO);
61 SearchBar(int search_width, NUX_FILE_LINE_PROTO);
62 ~SearchBar();61 ~SearchBar();
6362
64 void SearchFinished();63 void SearchFinished();
@@ -69,7 +68,6 @@
69 nux::Property<std::string> search_hint;68 nux::Property<std::string> search_hint;
70 nux::Property<bool> showing_filters;69 nux::Property<bool> showing_filters;
71 nux::Property<bool> can_refine_search;70 nux::Property<bool> can_refine_search;
72 nux::Property<bool> disable_glow;
73 nux::ROProperty<bool> im_active;71 nux::ROProperty<bool> im_active;
7472
75 sigc::signal<void> activated;73 sigc::signal<void> activated;
@@ -115,6 +113,7 @@
115 nux::AbstractPaintLayer* bg_layer_;113 nux::AbstractPaintLayer* bg_layer_;
116 std::unique_ptr<nux::AbstractPaintLayer> highlight_layer_;114 std::unique_ptr<nux::AbstractPaintLayer> highlight_layer_;
117 nux::HLayout* layout_;115 nux::HLayout* layout_;
116 nux::HLayout* entry_layout_;
118 nux::LayeredLayout* layered_layout_;117 nux::LayeredLayout* layered_layout_;
119 nux::StaticCairoText* hint_;118 nux::StaticCairoText* hint_;
120 nux::LinearLayout* expander_layout_;119 nux::LinearLayout* expander_layout_;
@@ -126,7 +125,6 @@
126 nux::SpaceLayout* arrow_top_space_;125 nux::SpaceLayout* arrow_top_space_;
127 nux::SpaceLayout* arrow_bottom_space_;126 nux::SpaceLayout* arrow_bottom_space_;
128 IconTexture* expand_icon_;127 IconTexture* expand_icon_;
129 int search_bar_width_;
130128
131 int last_width_;129 int last_width_;
132 int last_height_;130 int last_height_;