Skip to content

Commit 690532b

Browse files
megaxkhurshid-alam
authored andcommitted
Optimized modelbutton code.
1 parent f1c11cd commit 690532b

1 file changed

Lines changed: 19 additions & 24 deletions

File tree

src/gtk-3.20/scss/widgets/_menu.scss

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -293,39 +293,34 @@
293293
}
294294
}
295295

296-
modelbutton {
296+
modelbutton.flat,
297+
menuitem.button.flat {
297298
padding: $spacing ($spacing + 2px);
298-
border: none;
299-
transition: 150ms ease;
300299
outline-color: transparent;
300+
transition: none;
301301

302-
&, &:backdrop, &.flat, &.flat:backdrop {
303-
//@extend %undecorated_button;
302+
@extend %undecorated_button;
304303

305-
&:hover { background-color: $selected_bg_color; color: $selected_fg_color }
306-
307-
&:active, &:selected { &, arrow { @extend %selected_items; } }
308-
309-
&:checked { color: $fg_color; }
304+
&:hover {
305+
background-color: $selected_bg_color;
306+
color: $selected_fg_color;
307+
}
310308

311-
// FIXME: temporary workaround
312-
check:last-child,
313-
radio:last-child { margin-left: 8px; }
309+
&:active, &:selected { &, arrow { @extend %selected_items; } }
314310

315-
check:first-child,
316-
radio:first-child { margin-right: 8px; }
311+
&:checked { color: $fg_color; }
317312

318-
&.flat arrow {
319-
&.left { -gtk-icon-source: -gtk-icontheme("pan-start-symbolic"); }
313+
arrow {
314+
&.left { -gtk-icon-source: -gtk-icontheme("pan-start-symbolic"); }
320315

321-
&.right { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
322-
}
316+
&.right { -gtk-icon-source: -gtk-icontheme("pan-end-symbolic"); }
323317
}
324318

325-
&.flat {
326-
&, &:hover {
327-
transition: none;
328-
}
329-
}
319+
// FIXME: temporary workaround
320+
check:last-child,
321+
radio:last-child { margin-left: 8px; }
322+
323+
check:first-child,
324+
radio:first-child { margin-right: 8px; }
330325
}
331326
}

0 commit comments

Comments
 (0)