Commit 980ceeb2 authored by pontaoski's avatar pontaoski 🌈
Browse files

Revert "[GTK3] Revert checkbox recolouring"

Summary:
This reverts commit b1649126, as an upstream librsvg bug was fixed, allowing checkboxes and radiobuttons to recolour properly.

https://gitlab.gnome.org/GNOME/librsvg/issues/525

Test Plan: See that checkbox recolouring works as expected.

Reviewers: #breeze, #vdg, ngraham

Reviewed By: #breeze, #vdg, ngraham

Subscribers: ngraham, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25336
parent 4a472fd0
......@@ -3,20 +3,6 @@
/*************************
* Check and Radio items *
*************************/
@each $s,$as in ('','-unchecked'),
(':hover', '-unchecked-hover'),
(':active', '-unchecked-active'),
(':backdrop', '-unchecked-backdrop'),
(':checked', '-checked-active'),
(':checked:hover', '-checked-hover'),
(':checked:active', '-checked-active'),
(':backdrop:checked', '-checked-backdrop') {
.view.content-view.check#{$s}:not(list) {
-gtk-icon-shadow: none;
-gtk-icon-source: -gtk-scaled(url("../assets/check-selectionmode#{$as}.png"), url("../assets/check-selectionmode#{$as}@2.png"));
background-color: transparent;
}
}
checkbutton.text-button, radiobutton.text-button {
// this is for a nice focus on check and radios text
......@@ -32,53 +18,43 @@ checkbutton.text-button, radiobutton.text-button {
}
}
@each $a in ('check','radio') {
check, radio {
margin: 0 4px;
#{$a} {
margin: 0 4px;
&:only-child { margin: 0; }
&:only-child { margin: 0; }
min-height: 18px;
min-width: 18px;
//border: none;
animation: none;
background-color: transparent;
-gtk-icon-palette: error gtk("@theme_button_decoration_focus"), success gtk("@borders"), warning gtk("@theme_button_background_normal");
-gtk-icon-shadow: 1px 1px rgba(35,38,41,0.2);
min-height: 18px;
min-width: 18px;
//border: none;
animation: none;
background-color: transparent;
-gtk-icon-source: -gtk-scaled(url("../assets/#{$a}-unchecked.png"), url("../assets/#{$a}-unchecked@2.png"));
&:hover {
-gtk-icon-palette: error gtk("@theme_button_decoration_focus"), success gtk("@theme_button_decoration_focus"), warning gtk("@theme_button_background_normal");
}
&:disabled {
-gtk-icon-palette: error gtk("@theme_button_decoration_focus_insensitive"), success gtk("@insensitive_borders"), warning gtk("@theme_button_background_insensitive");
}
@each $s,$as in ('hover','-hover'),
('active','-active'),
('disabled','-insensitive'),
('backdrop','-backdrop'),
('backdrop:disabled','-backdrop-insensitive') {
&:#{$s} { -gtk-icon-source: -gtk-scaled(url("../assets/#{$a}-unchecked#{$as}.png"), url("../assets/#{$a}-unchecked#{$as}@2.png")); }
&:checked {
-gtk-icon-source: -gtk-scaled(url("../assets/#{$a}-checked-active.png"), url("../assets/#{$a}-checked-active@2.png"));
&:#{$s} { -gtk-icon-source: -gtk-scaled(url("../assets/#{$a}-checked#{$as}.png"), url("../assets/#{$a}-checked#{$as}@2.png")); }
}
&:indeterminate {
-gtk-icon-source: -gtk-scaled(url("../assets/#{$a}-mixed-active.png"), url("../assets/#{$a}-mixed-active@2.png"));
&:#{$s} { -gtk-icon-source: -gtk-scaled(url("../assets/#{$a}-mixed#{$as}.png"), url("../assets/#{$a}-mixed#{$as}@2.png")); }
}
menu menuitem & {
margin: 0; // this is a workaround for a menu check/radio size allocation issue
min-height: 18px;
min-width: 18px;
background-color: transparent;
box-shadow: none;
-gtk-icon-shadow: none;
animation: none;
}
menu menuitem & {
margin: 0; // this is a workaround for a menu check/radio size allocation issue
min-height: 18px;
min-width: 18px;
background-color: transparent;
box-shadow: none;
-gtk-icon-shadow: none;
animation: none;
&:hover {
-gtk-icon-source: -gtk-scaled(url("../assets/#{$a}-unchecked.png"), url("../assets/#{$a}-unchecked@2.png"));
}
&:checked:hover {
-gtk-icon-source: -gtk-scaled(url("../assets/#{$a}-checked-active.png"), url("../assets/#{$a}-checked-active@2.png"));
}
&:indeterminate:hover {
-gtk-icon-source: -gtk-scaled(url("../assets/#{$a}-mixed-active.png"), url("../assets/#{$a}-mixed-active@2.png"));
}
}
}
@each $type in ('check', 'radio') {
#{$type} {
-gtk-icon-source: -gtk-recolor(url("../assets/breeze-#{$type}-unchecked-symbolic.svg"));
@each $state in ('checked', 'indeterminate') {
&:#{$state} {
-gtk-icon-source: -gtk-recolor(url("../assets/breeze-#{$type}-#{$state}-symbolic.svg"));
}
}
}
}
\ No newline at end of file
}
......@@ -205,14 +205,27 @@ modelbutton.flat,
@extend %undecorated_button;
color: gtk("@theme_unfocused_fg_color");
}
check:hover {-gtk-icon-source: -gtk-scaled(url("../assets/check-unchecked.png"), url("../assets/check-unchecked@2.png"));}
radio:hover {-gtk-icon-source: -gtk-scaled(url("../assets/radio-unchecked.png"), url("../assets/radio-unchecked@2.png"));}
check:checked:hover {-gtk-icon-source: -gtk-scaled(url("../assets/check-checked-active.png"), url("../assets/check-checked-active@2.png"));}
radio:checked:hover {-gtk-icon-source: -gtk-scaled(url("../assets/radio-checked-active.png"), url("../assets/radio-checked-active@2.png"));}
check:indeterminate:hover {-gtk-icon-source: -gtk-scaled(url("../assets/check-mixed.png"), url("../assets/check-mixed@2.png"));}
radio:indeterminate:hover {-gtk-icon-source: -gtk-scaled(url("../assets/radio-mixed.png"), url("../assets/radio-mixed@2.png"));}
check, radio {
-gtk-icon-palette: error gtk("@theme_button_decoration_focus"), success gtk("@borders"), warning gtk("@theme_button_background_normal");
-gtk-icon-shadow: 1px 1px rgba(35,38,41,0.2);
&:hover {
-gtk-icon-palette: error gtk("@theme_button_decoration_focus"), success gtk("@theme_button_decoration_focus"), warning gtk("@theme_button_background_normal");
}
&:disabled {
-gtk-icon-palette: error gtk("@theme_button_decoration_focus_insensitive"), success gtk("@insensitive_borders"), warning gtk("@theme_button_background_insensitive");
}
}
@each $type in ('check', 'radio') {
#{$type} {
-gtk-icon-source: -gtk-recolor(url("../assets/breeze-#{$type}-unchecked-symbolic.svg"));
@each $state in ('checked', 'indeterminate') {
&:#{$state} {
-gtk-icon-source: -gtk-recolor(url("../assets/breeze-#{$type}-#{$state}-symbolic.svg"));
}
}
}
}
// FIXME: remove the following when the checks/radios rewrite lands
check:last-child,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment