[Xfce4-commits] [xfce/gtk-xfce-engine] 07/08: Improved Gtk2 notebook.
noreply at xfce.org
noreply at xfce.org
Fri Feb 6 22:24:23 CET 2015
This is an automated email from the git hooks/post-receive script.
peter pushed a commit to branch peter/refresh-gtk2
in repository xfce/gtk-xfce-engine.
commit c1c192ded072ebddaa6a139be4be88730ba17ef7
Author: Peter de Ridder <peter at xfce.org>
Date: Sun Jan 5 16:16:22 2014 +0100
Improved Gtk2 notebook.
---
src/xfce_theme_draw.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/xfce_theme_draw.c b/src/xfce_theme_draw.c
index 3c5070e..b1eff5b 100644
--- a/src/xfce_theme_draw.c
+++ b/src/xfce_theme_draw.c
@@ -397,6 +397,9 @@ static void draw_shadow(GtkStyle * style, GdkWindow * window, GtkStateType state
parent = gtk_widget_get_parent(widget);
if (parent)
{
+ /* Get the background color from the parent widget.
+ * This makes a nicer corner if the background colors differ.
+ */
pstyle = gtk_widget_get_style(widget);
pbg = &pstyle->bg[gtk_widget_get_state(parent)];
}
@@ -1322,14 +1325,14 @@ static void draw_box_gap(GtkStyle * style, GdkWindow * window, GtkStateType stat
cairo_stroke(cr);
gdk_cairo_set_source_color(cr, c2);
- cairo_move_to(cr, x + 1.5, y + 1.5);
+ cairo_move_to(cr, x + 1.5, y + 0.5);
cairo_line_to(cr, x + 1.5, y + height - 1.5);
cairo_stroke(cr);
gdk_cairo_set_source_color(cr, c3);
cairo_move_to(cr, x + 2.5, y + height - 1.5);
cairo_line_to(cr, x + width - 1.5, y + height - 1.5);
- cairo_line_to(cr, x + width - 0.5, y + 0.5);
+ cairo_line_to(cr, x + width - 1.5, y + 0.5);
cairo_stroke(cr);
gdk_cairo_set_source_color(cr, c4);
@@ -1351,10 +1354,9 @@ static void draw_box_gap(GtkStyle * style, GdkWindow * window, GtkStateType stat
cairo_line_to(cr, x + gap_x, y + 1.5);
cairo_stroke(cr);
- cairo_rectangle(cr, x + gap_x, y + 0.5, 1, 1);
- cairo_move_to(cr, x + gap_x, y);
+ cairo_move_to(cr, x + gap_x, y + 0.5);
cairo_line_to(cr, x + gap_x + 1, y + 0.5);
- cairo_fill(cr);
+ cairo_stroke(cr);
}
if ((width - (gap_x + gap_width)) > 0)
{
@@ -1554,8 +1556,6 @@ static void draw_extension(GtkStyle * style, GdkWindow * window, GtkStateType st
CHECK_ARGS;
SANITIZE_SIZE;
- gtk_style_apply_default_background(style, window, widget && !GTK_WIDGET_NO_WINDOW(widget), state_type, area, x, y, width, height);
-
if (XFCE_RC_STYLE(style->rc_style)->smooth_edge)
{
c1 = &style->dark[state_type];
@@ -1591,7 +1591,7 @@ static void draw_extension(GtkStyle * style, GdkWindow * window, GtkStateType st
cairo_stroke(cr);
gdk_cairo_set_source_color(cr, c2);
- cairo_move_to(cr, x + 1.5, y + 1.5);
+ cairo_move_to(cr, x + 1.5, y + 0.5);
cairo_line_to(cr, x + 1.5, y + height - 1.5);
cairo_stroke(cr);
@@ -1643,7 +1643,7 @@ static void draw_extension(GtkStyle * style, GdkWindow * window, GtkStateType st
cairo_stroke(cr);
gdk_cairo_set_source_color(cr, c2);
- cairo_move_to(cr, x + 1.5, y + 1.5);
+ cairo_move_to(cr, x + 0.5, y + 1.5);
cairo_line_to(cr, x + width - 1.5, y + 1.5);
cairo_stroke(cr);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list