[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 44/473: Draw resize triangle in lighter color. Closes #5.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:53:34 CET 2015


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 8cb979dda3c585d2a74d574b885078cbb81682dd
Author: Graeme Gott <graeme at gottcode.org>
Date:   Sun Jun 30 10:24:21 2013 -0400

    Draw resize triangle in lighter color. Closes #5.
---
 src/resizer_widget.cpp |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/resizer_widget.cpp b/src/resizer_widget.cpp
index cb48a80..3ee3ca1 100644
--- a/src/resizer_widget.cpp
+++ b/src/resizer_widget.cpp
@@ -113,6 +113,7 @@ gboolean ResizerWidget::on_button_press_event(GtkWidget*, GdkEventButton* event)
 
 gboolean ResizerWidget::on_enter_notify_event(GtkWidget* widget, GdkEventCrossing*)
 {
+	gtk_widget_set_state(widget, GTK_STATE_PRELIGHT);
 	GdkWindow* window = gtk_widget_get_window(widget);
 	gdk_window_set_cursor(window, m_cursor);
 	return false;
@@ -122,6 +123,7 @@ gboolean ResizerWidget::on_enter_notify_event(GtkWidget* widget, GdkEventCrossin
 
 gboolean ResizerWidget::on_leave_notify_event(GtkWidget* widget, GdkEventCrossing*)
 {
+	gtk_widget_set_state(widget, GTK_STATE_NORMAL);
 	GdkWindow* window = gtk_widget_get_window(widget);
 	gdk_window_set_cursor(window, NULL);
 	return false;
@@ -134,7 +136,7 @@ gboolean ResizerWidget::on_expose_event(GtkWidget* widget, GdkEventExpose*)
 	cairo_t* cr = gdk_cairo_create(gtk_widget_get_window(widget));
 
 	GtkStyle* style = gtk_widget_get_style(widget);
-	const GdkColor& color = style->text[GTK_STATE_NORMAL];
+	const GdkColor& color = style->text_aa[gtk_widget_get_state(widget)];
 	cairo_set_source_rgb(cr, color.red / 65535.0, color.green / 65535.0, color.blue / 65535.0);
 
 	cairo_move_to(cr, m_shape.back().x, m_shape.back().y);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list