summaryrefslogtreecommitdiff
diff options
-rw-r--r--unity-shared/SearchBar.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/unity-shared/SearchBar.cpp b/unity-shared/SearchBar.cpp
index d9a16a3fe..2bc4c3aa2 100644
--- a/unity-shared/SearchBar.cpp
+++ b/unity-shared/SearchBar.cpp
@@ -150,6 +150,7 @@ SearchBar::SearchBar(bool show_filter_hint, NUX_FILE_LINE_DECL)
layout_->AddLayout(entry_layout_);
spinner_ = new SearchBarSpinner();
+ spinner_->scale = scale();
spinner_->mouse_click.connect(sigc::mem_fun(this, &SearchBar::OnClearClicked));
entry_layout_->AddView(spinner_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
@@ -288,11 +289,6 @@ SearchBar::SearchBar(bool show_filter_hint, NUX_FILE_LINE_DECL)
void SearchBar::UpdateSearchBarSize()
{
- dash::Style& style = dash::Style::Instance();
- nux::BaseTexture* icon = style.GetSearchMagnifyIcon();
- RawPixel const icon_width = icon->GetWidth();
- RawPixel const icon_height = icon->GetHeight();
-
layout_->SetLeftAndRightPadding(LEFT_INTERNAL_PADDING.CP(scale()),
SEARCH_ENTRY_RIGHT_BORDER.CP(scale()));
layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_ENTRY_AND_HIGHLIGHT.CP(scale()));
@@ -300,7 +296,6 @@ void SearchBar::UpdateSearchBarSize()
entry_layout_->SetLeftAndRightPadding(LEFT_PADDING.CP(scale()),
RIGHT_PADDING.CP(scale()));
- spinner_->SetMinMaxSize(icon_width.CP(scale()), icon_height.CP(scale()));
entry_layout_->SetSpaceBetweenChildren(SPACE_BETWEEN_SPINNER_AND_TEXT.CP(scale()));
pango_entry_->SetFontSize(PANGO_ENTRY_FONT_SIZE.CP(scale()));
@@ -332,6 +327,7 @@ void SearchBar::UpdateSearchBarSize()
void SearchBar::UpdateScale(double scale)
{
hint_->SetScale(scale);
+ spinner_->scale = scale;
if (show_filters_)
show_filters_->SetScale(scale);