From ecd7b21e1303dcca1b7aa1741fef9d449d56000a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 22 Dec 2015 19:12:18 +0100 Subject: DashController: cleanup setting monitor offset (bzr r3999.8.6) --- dash/DashController.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'dash') diff --git a/dash/DashController.cpp b/dash/DashController.cpp index 2d2799654..26c636676 100644 --- a/dash/DashController.cpp +++ b/dash/DashController.cpp @@ -260,13 +260,13 @@ void Controller::Relayout(bool check_monitor) view_->Relayout(); window_->SetGeometry(geo); + + 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_)); } void Controller::OnMouseDownOutsideWindow(int x, int y, -- cgit v1.2.3