summaryrefslogtreecommitdiff
path: root/unity-shared
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2014-07-07 23:24:41 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2014-07-07 23:24:41 +0200
commit90b26d16cde10694648b1e0a8dc674e942bc80ba (patch)
tree3230bcbc6ab7ab00710ce3e96c6d44a524f61f02 /unity-shared
parent83e0192abbdf6f7713a0e96e366f77fc7af5b861 (diff)
SearchBar: set the spinner scaling
(bzr r3830.3.26)
Diffstat (limited to 'unity-shared')
-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);