Skip to content

Commit 5ea55ab

Browse files
megaxkhurshid-alam
authored andcommitted
Fix selection checkboxes for Gnome apps. Fixes #304
We are only using png here ,but it also plays well with svg.
1 parent 70dec4c commit 5ea55ab

2 files changed

Lines changed: 28 additions & 8 deletions

File tree

gtk-3.0/scss/widgets/_toggle.scss

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,20 @@ $suffix: if($variant == "dark", "-dark", "");
5656

5757
.check { @include toggle("checkbox"); }
5858

59-
GtkIconView.content-view.cell.check {
60-
-gtk-icon-source: url("assets/grid-selection-unchecked#{$suffix}.png");
61-
62-
&:active { -gtk-icon-source: url("assets/grid-selection-checked#{$suffix}.png"); }
59+
//selection-mode
60+
@each $s,$as in ('', '-unchecked'),
61+
(':hover', '-unchecked'),
62+
(':active', '-checked'),
63+
(':backdrop', '-unchecked'),
64+
(':checked', '-checked'),
65+
(':checked:hover', '-checked'),
66+
(':checked:active', '-checked'),
67+
(':backdrop:checked', '-checked') {
68+
.view.content-view.check#{$s}:not(list) {
69+
-gtk-icon-shadow: none;
70+
-gtk-icon-source: url("../assets/grid-selection#{$as}#{$suffix}.png");
71+
background-color: transparent;
72+
}
6373
}
6474
}
6575

gtk-3.20/scss/widgets/_toggle.scss

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,20 @@ $suffix: if($variant == "dark", "-dark", "");
6666
margin-left: $spacing;
6767
}
6868

69-
iconview.content-view.cell.check {
70-
-gtk-icon-source: url("assets/grid-selection-unchecked#{$suffix}.png");
71-
72-
&:active { -gtk-icon-source: url("assets/grid-selection-checked#{$suffix}.png"); }
69+
//selection-mode
70+
@each $s,$as in ('', '-unchecked'),
71+
(':hover', '-unchecked'),
72+
(':active', '-checked'),
73+
(':backdrop', '-unchecked'),
74+
(':checked', '-checked'),
75+
(':checked:hover', '-checked'),
76+
(':checked:active', '-checked'),
77+
(':backdrop:checked', '-checked') {
78+
.view.content-view.check#{$s}:not(list) {
79+
-gtk-icon-shadow: none;
80+
-gtk-icon-source: url("../assets/grid-selection#{$as}#{$suffix}.png");
81+
background-color: transparent;
82+
}
7383
}
7484
}
7585

0 commit comments

Comments
 (0)