GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 82b7d21f authored by Benjamin Otte's avatar Benjamin Otte

print: Add a .paper style class

... and use it in the print preview.
parent f7d7d345
......@@ -6013,6 +6013,7 @@ GTK_STYLE_CLASS_NOTEBOOK
GTK_STYLE_CLASS_OSD
GTK_STYLE_CLASS_OVERSHOOT
GTK_STYLE_CLASS_PANE_SEPARATOR
GTK_STYLE_CLASS_PAPER
GTK_STYLE_CLASS_POPUP
GTK_STYLE_CLASS_PRIMARY_TOOLBAR
GTK_STYLE_CLASS_PROGRESSBAR
......
......@@ -2212,6 +2212,7 @@ paint_page (GtkWidget *widget,
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_PAPER);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW);
gtk_render_background (context, cr, x, y, width, height);
......@@ -2750,6 +2751,7 @@ draw_page_cb (GtkWidget *widget,
context = gtk_widget_get_style_context (widget);
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_PAPER);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW);
pos_x = (width - w) / 2;
......
......@@ -873,6 +873,17 @@ struct _GtkStyleContextClass
*/
#define GTK_STYLE_CLASS_OVERSHOOT "overshoot"
/*
* GTK_STYLE_CLASS_PAPER:
* A CSS class that is added to areas that should look like paper.
*
* This is used in print previews and themes are encouraged to
* style it as black text on white background.
*
* Since: 3.16
*/
#define GTK_STYLE_CLASS_PAPER "paper"
/**
* GTK_STYLE_REGION_ROW:
*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment