From 73bba62d8282f2a287f80113e0b0c106fc2e3b40 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 29 Oct 2021 11:14:24 -0400 Subject: [PATCH 1/3] widget-factory: Add a color button to the toolbar This is to check that our 'nested' buttons come out as expected in a toolbar context. --- demos/widget-factory/widget-factory.ui | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui index 7c190d08cb..1ad023c98b 100644 --- a/demos/widget-factory/widget-factory.ui +++ b/demos/widget-factory/widget-factory.ui @@ -1923,6 +1923,12 @@ microphone-sensitivity-medium-symbolic Insert something + + + #9141AC + Select a color + + From 860821114a6fdf8076872a601a07209321016f08 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 28 Oct 2021 21:05:13 -0400 Subject: [PATCH 2/3] Don't make all buttons in toolbars flat When a combobox is put in a toolbar, we don't want its button to lose its border. Fixes: #4384 --- gtk/theme/Default/_common.scss | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gtk/theme/Default/_common.scss b/gtk/theme/Default/_common.scss index ebef2a800c..80d7a061c3 100644 --- a/gtk/theme/Default/_common.scss +++ b/gtk/theme/Default/_common.scss @@ -606,7 +606,7 @@ button { min-width: 26px; min-height: 32px; - &.image-button { + &.image-button { min-width: 30px; &:only-child { margin: 4px; @@ -895,7 +895,15 @@ modelbutton.flat arrow { /* oldstyle toolbar buttons */ -.toolbar button { +.toolbar > button, +.toolbar > :not(.linked) > button, +.toolbar :not(.linked) > menubutton > button, +.toolbar :not(.linked) > scalebutton > button, +.toolbar :not(.linked) > dropdown > button, +.toolbar :not(.linked) > colorbutton > button, +.toolbar :not(.linked) > fontbutton > button, +.toolbar :not(.linked) > appchooserbutton > button, +.toolbar :not(.linked) > combobox > box > button { margin: 1px; @extend %button_basic_flat; @@ -2401,7 +2409,7 @@ switch { border-radius: 50%; transition: $button_transition; } - + > image { color: transparent; } /* only show i / o for the accessible theme */ &:hover > slider { @@ -2510,7 +2518,7 @@ radio { } } } - + @if $variant == 'light' { // the borders of the light variant versions of checks and radios are too similar in luminosity to the selected background // color, hence we need special casing. From 031c37c7b0b8d2cdcd0e94b7ffa4c849ee11dd85 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 29 Oct 2021 11:50:30 -0400 Subject: [PATCH 3/3] theme: Remove GtkToolbar remnants We don't ship a widget with css name 'toolbar' anymore, so don't waste selectors on it. --- gtk/theme/Default/_common.scss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gtk/theme/Default/_common.scss b/gtk/theme/Default/_common.scss index 80d7a061c3..d8c38e6988 100644 --- a/gtk/theme/Default/_common.scss +++ b/gtk/theme/Default/_common.scss @@ -1304,8 +1304,7 @@ combobox { background-color: $bg_color; } -.toolbar, -toolbar { +.toolbar { @extend %toolbar; // on OSD @@ -1854,7 +1853,7 @@ popover.background { > list, > .view, - > toolbar { + > .toolbar { border-style: none; background-color: transparent; }