[Xfce4-commits] <parole:master> Scrollbars fix

Sean Davis noreply at xfce.org
Fri Oct 11 11:50:30 CEST 2013


Updating branch refs/heads/master
         to 7478b8ba62276915e07d49859369faf760f8d9b0 (commit)
       from e7e93e678b6d07b99fb0dbb1004f0641889879fe (commit)

commit 7478b8ba62276915e07d49859369faf760f8d9b0
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Wed Aug 21 06:19:15 2013 -0400

    Scrollbars fix

 data/interfaces/parole.ui |    4 +---
 src/parole-player.c       |   12 +++++++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/data/interfaces/parole.ui b/data/interfaces/parole.ui
index 8658cde..ed87acf 100644
--- a/data/interfaces/parole.ui
+++ b/data/interfaces/parole.ui
@@ -456,8 +456,8 @@
                         <property name="use_underline">True</property>
                         <property name="image">image3</property>
                         <property name="use_stock">False</property>
-                        <accelerator key="equal" signal="activate"/>
                         <accelerator key="plus" signal="activate"/>
+                        <accelerator key="equal" signal="activate"/>
                         <signal name="activate" handler="parole_player_volume_up" swapped="no"/>
                       </object>
                     </child>
@@ -659,8 +659,6 @@
                           <object class="GtkScrolledWindow" id="logo_window">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="hscrollbar_policy">never</property>
-                            <property name="vscrollbar_policy">never</property>
                             <child>
                               <object class="GtkViewport" id="viewport1">
                                 <property name="visible">True</property>
diff --git a/src/parole-player.c b/src/parole-player.c
index 8b3f75e..d16997b 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -2783,13 +2783,18 @@ on_content_area_size_allocate (GtkWidget *widget, GtkAllocation *allocation, Par
 }
 
 static gboolean
+on_scrollbar_resize (GtkWidget *widget, GdkEventExpose *ev, ParolePlayer *player) {
+    player->priv->scale_logo = TRUE;
+    
+    gtk_widget_queue_draw (player->priv->logo_image);
+}
+
+static gboolean
 on_logo_draw (GtkWidget *widget, GdkEventExpose *ev, ParolePlayer *player) {
-    GtkWidget *parent;
     GtkAllocation *allocation = g_new0 (GtkAllocation, 1);
     static GdkPixbuf *pix = NULL;
     
-    parent = gtk_widget_get_parent(widget);
-    gtk_widget_get_allocation(parent, allocation);
+    gtk_widget_get_allocation(player->priv->logo_window, allocation);
     
     if (player->priv->scale_logo)
     {
@@ -3138,6 +3143,7 @@ parole_player_init (ParolePlayer *player)
 		      
     /* Background Image */
     player->priv->logo_window = GTK_WIDGET (gtk_builder_get_object (builder, "logo_window"));
+    g_signal_connect(player->priv->logo_window, "size-allocate", G_CALLBACK(on_scrollbar_resize), player);
     player->priv->logo = gdk_pixbuf_new_from_file (g_strdup_printf ("%s/parole.png", PIXMAPS_DIR), NULL);
     player->priv->logo_image = GTK_WIDGET (gtk_builder_get_object (builder, "logo"));
     g_signal_connect(player->priv->logo_image, "draw", G_CALLBACK(on_logo_draw), player);


More information about the Xfce4-commits mailing list