mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 18:33:47 +01:00
Solved blinking bug when recoloring with grey background
There was a problem passing colors to cairo_set_source_rgb. Should be floats between 0 and 1. Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
1175985ae7
commit
9ed64ff606
@ -434,9 +434,9 @@ zathura_page_widget_draw(GtkWidget* widget, cairo_t* cairo)
|
|||||||
/* set background color */
|
/* set background color */
|
||||||
if (priv->zathura->global.recolor == true) {
|
if (priv->zathura->global.recolor == true) {
|
||||||
GdkColor color = priv->zathura->ui.colors.recolor_light_color;
|
GdkColor color = priv->zathura->ui.colors.recolor_light_color;
|
||||||
cairo_set_source_rgb(cairo, color.red, color.green, color.blue);
|
cairo_set_source_rgb(cairo, color.red/65535.0, color.green/65535.0, color.blue/65535.0);
|
||||||
} else {
|
} else {
|
||||||
cairo_set_source_rgb(cairo, 255, 255, 255);
|
cairo_set_source_rgb(cairo, 1, 1, 1);
|
||||||
}
|
}
|
||||||
cairo_rectangle(cairo, 0, 0, page_width, page_height);
|
cairo_rectangle(cairo, 0, 0, page_width, page_height);
|
||||||
cairo_fill(cairo);
|
cairo_fill(cairo);
|
||||||
|
Loading…
Reference in New Issue
Block a user