summaryrefslogtreecommitdiff
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2014-07-09 12:53:43 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2014-07-09 12:53:43 +0200
commitf6925df5deb809c961fe82e3ca14b51a8a2ae3f5 (patch)
tree6337d871162bee617ed4268682f95bf4d961a0e0
parentbde419b7cbf47e8ea991f135d4d86030fa5befff (diff)
DashView, HudView, SpreadFilter: adapt to the SearchBar changes
(bzr r3830.5.3)
-rw-r--r--dash/DashView.cpp5
-rw-r--r--hud/HudView.cpp4
-rw-r--r--unity-shared/SpreadFilter.cpp4
3 files changed, 2 insertions, 11 deletions
diff --git a/dash/DashView.cpp b/dash/DashView.cpp
index 78df439bf..b9564cd9e 100644
--- a/dash/DashView.cpp
+++ b/dash/DashView.cpp
@@ -606,12 +606,7 @@ void DashView::UpdateDashViewSize()
layout_->SetTopAndBottomPadding(style.GetHSeparatorSize().CP(scale), 0);
content_layout_->SetTopAndBottomPadding(style.GetDashViewTopPadding().CP(scale), 0);
-
search_bar_layout_->SetLeftAndRightPadding(style.GetSearchBarLeftPadding().CP(scale), 0);
-
- int search_bar_height = style.GetSearchBarHeight().CP(scale);
- search_bar_->SetMinimumHeight(search_bar_height);
- search_bar_->SetMaximumHeight(search_bar_height);
}
void DashView::SetupUBusConnections()
diff --git a/hud/HudView.cpp b/hud/HudView.cpp
index 035a30c9f..ce06b1de5 100644
--- a/hud/HudView.cpp
+++ b/hud/HudView.cpp
@@ -367,8 +367,6 @@ void View::AboutToHide()
void View::SetupViews()
{
- dash::Style& style = dash::Style::Instance();
-
nux::VLayout* super_layout = new nux::VLayout();
layout_ = new nux::HLayout();
{
@@ -388,8 +386,6 @@ void View::SetupViews()
// add the search bar to the composite
search_bar_ = new unity::SearchBar(true);
- search_bar_->SetMinimumHeight(style.GetSearchBarHeight());
- search_bar_->SetMaximumHeight(style.GetSearchBarHeight());
search_bar_->search_hint = _("Type your command");
search_bar_->live_search_reached.connect(sigc::mem_fun(this, &View::OnSearchChanged));
AddChild(search_bar_.GetPointer());
diff --git a/unity-shared/SpreadFilter.cpp b/unity-shared/SpreadFilter.cpp
index 031ae7e1f..da01d0d0b 100644
--- a/unity-shared/SpreadFilter.cpp
+++ b/unity-shared/SpreadFilter.cpp
@@ -38,7 +38,6 @@ const unsigned DEFAULT_SEARCH_WAIT = 300;
const RawPixel OFFSET_X = 10_em;
const RawPixel OFFSET_Y = 15_em;
const RawPixel WIDTH = 620_em;
-const RawPixel HEIGHT = 42_em;
// For some reason std::to_lower or boost::to_lower_copy doesn't seem to handle well utf8
std::string casefold_copy(std::string const& str)
@@ -58,7 +57,8 @@ Filter::Filter()
auto const& cv = settings.em(monitor);
search_bar_ = SearchBar::Ptr(new SearchBar());
- search_bar_->SetMinMaxSize(WIDTH.CP(cv), HEIGHT.CP(cv));
+ search_bar_->SetMinimumWidth(WIDTH.CP(cv));
+ search_bar_->SetMaximumWidth(WIDTH.CP(cv));
search_bar_->scale = cv->DPIScale();
search_bar_->live_search_wait = DEFAULT_SEARCH_WAIT;
text.SetGetterFunction([this] { return search_bar_->search_string(); });