[gtk/wip/exalm/print] printunixdialog: Fix css name



commit 0d1fcab904d96532c7b259f56e9e01223aa8cd09
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Jun 19 03:15:06 2020 +0500

    printunixdialog: Fix css name
    
    GtkWindow subclasses are supposed to keep the window css name now, and add
    style classes instead, so replace it with .print style class.

 gtk/gtkprintunixdialog.c       | 6 +++---
 gtk/theme/Adwaita/_common.scss | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index f63b9d5e15..5cac0b9468 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -111,7 +111,8 @@
  *
  * # CSS nodes
  *
- * GtkPrintUnixDialog has a single CSS node with name printdialog.
+ * GtkPrintUnixDialog has a single CSS node with name window and the
+ * .dialog and .print style classes.
  */
 
 
@@ -508,8 +509,6 @@ gtk_print_unix_dialog_class_init (GtkPrintUnixDialogClass *class)
   gtk_widget_class_bind_template_callback (widget_class, redraw_page_layout_preview);
   gtk_widget_class_bind_template_callback (widget_class, update_number_up_layout);
   gtk_widget_class_bind_template_callback (widget_class, redraw_page_layout_preview);
-
-  gtk_widget_class_set_css_name (widget_class, I_("printdialog"));
 }
 
 /* Returns a toplevel GtkWindow, or NULL if none */
@@ -776,6 +775,7 @@ gtk_print_unix_dialog_init (GtkPrintUnixDialog *dialog)
   g_type_ensure (GTK_TYPE_PRINTER_OPTION_WIDGET);
 
   gtk_widget_init_template (GTK_WIDGET (dialog));
+  gtk_widget_add_css_class (GTK_WIDGET (dialog), "print");
   gtk_dialog_set_use_header_bar_from_setting (GTK_DIALOG (dialog));
   gtk_dialog_add_buttons (GTK_DIALOG (dialog),
                           _("Pre_view"), GTK_RESPONSE_APPLY,
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index cbc23b5b36..c4c14e4dab 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -2943,7 +2943,7 @@ levelbar {
 /****************
  * Print dialog *
 *****************/
-printdialog {
+window.dialog.print {
   drawing {
     color: $fg_color;
     background: none;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]