changeset 2971:1db413cb4437 trunk

revise padding logic
author Tomasz Mon <desowin@gmail.com>
date Tue, 03 Jul 2007 12:08:25 +0200
parents 92d67946e974
children 3298ebb6f5db
files src/audacious/ui_skinned_textbox.c
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_skinned_textbox.c	Mon Jul 02 21:43:30 2007 +0900
+++ b/src/audacious/ui_skinned_textbox.c	Tue Jul 03 12:08:25 2007 +0200
@@ -717,19 +717,22 @@
 
     priv->is_scrollable = ui_skinned_textbox_should_scroll(textbox);
 
-    if (!priv->is_scrollable && !priv->font && length <= wl) {
+    if (priv->is_scrollable) {
+        if(!cfg.twoway_scroll) {
+            pixmaptext = g_strdup_printf("%s *** ", priv->pixmap_text);
+            length += 5;
+        } else
+            pixmaptext = g_strdup(priv->pixmap_text);
+    } else
+    if (!priv->font && length <= wl) {
         gint pad = wl - length;
         gchar *padchars = g_strnfill(pad, ' ');
 
         pixmaptext = g_strconcat(priv->pixmap_text, padchars, NULL);
         g_free(padchars);
         length += pad;
-    } else {
-        if(!cfg.twoway_scroll && priv->is_scrollable)
-            pixmaptext = g_strdup_printf("%s *** ", priv->pixmap_text);
-        else
-            pixmaptext = g_strdup(priv->pixmap_text);
-    }
+    } else
+        pixmaptext = g_strdup(priv->pixmap_text);
 
     if (priv->is_scrollable) {
         if (priv->scroll_enabled && !priv->scroll_timeout) {