[gtk+] window: Name the decoration style



commit 371f5016326692396a1a957e3e250a24cbc709e3
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 7 21:42:25 2015 +0200

    window: Name the decoration style

 gtk/gtkwindow.c                          |    2 +-
 gtk/theme/Adwaita/_common.scss           |    6 +++---
 gtk/theme/Adwaita/gtk-contained-dark.css |   20 ++++++++++----------
 gtk/theme/Adwaita/gtk-contained.css      |   20 ++++++++++----------
 gtk/theme/HighContrast/_common.scss      |    2 +-
 gtk/theme/HighContrast/gtk.css           |   12 ++++++------
 6 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 960a8a2..855706d 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6522,7 +6522,7 @@ subtract_borders (GtkBorder *one,
 static void
 style_context_save_to_decoration (GtkStyleContext *context)
 {
-  gtk_style_context_save (context);
+  gtk_style_context_save_named (context, "decoration");
 
   gtk_style_context_remove_class (context, GTK_STYLE_CLASS_BACKGROUND);
   gtk_style_context_add_class (context, "window-frame");
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index f2cf9a2..551917b 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -3031,7 +3031,7 @@ GtkInfoBar {
   box-shadow: none; // otherwise it gets inherited by windowframe.csd
   text-shadow: 0 1px black;
   // FIXME: we need a border or tooltips vanish on black background.
-  &.window-frame.csd {
+  decoration.csd {
     background-color: transparent;
   }
 }
@@ -3220,7 +3220,7 @@ GtkVolumeButton.button {
  * Window Decorations *
  *********************/
 
-.window-frame {
+decoration {
   border-radius: 7px 7px 0 0;
   // lamefun trick to get rounded borders regardless of CSD use
   border-width: 0px;
@@ -3233,7 +3233,7 @@ GtkVolumeButton.button {
   box-shadow: 0 3px 9px 1px transparentize(black, 0.5),
               0 0 0 1px $_wm_border; //doing borders with box-shadow
 
-  // FIXME rationalize window-frame shadows
+  // FIXME rationalize shadows
 
   /* this is used for the resize cursor area */
   margin: 10px;
diff --git a/gtk/theme/Adwaita/gtk-contained-dark.css b/gtk/theme/Adwaita/gtk-contained-dark.css
index 4ba76e2..2e89a37 100644
--- a/gtk/theme/Adwaita/gtk-contained-dark.css
+++ b/gtk/theme/Adwaita/gtk-contained-dark.css
@@ -4070,7 +4070,7 @@ GtkInfoBar {
     background-color: rgba(0, 0, 0, 0.8);
     background-clip: padding-box;
     border: 1px solid rgba(255, 255, 255, 0.1); }
-  .tooltip.window-frame.csd {
+  .tooltip decoration.csd {
     background-color: transparent; }
 
 .tooltip * {
@@ -4207,30 +4207,30 @@ GtkColorSwatch {
 /**********************
  * Window Decorations *
  *********************/
-.window-frame {
+decoration {
   border-radius: 7px 7px 0 0;
   border-width: 0px;
   box-shadow: 0 3px 9px 1px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(28, 31, 31, 0.9);
   /* this is used for the resize cursor area */
   margin: 10px; }
-  .window-frame:backdrop {
+  decoration:backdrop {
     box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(28, 31, 31, 0.9); }
-  .window-frame.tiled {
+  decoration.tiled {
     border-radius: 0; }
-  .window-frame.popup {
+  decoration.popup {
     box-shadow: none; }
-  .window-frame.ssd {
+  decoration.ssd {
     box-shadow: 0 0 0 1px rgba(28, 31, 31, 0.9); }
-  .window-frame.csd.popup {
+  decoration.csd.popup {
     border-radius: 0;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(28, 31, 31, 0.8); }
-  .window-frame.csd.tooltip {
+  decoration.csd.tooltip {
     border-radius: 5px;
     box-shadow: none; }
-  .window-frame.csd.message-dialog {
+  decoration.csd.message-dialog {
     border-radius: 7px;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(28, 31, 31, 0.8); }
-  .window-frame.solid-csd {
+  decoration.solid-csd {
     border-radius: 0;
     margin: 4px;
     background-color: #393f3f;
diff --git a/gtk/theme/Adwaita/gtk-contained.css b/gtk/theme/Adwaita/gtk-contained.css
index 3c9aeb2..0924aa5 100644
--- a/gtk/theme/Adwaita/gtk-contained.css
+++ b/gtk/theme/Adwaita/gtk-contained.css
@@ -4242,7 +4242,7 @@ GtkInfoBar {
     background-color: rgba(0, 0, 0, 0.8);
     background-clip: padding-box;
     border: 1px solid rgba(255, 255, 255, 0.1); }
-  .tooltip.window-frame.csd {
+  .tooltip decoration.csd {
     background-color: transparent; }
 
 .tooltip * {
@@ -4379,30 +4379,30 @@ GtkColorSwatch {
 /**********************
  * Window Decorations *
  *********************/
-.window-frame {
+decoration {
   border-radius: 7px 7px 0 0;
   border-width: 0px;
   box-shadow: 0 3px 9px 1px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.23);
   /* this is used for the resize cursor area */
   margin: 10px; }
-  .window-frame:backdrop {
+  decoration:backdrop {
     box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.18); }
-  .window-frame.tiled {
+  decoration.tiled {
     border-radius: 0; }
-  .window-frame.popup {
+  decoration.popup {
     box-shadow: none; }
-  .window-frame.ssd {
+  decoration.ssd {
     box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.23); }
-  .window-frame.csd.popup {
+  decoration.csd.popup {
     border-radius: 0;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13); }
-  .window-frame.csd.tooltip {
+  decoration.csd.tooltip {
     border-radius: 5px;
     box-shadow: none; }
-  .window-frame.csd.message-dialog {
+  decoration.csd.message-dialog {
     border-radius: 7px;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13); }
-  .window-frame.solid-csd {
+  decoration.solid-csd {
     border-radius: 0;
     margin: 4px;
     background-color: #ededed;
diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss
index 77f902e..be7e22c 100644
--- a/gtk/theme/HighContrast/_common.scss
+++ b/gtk/theme/HighContrast/_common.scss
@@ -2470,7 +2470,7 @@ GtkColorSwatch {
  * Window Decorations *
  *********************/
 
-.window-frame {
+decoration {
   border-radius: 7px 7px 0 0;
   // lamefun trick to get rounded borders regardless of CSD use
   border-width: 0px;
diff --git a/gtk/theme/HighContrast/gtk.css b/gtk/theme/HighContrast/gtk.css
index 21f1a7f..aecb5e0 100644
--- a/gtk/theme/HighContrast/gtk.css
+++ b/gtk/theme/HighContrast/gtk.css
@@ -2660,23 +2660,23 @@ GtkColorSwatch {
 /**********************
  * Window Decorations *
  *********************/
-.window-frame {
+decoration {
   border-radius: 7px 7px 0 0;
   border-width: 0px;
   box-shadow: 0 3px 9px 1px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.23);
   /* this is used for the resize cursor area */
   margin: 10px; }
-  .window-frame:backdrop {
+  decoration:backdrop {
     box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.18); }
-  .window-frame.tiled {
+  decoration.tiled {
     border-radius: 0; }
-  .window-frame.csd.popup {
+  decoration.csd.popup {
     border-radius: 0;
     box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13); }
-  .window-frame.csd.tooltip {
+  decoration.csd.tooltip {
     border-radius: 5px;
     box-shadow: none; }
-  .window-frame.solid-csd {
+  decoration.solid-csd {
     border-radius: 0;
     margin: 4px;
     background-color: #fff;


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