forked from Shinonome/dots-hyprland
add gradience settings to color panel
This commit is contained in:
@@ -104,7 +104,7 @@ const initScheme = Utils.exec(`bash -c "sed -n \'3p\' ${LIGHTDARK_FILE_LOCATION}
|
|||||||
const initSchemeIndex = calculateSchemeInitIndex(schemeOptionsArr, initScheme);
|
const initSchemeIndex = calculateSchemeInitIndex(schemeOptionsArr, initScheme);
|
||||||
|
|
||||||
const ColorSchemeSettings = () => Widget.Box({
|
const ColorSchemeSettings = () => Widget.Box({
|
||||||
className: 'osd-colorscheme-settings spacing-v-5',
|
className: 'osd-colorscheme-settings spacing-v-5 margin-20',
|
||||||
vertical: true,
|
vertical: true,
|
||||||
vpack: 'center',
|
vpack: 'center',
|
||||||
children: [
|
children: [
|
||||||
@@ -142,6 +142,34 @@ const ColorSchemeSettings = () => Widget.Box({
|
|||||||
.catch(print);
|
.catch(print);
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
Widget.Box({
|
||||||
|
tooltipText: 'Theme GTK apps using accent color\n(drawback: dark/light mode switching requires restart)',
|
||||||
|
className: 'txt spacing-h-5 configtoggle-box',
|
||||||
|
children: [
|
||||||
|
MaterialIcon('imagesearch_roller', 'norm'),
|
||||||
|
Widget.Label({
|
||||||
|
className: 'txt txt-small',
|
||||||
|
label: 'Use Gradience',
|
||||||
|
}),
|
||||||
|
Widget.Box({ hexpand: true }),
|
||||||
|
ConfigMulipleSelection({
|
||||||
|
hpack: 'center',
|
||||||
|
vpack: 'center',
|
||||||
|
optionsArr: [
|
||||||
|
[{ name: 'Off', value: 0 }, { name: 'On', value: 1 }],
|
||||||
|
],
|
||||||
|
initIndex: [-1, -1],
|
||||||
|
onChange: (value, name) => {
|
||||||
|
const ADWAITA_BLUE = "#3584E4";
|
||||||
|
if (value) execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchcolor.sh - --yes-gradience`, `&`])
|
||||||
|
.catch(print);
|
||||||
|
else execAsync([`bash`, `-c`, `${App.configDir}/scripts/color_generation/switchcolor.sh "${ADWAITA_BLUE}" --no-gradience`, `&`])
|
||||||
|
.catch(print);
|
||||||
|
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
}),
|
||||||
]
|
]
|
||||||
}),
|
}),
|
||||||
Widget.Box({
|
Widget.Box({
|
||||||
|
|||||||
@@ -414,6 +414,9 @@
|
|||||||
.padding-#{$spacing} {
|
.padding-#{$spacing} {
|
||||||
padding: 0.068rem * $spacing;
|
padding: 0.068rem * $spacing;
|
||||||
}
|
}
|
||||||
|
.margin-#{$spacing} {
|
||||||
|
padding: 0.068rem * $spacing;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.width-10 {
|
.width-10 {
|
||||||
|
|||||||
Reference in New Issue
Block a user