[Xfce4-commits] [xfce/xfce4-panel] 01/01: Clock: Fix color in LCD mode
noreply at xfce.org
noreply at xfce.org
Sat Apr 22 11:03:57 CEST 2017
This is an automated email from the git hooks/post-receive script.
ochosi pushed a commit to branch master
in repository xfce/xfce4-panel.
commit 89df01cc3c875ec3e809d4b51fadd5f0448434ea
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sat Apr 22 11:03:31 2017 +0200
Clock: Fix color in LCD mode
---
plugins/clock/clock-lcd.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/plugins/clock/clock-lcd.c b/plugins/clock/clock-lcd.c
index 662bab1..3451b1e 100644
--- a/plugins/clock/clock-lcd.c
+++ b/plugins/clock/clock-lcd.c
@@ -286,6 +286,8 @@ xfce_clock_lcd_draw (GtkWidget *widget,
gdouble ratio;
GDateTime *time;
GtkAllocation allocation;
+ GtkStyleContext *ctx;
+ GdkRGBA fg_rgba;
panel_return_val_if_fail (XFCE_CLOCK_IS_LCD (lcd), FALSE);
panel_return_val_if_fail (cr != NULL, FALSE);
@@ -297,6 +299,11 @@ xfce_clock_lcd_draw (GtkWidget *widget,
gtk_widget_get_allocation (widget, &allocation);
size = MIN ((gdouble) allocation.width / ratio, allocation.height);
+ /* set correct color */
+ ctx = gtk_widget_get_style_context (widget);
+ gtk_style_context_get_color (ctx, gtk_widget_get_state_flags (widget), &fg_rgba);
+ gdk_cairo_set_source_rgba (cr, &fg_rgba);
+
/* begin offsets */
offset_x = rint ((allocation.width - (size * ratio)) / 2.00);
offset_y = rint ((allocation.height - size) / 2.00);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list