summaryrefslogtreecommitdiff
diff options
-rw-r--r--launcher/Launcher.cpp9
-rw-r--r--launcher/Launcher.h2
-rw-r--r--unity-shared/IconRenderer.cpp2
-rw-r--r--unity-shared/UnitySettings.cpp1
4 files changed, 9 insertions, 5 deletions
diff --git a/launcher/Launcher.cpp b/launcher/Launcher.cpp
index 04e6612b0..ee9d31ff1 100644
--- a/launcher/Launcher.cpp
+++ b/launcher/Launcher.cpp
@@ -189,6 +189,10 @@ Launcher::Launcher(MockableBaseWindow* parent,
options.changed.connect(sigc::mem_fun(this, &Launcher::OnOptionsChanged));
monitor.changed.connect(sigc::mem_fun(this, &Launcher::OnMonitorChanged));
+ launcher_position_changed_ = unity::Settings::Instance().launcher_position.changed.connect([this] (LauncherPosition) {
+ OnMonitorChanged(monitor);
+ QueueDraw();
+ });
unity::Settings::Instance().dpi_changed.connect(sigc::mem_fun(this, &Launcher::OnDPIChanged));
@@ -1343,9 +1347,7 @@ void Launcher::OnMonitorChanged(int new_monitor)
auto monitor_geo = uscreen->GetMonitorGeometry(new_monitor);
unity::panel::Style &panel_style = panel::Style::Instance();
int panel_height = panel_style.PanelHeight(new_monitor);
-// int launcher_height = unity::Settings::Instance().LauncherSize(new_monitor);
- int launcher_height = icon_size_ + ICON_PADDING * 2 + RIGHT_LINE_WIDTH - 2;
- //Todo: Get wrong height , need investigate
+ int launcher_height = unity::Settings::Instance().LauncherSize(new_monitor);
cv_ = unity::Settings::Instance().em(monitor);
if (Settings::Instance().launcher_position() == LauncherPosition::LEFT)
@@ -1364,6 +1366,7 @@ void Launcher::UpdateOptions(Options::Ptr options)
SetHideMode(options->hide_mode);
SetScrollInactiveIcons(options->scroll_inactive_icons);
SetLauncherMinimizeWindow(options->minimize_window_on_click);
+ OnMonitorChanged(monitor);
if (model_)
{
diff --git a/launcher/Launcher.h b/launcher/Launcher.h
index 5847b1394..43d659271 100644
--- a/launcher/Launcher.h
+++ b/launcher/Launcher.h
@@ -368,6 +368,8 @@ private:
BaseTexturePtr launcher_pressure_effect_;
BackgroundEffectHelper bg_effect_helper_;
+ connection::Wrapper launcher_position_changed_;
+
nux::animation::AnimateValue<float> auto_hide_animation_;
nux::animation::AnimateValue<float> hover_animation_;
nux::animation::AnimateValue<float> drag_over_animation_;
diff --git a/unity-shared/IconRenderer.cpp b/unity-shared/IconRenderer.cpp
index 4e1b2b45c..b688a62eb 100644
--- a/unity-shared/IconRenderer.cpp
+++ b/unity-shared/IconRenderer.cpp
@@ -1109,7 +1109,7 @@ void IconRenderer::RenderIndicators(nux::GraphicsEngine& GfxContext,
}
int markerY = 0;
- if (Settings::Instance().launcher_position() == LauncherPosition::LEFT)
+ if (Settings::Instance().launcher_position() == LauncherPosition::BOTTOM)
{
if (pip_style == OUTSIDE_TILE)
{
diff --git a/unity-shared/UnitySettings.cpp b/unity-shared/UnitySettings.cpp
index 12fff7625..351981c2c 100644
--- a/unity-shared/UnitySettings.cpp
+++ b/unity-shared/UnitySettings.cpp
@@ -114,7 +114,6 @@ public:
signals_.Add<void, GSettings*, const gchar*>(usettings_, "changed::" + LAUNCHER_POSITION, [this] (GSettings*, const gchar*) {
CacheLauncherPosition();
parent_->launcher_position.changed.emit(cached_launcher_position_);
- std::cout << "Unitysettings position changed: " << static_cast<int>(Settings::Instance().launcher_position()) << std::endl;
});
signals_.Add<void, GSettings*, const gchar*>(ubuntu_ui_settings_, "changed::" + SCALE_FACTOR, [this] (GSettings*, const gchar* t) {