From a1ccc136f3c18be9cc76088665667cef345f2edb Mon Sep 17 00:00:00 2001 From: vinceliuice Date: Sun, 6 Feb 2022 11:03:52 +0800 Subject: [PATCH] Fixed issues --- .../checkbox-checked-big-symbolic.svg | 4 ++ src/main/gtk-3.0/gtk.gresource.xml | 1 + src/main/gtk-3.0/make_gresource_xml.sh | 1 + src/other/firefox/WhiteSur/parts/buttons.css | 1 + src/sass/gtk/_common-3.0.scss | 69 +++++++++++-------- 5 files changed, 46 insertions(+), 30 deletions(-) create mode 100644 src/assets/gtk/scalable/checkbox-checked-big-symbolic.svg diff --git a/src/assets/gtk/scalable/checkbox-checked-big-symbolic.svg b/src/assets/gtk/scalable/checkbox-checked-big-symbolic.svg new file mode 100644 index 0000000..f69375f --- /dev/null +++ b/src/assets/gtk/scalable/checkbox-checked-big-symbolic.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/main/gtk-3.0/gtk.gresource.xml b/src/main/gtk-3.0/gtk.gresource.xml index 0220588..240e127 100644 --- a/src/main/gtk-3.0/gtk.gresource.xml +++ b/src/main/gtk-3.0/gtk.gresource.xml @@ -190,6 +190,7 @@ windows-assets/titlebutton-restore-active-dark.png windows-assets/titlebutton-restore-active-dark@2.png assets/scalable/checkbox-checked-symbolic.svg + assets/scalable/checkbox-checked-big-symbolic.svg assets/scalable/checkbox-mixed-symbolic.svg assets/scalable/radio-checked-symbolic.svg assets/scalable/combobox-arrow-symbolic.svg diff --git a/src/main/gtk-3.0/make_gresource_xml.sh b/src/main/gtk-3.0/make_gresource_xml.sh index a8aba34..4f2600d 100755 --- a/src/main/gtk-3.0/make_gresource_xml.sh +++ b/src/main/gtk-3.0/make_gresource_xml.sh @@ -33,6 +33,7 @@ do done echo " assets/scalable/checkbox-checked-symbolic.svg" >> gtk.gresource.xml +echo " assets/scalable/checkbox-checked-big-symbolic.svg" >> gtk.gresource.xml echo " assets/scalable/checkbox-mixed-symbolic.svg" >> gtk.gresource.xml echo " assets/scalable/radio-checked-symbolic.svg" >> gtk.gresource.xml echo " assets/scalable/combobox-arrow-symbolic.svg" >> gtk.gresource.xml diff --git a/src/other/firefox/WhiteSur/parts/buttons.css b/src/other/firefox/WhiteSur/parts/buttons.css index 4786393..78ca823 100644 --- a/src/other/firefox/WhiteSur/parts/buttons.css +++ b/src/other/firefox/WhiteSur/parts/buttons.css @@ -255,6 +255,7 @@ button.close, min-height: 32px !important; min-width: 32px !important; border-radius: 100% !important; + outline: none !important; } /* Combined buttons */ diff --git a/src/sass/gtk/_common-3.0.scss b/src/sass/gtk/_common-3.0.scss index 8f034bc..01e5139 100644 --- a/src/sass/gtk/_common-3.0.scss +++ b/src/sass/gtk/_common-3.0.scss @@ -1405,9 +1405,9 @@ actionbar { background-color: darken($bg_color, 3%); } - // .background.csd revealer > & > revealer > box, .background.csd > box.vertical > & > revealer > box, - .background.csd > box > box > box > & > revealer > box { + .background.csd > box > box > box > & > revealer > box, + .background.csd stack revealer > & > revealer > box { border-radius: 0 0 $wm_radius $wm_radius; } } @@ -2818,13 +2818,6 @@ switch { // // Check and Radio items // -.view.content-view.check:not(list), -.content-view .tile check:not(list) { - min-height: 40px; - min-width: 40px; - margin: 0; - padding: 0; -} checkbutton, radiobutton { // this is for a nice focus on check and radios text @@ -2846,12 +2839,23 @@ $check_radio_border: if($variant == 'light', rgba(black, 0.2), rgba(black, 0.1)) $check_radio_image: if($colorscheme == 'nord', linear-gradient(0deg, #59647b 0%, #475061 100%), linear-gradient(0deg, #6a6a6a 0%, #545454 100%)); $check_radio_checked_image: linear-gradient(0deg, darken($selected_bg_color, 5%) 0%, lighten($selected_bg_color, 5%) 100%); -check, +%check, +check { + border-radius: 3px; + + &:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-checked-symbolic.svg")); } + &:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-mixed-symbolic.svg")); } +} + +%radio, radio { - min-width: 14px; - min-height: 14px; - margin: 3px; - padding: 0; + border-radius: $circular_radius; + + &:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-checked-symbolic.svg")); } + &:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-mixed-symbolic.svg")); } +} + +%check_and_radio { color: transparent; background-color: $base_color; transition: $button_transition; @@ -2932,6 +2936,27 @@ radio { } @else { box-shadow: none; } } } +} + +.view.content-view.check:not(list), +.content-view .tile check:not(list) { + min-height: 40px; + min-width: 40px; + margin: 0; + padding: 0; + border-radius: $bt_radius; + @extend %check_and_radio; + + &:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-checked-big-symbolic.svg")); } +} + +check, +radio { + min-width: 14px; + min-height: 14px; + margin: 3px; + padding: 0; + @extend %check_and_radio; menu menuitem & { margin: 0; @@ -2941,22 +2966,6 @@ radio { } } -%check, -check { - border-radius: 3px; - - &:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-checked-symbolic.svg")); } - &:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/checkbox-mixed-symbolic.svg")); } -} - -%radio, -radio { - border-radius: $circular_radius; - - &:checked { -gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-checked-symbolic.svg")); } - &:indeterminate { -gtk-icon-source: -gtk-recolor(url("assets/scalable/radio-mixed-symbolic.svg")); } -} - // // GtkScale //