~azzar1/unity/hud-alt-space

« back to all changes in this revision

Viewing changes to unity-shared/SpreadFilter.cpp

  • Committer: CI Train Bot
  • Author(s): handsome_feng
  • Date: 2016-03-18 10:10:26 UTC
  • mfrom: (3999.7.28 unityshell-rotated-kylin)
  • Revision ID: ci-train-bot@canonical.com-20160318101026-8571jyv8ececmzai
Launcher: add Bottom mode, so that the launcher can be positioned horisontally Fixes: #1552630
Approved by: Marco Trevisan (Treviño)

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
  auto& settings = Settings::Instance();
56
56
  auto const& work_area = wm.GetWorkAreaGeometry(0);
57
57
  int monitor = wm.MonitorGeometryIn(work_area);
58
 
  int launcher_width = settings.LauncherWidth(monitor);
 
58
  int launcher_width = settings.LauncherSize(monitor);
59
59
  auto const& cv = settings.em(monitor);
60
60
 
61
61
  search_bar_ = SearchBar::Ptr(new SearchBar());
81
81
  view_window_->SetOpacity(0.0f);
82
82
  view_window_->SetEnterFocusInputArea(search_bar_.GetPointer());
83
83
  view_window_->SetInputFocus();
84
 
  view_window_->SetXY(OFFSET_X.CP(cv) + std::max(work_area.x, launcher_width), OFFSET_Y.CP(cv) + work_area.y);
 
84
  if (Settings::Instance().launcher_position() == LauncherPosition::LEFT)
 
85
    view_window_->SetXY(OFFSET_X.CP(cv) + std::max(work_area.x, launcher_width), OFFSET_Y.CP(cv) + work_area.y);
 
86
  else
 
87
    view_window_->SetXY(OFFSET_X.CP(cv) + work_area.x, OFFSET_Y.CP(cv) + work_area.y);
85
88
  fade_animator_.updated.connect([this] (double opacity) { view_window_->SetOpacity(opacity); });
86
89
 
87
90
  nux::GetWindowCompositor().SetKeyFocusArea(search_bar_->text_entry());