From 9cccb944ef0cf8f0f669fb580663c7f0191f2e4b Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 3 Feb 2020 05:17:23 +0100 Subject: [PATCH] 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(-) delete mode 100644 tests/visuals/inline-toolbar-horizontal.ui delete mode 100644 tests/visuals/inline-toolbar-vertical.ui 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 @@ - - - 1 - icons - - - - 1 - Normal - 1 - list-add-symbolic - - - - - 1 - Normal - 1 - list-add-symbolic - - - - - 1 - Active - 1 - list-remove-symbolic - 1 - - - - - 1 - Active - 1 - list-remove-symbolic - 1 - - - - - 1 - 0 - Insensitive - 1 - edit-find-symbolic - - - - - 1 - 0 - Insensitive Active - 1 - go-up-symbolic - 1 - - - - 10 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 @@ - - - 1 - icons - - - - 1 - Normal - 1 - list-add-symbolic - - - - - 1 - Normal - 1 - list-add-symbolic - - - - - 1 - Active - 1 - list-remove-symbolic - 1 - - - - - 1 - Active - 1 - list-remove-symbolic - 1 - - - - - 1 - 0 - Insensitive - 1 - edit-find-symbolic - - - - - 1 - 0 - Insensitive Active - 1 - go-up-symbolic - 1 - - - - 10 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 diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index c59c2e6692..5747a62fe8 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 0c4c0c1ebb..29820d7068 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 diff --git a/tests/visuals/inline-toolbar-horizontal.ui b/tests/visuals/inline-toolbar-horizontal.ui deleted file mode 100644 index 8c69dbb525..0000000000 --- a/tests/visuals/inline-toolbar-horizontal.ui +++ /dev/null @@ -1,119 +0,0 @@ - - - - - False - 600 - - - 6 - vertical - - - True - False - True - - - - False - True - False - False - Normal - True - list-add-symbolic - - - False - True - - - - - False - True - False - False - Normal - True - list-add-symbolic - - - False - True - - - - - False - True - False - False - Active - True - list-remove-symbolic - True - - - False - True - - - - - False - True - False - False - Active - True - list-remove-symbolic - True - - - False - True - - - - - False - True - False - False - False - Insensitive - True - edit-find-symbolic - - - False - True - - - - - False - True - False - False - False - Insensitive Active - True - go-up-symbolic - True - - - False - True - - - - - - - - diff --git a/tests/visuals/inline-toolbar-vertical.ui b/tests/visuals/inline-toolbar-vertical.ui deleted file mode 100644 index f009cce7b7..0000000000 --- a/tests/visuals/inline-toolbar-vertical.ui +++ /dev/null @@ -1,122 +0,0 @@ - - - - - False - 300 - 350 - - - 6 - vertical - - - True - False - True - vertical - icons - - - - False - True - False - False - Normal - True - list-add-symbolic - - - False - True - - - - - False - True - False - False - Normal - True - list-add-symbolic - - - False - True - - - - - False - True - False - False - Active - True - list-remove-symbolic - True - - - False - True - - - - - False - True - False - False - Active - True - list-remove-symbolic - True - - - False - True - - - - - False - True - False - False - False - Insensitive - True - edit-find-symbolic - - - False - True - - - - - False - True - False - False - False - Insensitive Active - True - go-up-symbolic - True - - - False - True - - - - - - - - -- 2.30.2