Fixing color schemes

This commit is contained in:
2026-01-30 20:15:43 +01:00
parent 44d1e9af24
commit eb3969b952
22 changed files with 2888 additions and 482 deletions

View File

@@ -1,6 +1,7 @@
#[derive(Clone, Copy, PartialEq, Eq, Default)]
pub enum OptionsFocus {
#[default]
ColorScheme,
RefreshRate,
RuntimeHighlight,
ShowScope,
@@ -20,6 +21,7 @@ pub struct OptionsState {
impl OptionsState {
pub fn next_focus(&mut self) {
self.focus = match self.focus {
OptionsFocus::ColorScheme => OptionsFocus::RefreshRate,
OptionsFocus::RefreshRate => OptionsFocus::RuntimeHighlight,
OptionsFocus::RuntimeHighlight => OptionsFocus::ShowScope,
OptionsFocus::ShowScope => OptionsFocus::ShowSpectrum,
@@ -28,13 +30,14 @@ impl OptionsState {
OptionsFocus::FlashBrightness => OptionsFocus::LinkEnabled,
OptionsFocus::LinkEnabled => OptionsFocus::StartStopSync,
OptionsFocus::StartStopSync => OptionsFocus::Quantum,
OptionsFocus::Quantum => OptionsFocus::RefreshRate,
OptionsFocus::Quantum => OptionsFocus::ColorScheme,
};
}
pub fn prev_focus(&mut self) {
self.focus = match self.focus {
OptionsFocus::RefreshRate => OptionsFocus::Quantum,
OptionsFocus::ColorScheme => OptionsFocus::Quantum,
OptionsFocus::RefreshRate => OptionsFocus::ColorScheme,
OptionsFocus::RuntimeHighlight => OptionsFocus::RefreshRate,
OptionsFocus::ShowScope => OptionsFocus::RuntimeHighlight,
OptionsFocus::ShowSpectrum => OptionsFocus::ShowScope,