[gtk/wip/otte/toolbar: 3/6] css: Remove .inline-toolbar



commit 508490a06709abb94c8006407f0e7284036a6cbd
Author: Benjamin Otte <otte redhat com>
Date:   Mon Feb 3 05:17:23 2020 +0100

    css: Remove .inline-toolbar
    
    It's not used anywhere anymore.

 demos/gtk-demo/themes.ui                   |  62 ---------------
 demos/gtk-demo/theming.ui                  |  62 ---------------
 demos/gtk-demo/theming_style_classes.c     |   4 +-
 docs/reference/gtk/gtk4-sections.txt       |   1 -
 gtk/gtkstylecontext.h                      |   9 ---
 gtk/theme/Adwaita/_common.scss             |  71 +----------------
 gtk/theme/HighContrast/_common.scss        |  57 +-------------
 po-properties/POTFILES.skip                |   2 -
 po/POTFILES.skip                           |   2 -
 tests/visuals/inline-toolbar-horizontal.ui | 119 ----------------------------
 tests/visuals/inline-toolbar-vertical.ui   | 122 -----------------------------
 11 files changed, 4 insertions(+), 507 deletions(-)
---
diff --git a/demos/gtk-demo/themes.ui b/demos/gtk-demo/themes.ui
index 97de0278ba..f921205284 100644
--- a/demos/gtk-demo/themes.ui
+++ b/demos/gtk-demo/themes.ui
@@ -143,68 +143,6 @@
             </child>
           </object>
         </child>
-        <child>
-          <object class="GtkToolbar">
-            <property name="hexpand">1</property>
-            <property name="toolbar-style">icons</property>
-            <style>
-              <class name="inline-toolbar"/>
-            </style>
-            <child>
-              <object class="GtkToggleToolButton">
-                <property name="homogeneous">1</property>
-                <property name="label" translatable="yes">Normal</property>
-                <property name="use-underline">1</property>
-                <property name="icon-name">list-add-symbolic</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkToggleToolButton">
-                <property name="homogeneous">1</property>
-                <property name="label" translatable="yes">Normal</property>
-                <property name="use-underline">1</property>
-                <property name="icon-name">list-add-symbolic</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkToggleToolButton">
-                <property name="homogeneous">1</property>
-                <property name="label" translatable="yes">Active</property>
-                <property name="use-underline">1</property>
-                <property name="icon-name">list-remove-symbolic</property>
-                <property name="active">1</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkToggleToolButton">
-                <property name="homogeneous">1</property>
-                <property name="label" translatable="yes">Active</property>
-                <property name="use-underline">1</property>
-                <property name="icon-name">list-remove-symbolic</property>
-                <property name="active">1</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkToggleToolButton">
-                <property name="homogeneous">1</property>
-                <property name="sensitive">0</property>
-                <property name="label" translatable="yes">Insensitive</property>
-                <property name="use-underline">1</property>
-                <property name="icon-name">edit-find-symbolic</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkToggleToolButton">
-                <property name="homogeneous">1</property>
-                <property name="sensitive">0</property>
-                <property name="label" translatable="yes">Insensitive Active</property>
-                <property name="use-underline">1</property>
-                <property name="icon-name">go-up-symbolic</property>
-                <property name="active">1</property>
-              </object>
-            </child>
-          </object>
-        </child>
         <child>
           <object class="GtkBox">
             <property name="spacing">10</property>
diff --git a/demos/gtk-demo/theming.ui b/demos/gtk-demo/theming.ui
index 3e529eae25..b5bc13b1a8 100644
--- a/demos/gtk-demo/theming.ui
+++ b/demos/gtk-demo/theming.ui
@@ -131,68 +131,6 @@
         </child>
       </object>
     </child>
-    <child>
-      <object class="GtkToolbar">
-        <property name="hexpand">1</property>
-        <property name="toolbar-style">icons</property>
-        <style>
-          <class name="inline-toolbar"/>
-        </style>
-        <child>
-          <object class="GtkToggleToolButton">
-            <property name="homogeneous">1</property>
-            <property name="label" translatable="yes">Normal</property>
-            <property name="use-underline">1</property>
-            <property name="icon-name">list-add-symbolic</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkToggleToolButton">
-            <property name="homogeneous">1</property>
-            <property name="label" translatable="yes">Normal</property>
-            <property name="use-underline">1</property>
-            <property name="icon-name">list-add-symbolic</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkToggleToolButton">
-            <property name="homogeneous">1</property>
-            <property name="label" translatable="yes">Active</property>
-            <property name="use-underline">1</property>
-            <property name="icon-name">list-remove-symbolic</property>
-            <property name="active">1</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkToggleToolButton">
-            <property name="homogeneous">1</property>
-            <property name="label" translatable="yes">Active</property>
-            <property name="use-underline">1</property>
-            <property name="icon-name">list-remove-symbolic</property>
-            <property name="active">1</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkToggleToolButton">
-            <property name="homogeneous">1</property>
-            <property name="sensitive">0</property>
-            <property name="label" translatable="yes">Insensitive</property>
-            <property name="use-underline">1</property>
-            <property name="icon-name">edit-find-symbolic</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkToggleToolButton">
-            <property name="homogeneous">1</property>
-            <property name="sensitive">0</property>
-            <property name="label" translatable="yes">Insensitive Active</property>
-            <property name="use-underline">1</property>
-            <property name="icon-name">go-up-symbolic</property>
-            <property name="active">1</property>
-          </object>
-        </child>
-      </object>
-    </child>
     <child>
       <object class="GtkBox">
         <property name="spacing">10</property>
