[Xfce4-commits] <xfce4-panel:master> Fix rounding issues in panel borders.

Nick Schermer noreply at xfce.org
Thu Apr 15 18:04:02 CEST 2010


Updating branch refs/heads/master
         to ee2e2534ac0f9948a4b4d6bbcc1f579c9904a688 (commit)
       from 661b6d299356eb8ff6688bbaf86eb61b4211960d (commit)

commit ee2e2534ac0f9948a4b4d6bbcc1f579c9904a688
Author: Nick Schermer <nick at xfce.org>
Date:   Thu Apr 15 18:03:10 2010 +0200

    Fix rounding issues in panel borders.

 NEWS                      |    2 +-
 panel/panel-base-window.c |   18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/NEWS b/NEWS
index b763490..be9d22b 100644
--- a/NEWS
+++ b/NEWS
@@ -72,7 +72,7 @@ Panel
 - External plugins are automatically restarted if they have not
   crashed in the last 60 seconds. If they crash more then once in
   this time window, the user is asked what to do (restart or remove).
-- Gtk style properties for popup/popdown delay.
+- Gtk style properties for popup/popdown delay (bug #5707).
 - Hidden option to disable struts for windows on a screen edge, so
   the space is used by the window manager for other windows.
 
diff --git a/panel/panel-base-window.c b/panel/panel-base-window.c
index 4fc683f..de40abd 100644
--- a/panel/panel-base-window.c
+++ b/panel/panel-base-window.c
@@ -372,7 +372,7 @@ panel_base_window_expose_event (GtkWidget      *widget,
                       (timeval.tv_sec % 4) * 2);
 
       /* draw rectangle */
-      cairo_rectangle (cr, 0, 0, width - 1.00, height - 1.00);
+      cairo_rectangle (cr, 0.5, 0.5, width - 0.50, height - 0.50);
       cairo_stroke (cr);
     }
   else
@@ -385,14 +385,14 @@ panel_base_window_expose_event (GtkWidget      *widget,
 
           if (PANEL_HAS_FLAG (priv->borders, PANEL_BORDER_BOTTOM))
             {
-              cairo_move_to (cr, 0.00, height - 1.00);
-              cairo_rel_line_to (cr, width, 0.00);
+              cairo_move_to (cr, 0.50, height - 0.50);
+              cairo_rel_line_to (cr, width, 0.50);
             }
 
           if (PANEL_HAS_FLAG (priv->borders, PANEL_BORDER_RIGHT))
             {
-              cairo_move_to (cr, width - 1.00, 0.00);
-              cairo_rel_line_to (cr, 0.00, height);
+              cairo_move_to (cr, width - 0.50, 0.50);
+              cairo_rel_line_to (cr, 0.50, height);
             }
 
           cairo_stroke (cr);
@@ -406,14 +406,14 @@ panel_base_window_expose_event (GtkWidget      *widget,
 
           if (PANEL_HAS_FLAG (priv->borders, PANEL_BORDER_LEFT))
             {
-              cairo_move_to (cr, 0.00, 0.00);
-              cairo_rel_line_to (cr, 0.00, height);
+              cairo_move_to (cr, 0.50, 0.50);
+              cairo_rel_line_to (cr, 0.50, height);
             }
 
           if (PANEL_HAS_FLAG (priv->borders, PANEL_BORDER_TOP))
             {
-              cairo_move_to (cr, 0.00, 0.00);
-              cairo_rel_line_to (cr, width, 0.00);
+              cairo_move_to (cr, 0.50, 0.50);
+              cairo_rel_line_to (cr, width, 0.50);
             }
 
           cairo_stroke (cr);



More information about the Xfce4-commits mailing list