forked from AuroraMiddleware/gtk
GtkThemingEngine: Render frames and spinbutton boxes properly.
This commit is contained in:
parent
7482b636e6
commit
d22f393be3
@ -940,7 +940,8 @@ gtk_theming_engine_render_frame (GtkThemingEngine *engine,
|
||||
color_shade (bg_color, 1.3, &lighter);
|
||||
|
||||
if (gtk_theming_engine_has_class (engine, "entry") ||
|
||||
gtk_theming_engine_has_class (engine, "scrolled-window"))
|
||||
gtk_theming_engine_has_class (engine, "scrolled-window") ||
|
||||
gtk_theming_engine_has_class (engine, "viewport"))
|
||||
{
|
||||
gdk_cairo_set_source_color (cr, bg_color);
|
||||
add_path_rectangle_sides (cr, x + 1, y + 1, width - 2, height - 2,
|
||||
@ -983,6 +984,18 @@ gtk_theming_engine_render_frame (GtkThemingEngine *engine,
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
else if (gtk_theming_engine_has_class (engine, "spinbutton"))
|
||||
{
|
||||
if (gtk_theming_engine_has_class (engine, "button"))
|
||||
{
|
||||
gdk_cairo_set_source_color (cr, &lighter);
|
||||
add_path_rectangle_sides (cr, x + 1, y + 2, width - 3, height - 2, SIDE_TOP);
|
||||
cairo_stroke (cr);
|
||||
|
||||
gdk_cairo_set_source_color (cr, &darker);
|
||||
add_path_rectangle_sides (cr, x + 1, y + 2, width - 3, height - 2, SIDE_BOTTOM);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_cairo_set_source_color (cr, &lighter);
|
||||
add_path_rectangle_sides (cr, x, y, width, height,
|
||||
@ -998,10 +1011,11 @@ gtk_theming_engine_render_frame (GtkThemingEngine *engine,
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
add_path_rectangle_sides (cr, x + 1, y + 1, width - 2, height - 2,
|
||||
add_path_rectangle_sides (cr, x, y + 1, width - 1, height - 3,
|
||||
SIDE_TOP | SIDE_LEFT | SIDE_RIGHT);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flags & GTK_STATE_FLAG_ACTIVE)
|
||||
|
Loading…
Reference in New Issue
Block a user