[Xfce4-commits] <xfdesktop:master> Clear all pixels from drag highlight box (Bug 10450)
Eric Koegel
noreply at xfce.org
Fri Nov 1 05:22:01 CET 2013
Updating branch refs/heads/master
to 74797c73ab513258d796f77edb2908a0fba16bb3 (commit)
from 4e5cd1813862800c5d768d5ef59279b37adbdfc1 (commit)
commit 74797c73ab513258d796f77edb2908a0fba16bb3
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Thu Oct 31 20:49:40 2013 +0300
Clear all pixels from drag highlight box (Bug 10450)
Increase the length of the lines used to clear the drawing area
in xfdesktop_icon_view_clear_drag_highlight. This way there's no
artifacts left when the highlight box is supposed to be removed.
src/xfdesktop-icon-view.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c
index 345b400..f28e36a 100644
--- a/src/xfdesktop-icon-view.c
+++ b/src/xfdesktop-icon-view.c
@@ -1415,25 +1415,32 @@ xfdesktop_icon_view_clear_drag_highlight(XfdesktopIconView *icon_view,
if(0 == cell_highlight->width || 0 == cell_highlight->height)
return;
+ /* When dragging an icon a box is drawn to indicate the cell where the
+ * icon could be moved to if dropped. We need to clear that box but make
+ * the length of the lines slightly longer to clear all the pixels */
+ /* Left vertical line */
gtk_widget_queue_draw_area(GTK_WIDGET(icon_view),
cell_highlight->x - 1,
- cell_highlight->y,
+ cell_highlight->y - 1,
2,
- cell_highlight->height);
+ cell_highlight->height + 2);
+ /* Right vertical line */
gtk_widget_queue_draw_area(GTK_WIDGET(icon_view),
cell_highlight->x + cell_highlight->width - 1,
cell_highlight->y,
2,
- cell_highlight->height);
+ cell_highlight->height + 2);
+ /* Top horizontal line */
gtk_widget_queue_draw_area(GTK_WIDGET(icon_view),
cell_highlight->x,
cell_highlight->y - 1,
- cell_highlight->width,
+ cell_highlight->width + 2,
2);
+ /* Bottom horizontal line */
gtk_widget_queue_draw_area(GTK_WIDGET(icon_view),
cell_highlight->x,
cell_highlight->y + cell_highlight->height - 1,
- cell_highlight->width,
+ cell_highlight->width + 2,
2);
cell_highlight->width = cell_highlight->height = 0;
More information about the Xfce4-commits
mailing list