From db51b7d575599f55fe0e743be0d95427db5426ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pawe=C5=82=20Forysiuk?= Date: Thu, 10 Nov 2011 22:24:21 +0100 Subject: [PATCH] Center speed dial via percentual margin --- midori/midori-view.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/midori/midori-view.c b/midori/midori-view.c index 6731d222..f064ce41 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -3710,6 +3710,12 @@ prepare_speed_dial_html (MidoriView* view) sokoke_is_app_or_private () ? "" : "", slot_size + 1, slot_size - 4); + /* Combined width of slots should always be less than 100%. + * Use half of the remaining percentage as a margin size */ + g_string_append_printf (markup, + "", + (100 - ((slot_size - 4) * grid_index)) / 2); + if (katze_object_get_boolean (view->settings, "close-buttons-left")) g_string_append_printf (markup, ""); -- 2.39.5