forked from AuroraMiddleware/gtk
label: Use the widget state flags as a base for drawing
This commit is contained in:
parent
02dd7df653
commit
5b4cc2f0b6
@ -4062,10 +4062,7 @@ gtk_label_draw (GtkWidget *widget,
|
||||
gdk_cairo_region (cr, clip);
|
||||
cairo_clip (cr);
|
||||
|
||||
state = GTK_STATE_FLAG_SELECTED;
|
||||
|
||||
if (gtk_widget_has_focus (widget))
|
||||
state |= GTK_STATE_FLAG_FOCUSED;
|
||||
state |= GTK_STATE_FLAG_SELECTED;
|
||||
|
||||
gtk_style_context_get_color (context, state, &fg_color);
|
||||
gtk_style_context_get_background_color (context, state, &bg_color);
|
||||
@ -4131,9 +4128,9 @@ gtk_label_draw (GtkWidget *widget,
|
||||
text_color = link_color;
|
||||
|
||||
if (info->link_clicked)
|
||||
state = GTK_STATE_FLAG_ACTIVE;
|
||||
state |= GTK_STATE_FLAG_ACTIVE;
|
||||
else
|
||||
state = GTK_STATE_FLAG_PRELIGHT;
|
||||
state |= GTK_STATE_FLAG_PRELIGHT;
|
||||
|
||||
gtk_style_context_get_background_color (context, state, &bg_color);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user