gtk: Change switch thumb color in dark theme
Lighten it as a special case.
Lighten it as a special case.
by roundabout, Monday, 23 December 2019, 14:21:01 (1577110861), pushed by roundabout, Sunday, 11 May 2025, 13:22:46 (1746969766)
Author identity: nana-4 <hnmaigo@gmail.com>
7ae974827fdee1a5560b1174ddf00eca0e247d79
$-dark-surface-1dp: mix(white, $-dark-background, 5%);
$-dark-surface-4dp: mix(white, $-dark-background, 9%);
$-dark-surface-8dp: mix(white, $-dark-background, 12%);
$-dark-surface-switch: mix(white, $-dark-background, 60%);
//
// Main colors
$background: if($variant == 'light', #F2F2F2, $-dark-background);
$surface: if($variant == 'light', #FFFFFF, $-dark-surface-8dp);
$switch-surface: if($variant == 'light', #FFFFFF, $-dark-surface-switch); // Special case for switches
$base: if($variant == 'light', #FFFFFF, $-dark-surface-1dp); // semi-surface with 1dp elevation
$base-alt: if($variant == 'light', #FAFAFA, $-dark-surface-1dp);
$background: %BG%;
$surface: %MATERIA_SURFACE%;
$switch-surface: %MATERIA_SURFACE%; // Special case for switches
$base: %MATERIA_VIEW%;
$base-alt: %INACTIVE_MATERIA_VIEW%;
border-radius: $circular-radius;
outline: none;
box-shadow: 0 0 0 10px transparent, $shadow-z1;
background-color: $surface;
background-color: $switch-surface;
}
&:focus slider { box-shadow: 0 0 0 10px $overlay-focus, $shadow-z1; }