File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -161,9 +161,11 @@ ev_document_misc_paint_one_page (cairo_t *cr,
161
161
GtkStateFlags state = gtk_widget_get_state_flags (widget );
162
162
GdkRGBA fg , bg , shade_bg ;
163
163
164
+ gtk_style_context_save (context );
164
165
gtk_style_context_get_background_color (context , state , & bg );
165
166
gtk_style_context_get_color (context , state , & fg );
166
167
gtk_style_context_get_color (context , state , & shade_bg );
168
+ gtk_style_context_restore (context );
167
169
shade_bg .alpha *= 0.5 ;
168
170
169
171
gdk_cairo_set_source_rgba (cr , highlight ? & fg : & shade_bg );
Original file line number Diff line number Diff line change @@ -3974,7 +3974,9 @@ get_cursor_color (GtkStyleContext *context,
3974
3974
3975
3975
gdk_color_free (style_color );
3976
3976
} else {
3977
+ gtk_style_context_save (context );
3977
3978
gtk_style_context_get_color (context , GTK_STATE_FLAG_NORMAL , color );
3979
+ gtk_style_context_restore (context );
3978
3980
}
3979
3981
}
3980
3982
@@ -5622,7 +5624,9 @@ draw_rubberband (EvView *view,
5622
5624
GdkRGBA color ;
5623
5625
5624
5626
context = gtk_widget_get_style_context (GTK_WIDGET (view ));
5627
+ gtk_style_context_save (context );
5625
5628
gtk_style_context_get_background_color (context , GTK_STATE_FLAG_SELECTED , & color );
5629
+ gtk_style_context_restore (context );
5626
5630
5627
5631
cairo_save (cr );
5628
5632
@@ -5811,12 +5815,15 @@ _ev_view_get_selection_colors (EvView *view,
5811
5815
5812
5816
state = gtk_widget_has_focus (widget ) ? GTK_STATE_FLAG_SELECTED : GTK_STATE_FLAG_ACTIVE ;
5813
5817
context = gtk_widget_get_style_context (widget );
5818
+ gtk_style_context_save (context );
5814
5819
5815
5820
if (bg_color )
5816
5821
gtk_style_context_get_background_color (context , state , bg_color );
5817
5822
5818
5823
if (fg_color )
5819
5824
gtk_style_context_get_color (context , state , fg_color );
5825
+
5826
+ gtk_style_context_restore (context );
5820
5827
}
5821
5828
5822
5829
static void
You can’t perform that action at this time.
0 commit comments