Browse Source

Fix rounding issues in panel borders.

upstream/xfce4-panel-4.10.1
Nick Schermer 12 years ago
parent
commit
ee2e2534ac
  1. 2
      NEWS
  2. 18
      panel/panel-base-window.c

2
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.

18
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);

Loading…
Cancel
Save