summaryrefslogtreecommitdiff
diff options
authorNeil Jagdish Patel <neil.patel@canonical.com>2011-04-07 14:17:52 +0100
committerNeil Jagdish Patel <neil.patel@canonical.com>2011-04-07 14:17:52 +0100
commit64dddd0e381669fd2ae6965b7cb64427f221beb1 (patch)
treec3da7a42e0b89b1daee44599c9b9733724df5595
parentaf19fe17d456f6f168ce6c365ac887846931110d (diff)
Fix sizing of the floating dash
(bzr r1065.1.12)
-rw-r--r--src/PlacesController.cpp2
-rw-r--r--src/PlacesSettings.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/PlacesController.cpp b/src/PlacesController.cpp
index cb0cbc81c..d4366583b 100644
--- a/src/PlacesController.cpp
+++ b/src/PlacesController.cpp
@@ -252,7 +252,7 @@ PlacesController::GetWindowSize (int *out_width, int *out_height)
width += tile_width;
width = MAX (width, tile_width * 7);
- height = ((width/tile_width) - 3) * tile_width;
+ height = MIN (rect.height, (style->GetTileHeight () * 5.5) + 12);
_view->SetSizeMode (PlacesView::SIZE_MODE_HOVER);
style->SetDefaultNColumns (6);
diff --git a/src/PlacesSettings.cpp b/src/PlacesSettings.cpp
index 030678a0c..c20d54e30 100644
--- a/src/PlacesSettings.cpp
+++ b/src/PlacesSettings.cpp
@@ -20,6 +20,7 @@
#include "gdk/gdk.h"
#include "PlacesSettings.h"
+#include "PlacesStyle.h"
#define HOME_EXPANDED "home-expanded"
@@ -91,8 +92,7 @@ PlacesSettings::GetFormFactor ()
int
PlacesSettings::GetDefaultTileWidth ()
{
- //FIXME: We want to calculate this from DPI
- return 140;
+ return PlacesStyle::GetDefault ()->GetTileWidth ();
}
PlacesSettings::DashBlurType