diff --git a/demos/gtk-demo/theming_style_classes.c b/demos/gtk-demo/theming_style_classes.c
index 30e7f403da..4868c450e4 100644
--- a/demos/gtk-demo/theming_style_classes.c
+++ b/demos/gtk-demo/theming_style_classes.c
@@ -4,8 +4,8 @@
  * with widgets to inform the theme about intended rendering.
  *
  * This demo shows some common examples where theming features
- * of GTK are used for certain effects: primary toolbars,
- * inline toolbars and linked buttons.
+ * of GTK are used for certain effects: primary toolbars
+ * and linked buttons.
  */
 
 #include <gtk/gtk.h>
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 723e620a6e..2482f9e0dc 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4743,7 +4743,6 @@ GTK_STYLE_CLASS_HIGHLIGHT
 GTK_STYLE_CLASS_HORIZONTAL
 GTK_STYLE_CLASS_IMAGE
 GTK_STYLE_CLASS_INFO
-GTK_STYLE_CLASS_INLINE_TOOLBAR
 GTK_STYLE_CLASS_INSERTION_CURSOR
 GTK_STYLE_CLASS_LABEL
 GTK_STYLE_CLASS_LEFT
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 331241d78a..ce72e45636 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -249,15 +249,6 @@ struct _GtkStyleContextClass
  */
 #define GTK_STYLE_CLASS_PRIMARY_TOOLBAR "primary-toolbar"
 
