[Xfce4-commits] [xfce/gtk-xfce-engine] 01/08: Support trough-side-details.
noreply at xfce.org
noreply at xfce.org
Fri Feb 6 22:24:17 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 52f856d2168f0312cd1988bd7e0db4181f565911
Author: Peter de Ridder <peter at xfce.org>
Date: Sun Dec 15 19:44:52 2013 +0100
Support trough-side-details.
---
src/xfce_theme_draw.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/xfce_theme_draw.c b/src/xfce_theme_draw.c
index 6181356..3b1ea9a 100644
--- a/src/xfce_theme_draw.c
+++ b/src/xfce_theme_draw.c
@@ -107,6 +107,11 @@ static void xfce_fill_background(GtkStyle * style, GdkWindow * window, GtkStateT
cr = ge_gdk_drawable_to_cairo(window, area);
+ if (DETAIL("trough-lower"))
+ {
+ state_type = GTK_STATE_SELECTED;
+ }
+
if ((!draw_base) && (XFCE_RC_STYLE(style->rc_style)->gradient))
{
switch (XFCE_RC_STYLE(style->rc_style)->gradient_style)
@@ -143,7 +148,7 @@ static void xfce_fill_background(GtkStyle * style, GdkWindow * window, GtkStateT
}
break;
}
- if ((state_type == GTK_STATE_ACTIVE) || (DETAIL("trough")))
+ if ((state_type == GTK_STATE_ACTIVE) || (DETAIL("trough")) || (DETAIL("trough-lower")) || (DETAIL("trough-upper")))
{
shade_start = MIN (XFCE_RC_STYLE(style->rc_style)->shade_start, XFCE_RC_STYLE(style->rc_style)->shade_end);
shade_end = MAX (XFCE_RC_STYLE(style->rc_style)->shade_start, XFCE_RC_STYLE(style->rc_style)->shade_end);
@@ -493,9 +498,9 @@ static void draw_shadow(GtkStyle * style, GdkWindow * window, GtkStateType state
case GTK_SHADOW_IN:
if (XFCE_RC_STYLE(style->rc_style)->smooth_edge)
{
- if (DETAIL("trough"))
+ if (DETAIL("trough") || DETAIL("trough-lower") || DETAIL("trough-upper"))
{
- gdk_cairo_set_source_color(cr, &style->bg[GTK_STATE_NORMAL]);
+ gdk_cairo_set_source_color(cr, &style->bg[DETAIL("trough-lower") ? GTK_STATE_SELECTED : GTK_STATE_NORMAL]);
cairo_rectangle(cr, x + 0.5, y + 0.5, width - 1, height - 1);
cairo_stroke(cr);
@@ -564,9 +569,9 @@ static void draw_shadow(GtkStyle * style, GdkWindow * window, GtkStateType state
}
else
{
- if (DETAIL("trough"))
+ if (DETAIL("trough") || DETAIL("trough-lower") || DETAIL("trough-upper"))
{
- gdk_cairo_set_source_color(cr, &style->dark[GTK_STATE_ACTIVE]);
+ gdk_cairo_set_source_color(cr, &style->dark[DETAIL("trough-lower") ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE]);
cairo_rectangle(cr, x + 0.5, y + 0.5, width - 1, height - 1);
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