summaryrefslogtreecommitdiff
path: root/dash
diff options
authorhandsome_feng <445865575@qq.com>2015-12-23 17:29:24 +0800
committerhandsome_feng <445865575@qq.com>2015-12-23 17:29:24 +0800
commit39d1e3b03e20ac6789d37278ce6510147e61e8ea (patch)
tree0a1661b3d9b4a1240ef8888cee24ca53ae96e87a /dash
parent2432f4191405393ca5272008b4306aea7296e311 (diff)
cleanups
(bzr r3999.7.16)
Diffstat (limited to 'dash')
-rw-r--r--dash/DashController.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/dash/DashController.cpp b/dash/DashController.cpp
index 26c636676..4bbc58f0a 100644
--- a/dash/DashController.cpp
+++ b/dash/DashController.cpp
@@ -325,15 +325,13 @@ bool Controller::ShowDash()
EnsureDash();
monitor_ = GetIdealMonitor();
screen_ungrabbed_slot_->disconnect();
+
+ int horizontal_offset = 0;
+
if (Settings::Instance().launcher_position() == LauncherPosition::LEFT)
- {
- int launcher_width = unity::Settings::Instance().LauncherSize(monitor_);
- view_->SetMonitorOffset(launcher_width, panel::Style::Instance().PanelHeight(monitor_));
- }
- else
- {
- view_->SetMonitorOffset(0, panel::Style::Instance().PanelHeight(monitor_));
- }
+ horizontal_offset = unity::Settings::Instance().LauncherSize(monitor_);
+
+ view_->SetMonitorOffset(horizontal_offset, panel::Style::Instance().PanelHeight(monitor_));
view_->AboutToShow(monitor_);
FocusWindow();