-/**
- * GTK_STYLE_CLASS_INLINE_TOOLBAR:
- *
- * A CSS class to match inline toolbars.
- *
- * Refer to individual widget documentation for used style classes.
- */
-#define GTK_STYLE_CLASS_INLINE_TOOLBAR "inline-toolbar"
-
 /**
  * GTK_STYLE_CLASS_STATUSBAR:
  *
diff --git a/gtk/theme/Adwaita/_common.scss b/gtk/theme/Adwaita/_common.scss
index 96c068d154..57fcaf7eaa 100644
--- a/gtk/theme/Adwaita/_common.scss
+++ b/gtk/theme/Adwaita/_common.scss
@@ -825,9 +825,6 @@ button {
     > box > box > label { font-weight: bold; }
   }
 
-  // inline-toolbar buttons
-  .inline-toolbar & { @extend %linked; }
-
   .primary-toolbar & { -gtk-icon-shadow: none; } // tango icons don't need shadows
 
   .linked:not(.vertical) > & { @extend %linked; }
@@ -867,52 +864,6 @@ button {
 }
 
 
-// all the following is for the +|- buttons on inline toolbars, that way
-// should really be deprecated...
-.inline-toolbar toolbutton > button { // redefining the button look is
-                                      // needed since those are flat...
-  @include button(normal);
-
-  &:hover { @include button(hover); }
-
-  &:active,
-  &:checked{ @include button(active); }
-
-  &:disabled {
-    @include button(insensitive);
-
-    &:active,
-    &:checked { @include button(insensitive-active); }
-  }
-
-  &:backdrop {
-    @include button(backdrop);
-
-    &:active,
-    &:checked { @include button(backdrop-active); }
-
-    &:disabled {
-      @include button(backdrop-insensitive);
-
-      &:active,
-      &:checked { @include button(backdrop-insensitive-active); }
-    }
-  }
-}
-
-// More inline toolbar buttons
-toolbar.inline-toolbar toolbutton {
-  &:dir(ltr) {
-    &:not(:first-child) > button.flat { @extend %linked_not_left; }
-    &:not(:last-child) > button.flat { @extend %linked_not_right; }
-  }
-
-  &:dir(rtl) {
-    &:not(:first-child) > button.flat { @extend %linked_not_right; }
-    &:not(:last-child) > button.flat { @extend %linked_not_left; }
-  }
-}
-
 %linked_not_left {
   border-top-left-radius: 0;
   border-bottom-left-radius: 0;
@@ -1384,29 +1335,9 @@ toolbar {
   // toolbar separators
   &.horizontal separator { margin: 0 7px 1px 6px; }
   &.vertical separator { margin: 6px 1px 7px 0; }
-
-  &:not(.inline-toolbar):not(.osd) {
-    // workaround: add margins to the children of tool items to simulate
-    // spacing, ignore the overflow button (.toggle) and the overflow menu
-    // (.popup)
-    > *:not(.toggle):not(.popup) > * {
-      margin-right: 1px;
-      margin-bottom: 1px;
-    }
-  }
-}
-
-//searchbar, location-bar & inline-toolbar
-.inline-toolbar {
-  @extend %toolbar;
-
-  @extend %darkbar;
-
-  padding: 3px;
-  border-width: 0 1px 1px;
-  border-radius: 0  0 5px 5px;
 }
 
+//searchbar & location-bar
 searchbar {
   padding: 0px;
   >revealer>box {
diff --git a/gtk/theme/HighContrast/_common.scss b/gtk/theme/HighContrast/_common.scss
index 06f0a5f126..dbd9d71bd0 100644
--- a/gtk/theme/HighContrast/_common.scss
+++ b/gtk/theme/HighContrast/_common.scss
@@ -686,9 +686,6 @@ button {
     }
   }
 
-  //inline-toolbar buttons
-  .inline-toolbar & { @extend %linked; }
-
   .primary-toolbar & { -gtk-icon-shadow: none; } // tango icons don't need shadows
 
   .linked:not(.vertical) > & { @extend %linked; }
@@ -710,52 +707,6 @@ button {
 }
 
 
-// all the following is for the +|- buttons on inline toolbars, that way
-// should really be deprecated...
-.inline-toolbar toolbutton > button { // redefining the button look is
-                                      // needed since those are flat...
-  @include button(normal);
-
-  &:hover { @include button(hover); }
-
-  &:active,
-  &:checked{ @include button(active); }
-
-  &:disabled {
-    @include button(insensitive);
-
-    &:active,
-    &:checked { @include button(insensitive-active); }
-  }
-
-  &:backdrop {
-    @include button(backdrop);
-
-    &:active,
-    &:checked { @include button(backdrop-active); }
-
-    &:disabled {
-      @include button(backdrop-insensitive);
-
-      &:active,
-      &:checked { @include button(backdrop-insensitive-active); }
-    }
-  }
-}
-
-// More inline toolbar buttons
-toolbar.inline-toolbar toolbutton {
-  &:dir(ltr) {
-    &:not(:first-child) > button.flat { @extend %linked_not_left; }
-    &:not(:last-child) > button.flat { @extend %linked_not_right; }
-  }
-
-  &:dir(rtl) {
-    &:not(:first-child) > button.flat { @extend %linked_not_right; }
-    &:not(:last-child) > button.flat { @extend %linked_not_left; }
-  }
-}
-
 %linked_not_left {
   border-top-left-radius: 0;
   border-bottom-left-radius: 0;
@@ -1155,13 +1106,7 @@ toolbar { //FIXME: why is all this being ignored?
     padding: 12px;
     & label { color: $osd_fg_color; }
   }
-  //searchbar & inline-toolbar
-  &.inline-toolbar {
-    @extend %inset-bar;
-    border-width: 0 1px 1px;
-    padding: 3px;
-    border-radius: 0  0 4px 4px;
-  }
+  //searchbar
   &.vertical {
     border-right: 1px solid $borders_color;
     &:dir(rtl) {
diff --git a/po-properties/POTFILES.skip b/po-properties/POTFILES.skip
index d2f02a8e75..0404292882 100644
--- a/po-properties/POTFILES.skip
+++ b/po-properties/POTFILES.skip
@@ -353,8 +353,6 @@ testsuite/tools/simplify-data-3to4/notebook.ui
 testsuite/tools/simplify-data-3to4/office-runner.ui
 testsuite/tools/simplify-data-3to4/stack.ui
 testsuite/tools/simplify-data/test3.ui
-tests/visuals/inline-toolbar-horizontal.ui
-tests/visuals/inline-toolbar-vertical.ui
 tests/visuals/linked-buttons-horizontal.ui
 tests/visuals/linked-buttons-vertical.ui
 tests/visuals/primary-toolbar.ui
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 17b3aa8619..6d64001736 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -313,8 +313,6 @@ testsuite/tools/simplify-data-3to4/notebook.ui
 testsuite/tools/simplify-data-3to4/office-runner.ui
 testsuite/tools/simplify-data-3to4/stack.ui
 testsuite/tools/simplify-data/test3.ui
-tests/visuals/inline-toolbar-horizontal.ui
-tests/visuals/inline-toolbar-vertical.ui
 tests/visuals/linked-buttons-horizontal.ui
 tests/visuals/linked-buttons-vertical.ui
 tests/visuals/primary-toolbar.ui


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