[Xfce4-commits] [xfce/xfdesktop] 10/13: Center icons vertically in the grid (Bug #11086)

noreply at xfce.org noreply at xfce.org
Tue Mar 3 18:21:07 CET 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfdesktop.

commit 7f39f313895f4678f06f24519eab5486371f9360
Author: Thaddaeus Tintenfisch <thad.fisch at gmail.com>
Date:   Mon Mar 2 22:06:27 2015 +0100

    Center icons vertically in the grid (Bug #11086)
    
    Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
 src/xfdesktop-icon-view.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index a6a5cce..4670ac3 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -2810,7 +2810,7 @@ xfdesktop_icon_view_invalidate_icon_pixbuf(XfdesktopIconView *icon_view,
             return;
         
         rect.x += CELL_PADDING + ((CELL_SIZE - 2 * CELL_PADDING) - rect.width) / 2;
-        rect.y += CELL_PADDING;
+        rect.y += CELL_PADDING + (ICON_SIZE - rect.height) / 2;;
     
         if(gtk_widget_get_realized(GTK_WIDGET(icon_view))) {
             gtk_widget_queue_draw_area(GTK_WIDGET(icon_view), rect.x, rect.y,
@@ -3001,7 +3001,7 @@ xfdesktop_icon_view_update_icon_extents(XfdesktopIconView *icon_view,
         return FALSE;
     }
     pixbuf_extents->x += CELL_PADDING + ((CELL_SIZE - CELL_PADDING * 2) - pixbuf_extents->width) / 2;
-    pixbuf_extents->y += CELL_PADDING;
+    pixbuf_extents->y += CELL_PADDING + (ICON_SIZE - pixbuf_extents->height) / 2;
 
     if(!xfdesktop_icon_view_calculate_icon_text_area(icon_view, icon, text_extents))
         return FALSE;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list