From 72aed14a633f22040984d9fec3cf2b4021651a6e Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 3 Jun 2007 20:08:02 +0000 Subject: [PATCH] fixes for titlebar layouts, ellipsing and button placement by syscrash --- src/preview.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/preview.c b/src/preview.c index 1869dff..9127e97 100644 --- a/src/preview.c +++ b/src/preview.c @@ -356,7 +356,7 @@ static GdkPixbuf* preview_window(RrTheme *theme, const gchar *titlelayout, a->surface.parent = title; a->surface.parentx = x - theme->fbwidth; - a->surface.parenty = theme->paddingy; + a->surface.parenty = theme->paddingy + 1; w = theme->button_size; h = theme->button_size; @@ -473,15 +473,15 @@ static gint theme_label_width(RrTheme *theme, gboolean active) static gint theme_window_min_width(RrTheme *theme, const gchar *titlelayout) { gint numbuttons = strlen(titlelayout); - gint w = 2 * (theme->fbwidth + theme->paddingx + 1); + gint w = 2 * theme->fbwidth + (numbuttons + 3) * (theme->paddingx + 1); if (g_strrstr(titlelayout, "L")) { numbuttons--; w += MAX(theme_label_width(theme, TRUE), - theme_label_width(theme, FALSE)) + theme->paddingx + 1; + theme_label_width(theme, FALSE)); } - w += (theme->button_size + theme->paddingx + 1) * numbuttons; + w += theme->button_size * numbuttons; return w; } -- 2.39.2