mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
print: Add a .paper style class
... and use it in the print preview.
This commit is contained in:
parent
f7d7d345da
commit
82b7d21f6e
@ -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:
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user