[gedit] Leave some right padding on the statusbar



commit fd3d8a3224a9cd323067c6e59f9d9ebf95756cea
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Apr 9 16:48:11 2011 +0200

    Leave some right padding on the statusbar
    
    Some changes in gtk3 seem to have affected how labels inside our
    statusbar are sized. With this change we at least leave some right
    padding so that INS does not end up at the screen edge when the window
    is maximized.

 gedit/gedit-statusbar.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gedit/gedit-statusbar.c b/gedit/gedit-statusbar.c
index 246bab4..e3909eb 100644
--- a/gedit/gedit-statusbar.c
+++ b/gedit/gedit-statusbar.c
@@ -66,13 +66,14 @@ G_DEFINE_TYPE(GeditStatusbar, gedit_statusbar, GTK_TYPE_STATUSBAR)
 static gchar *
 get_overwrite_mode_string (gboolean overwrite)
 {
-	return g_strconcat ("  ", overwrite ? _("OVR") :  _("INS"), NULL);
+	/* Use spaces to leave padding proportional to the font size */
+	return g_strdup_printf ("  %s  ", overwrite ? _("OVR") : _("INS"));
 }
 
 static gint
 get_overwrite_mode_length (void)
 {
-	return 2 + MAX (g_utf8_strlen (_("OVR"), -1), g_utf8_strlen (_("INS"), -1));
+	return 4 + MAX (g_utf8_strlen (_("OVR"), -1), g_utf8_strlen (_("INS"), -1));
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]