summaryrefslogtreecommitdiff
path: root/dash
diff options
authorhandsome_feng <445865575@qq.com>2016-03-17 15:36:44 +0800
committerhandsome_feng <445865575@qq.com>2016-03-17 15:36:44 +0800
commita0954e522419b97c941a93dc17ea43ec69ab7b52 (patch)
treeb1b8f218f25d80d56176d507d70f69ca9368b86f /dash
parent205b9beb8d882179e8d31fd393f7b5eea24d0a40 (diff)
parent6cae0ec593521ce5cc638ec4a975be2af283f1a2 (diff)
merge trunk
(bzr r4067.4.16)
Diffstat (limited to 'dash')
-rw-r--r--dash/DashController.cpp11
-rw-r--r--dash/FilterBasicButton.cpp1
-rw-r--r--dash/ResultRendererTile.cpp6
3 files changed, 8 insertions, 10 deletions
diff --git a/dash/DashController.cpp b/dash/DashController.cpp
index b55cf3ecc..1fa25628a 100644
--- a/dash/DashController.cpp
+++ b/dash/DashController.cpp
@@ -230,22 +230,22 @@ int Controller::GetIdealMonitor()
nux::Geometry Controller::GetIdealWindowGeometry()
{
UScreen *uscreen = UScreen::GetDefault();
- auto ideal_geo = uscreen->GetMonitorGeometry(GetIdealMonitor());
+ auto monitor_geo = uscreen->GetMonitorGeometry(GetIdealMonitor());
int launcher_size = unity::Settings::Instance().LauncherSize(monitor_);
// We want to cover as much of the screen as possible to grab any mouse events outside
// of our window
if (Settings::Instance().launcher_position() == LauncherPosition::LEFT)
{
- ideal_geo.x += launcher_size;
- ideal_geo.width -= launcher_size;
+ monitor_geo.x += launcher_size;
+ monitor_geo.width -= launcher_size;
}
else
{
- ideal_geo.height -= launcher_size;
+ monitor_geo.height -= launcher_size;
}
- return ideal_geo;
+ return monitor_geo;
}
void Controller::OnMonitorChanged(int primary, std::vector<nux::Geometry> const& monitors)
@@ -350,7 +350,6 @@ bool Controller::ShowDash()
FocusWindow();
visible_ = true;
-
StartShowHideTimeline();
nux::Geometry const& view_content_geo = view_->GetContentGeometry();
diff --git a/dash/FilterBasicButton.cpp b/dash/FilterBasicButton.cpp
index 727be89dc..a1466a6ac 100644
--- a/dash/FilterBasicButton.cpp
+++ b/dash/FilterBasicButton.cpp
@@ -72,6 +72,7 @@ FilterBasicButton::FilterBasicButton(std::string const& label, nux::TextureArea*
scale.changed.connect(sigc::mem_fun(this, &FilterBasicButton::UpdateScale));
Settings::Instance().font_scaling.changed.connect(sigc::hide(sigc::mem_fun(this, &FilterBasicButton::InitTheme)));
+ Style::Instance().changed.connect(sigc::mem_fun(this, &FilterBasicButton::InitTheme));
}
void FilterBasicButton::InitTheme()
diff --git a/dash/ResultRendererTile.cpp b/dash/ResultRendererTile.cpp
index 83abd127e..602c85057 100644
--- a/dash/ResultRendererTile.cpp
+++ b/dash/ResultRendererTile.cpp
@@ -32,6 +32,7 @@
#include "unity-shared/DashStyle.h"
#include "unity-shared/TextureCache.h"
#include "unity-shared/UnitySettings.h"
+#include "unity-shared/ThemeSettings.h"
namespace unity
{
@@ -465,13 +466,10 @@ void ResultRendererTile::LoadText(Result const& row)
PangoFontDescription* desc = NULL;
PangoContext* pango_context = NULL;
GdkScreen* screen = gdk_screen_get_default(); // not ref'ed
- glib::String font;
-
- g_object_get(gtk_settings_get_default(), "gtk-font-name", &font, NULL);
cairo_set_font_options(cr, gdk_screen_get_font_options(screen));
layout = pango_cairo_create_layout(cr);
- desc = pango_font_description_from_string(font.Value());
+ desc = pango_font_description_from_string(theme::Settings::Get()->font().c_str());
pango_font_description_set_size (desc, FONT_SIZE * FONT_MULTIPLIER);
pango_layout_set_font_description(layout, desc);