improv(display): replace flipped orientations with rotates

This commit is contained in:
Michael Aaron Murphy 2024-02-29 01:20:02 +01:00
parent d02a9f2f67
commit 1b4bfb619b
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
9 changed files with 19 additions and 77 deletions

View file

@ -204,8 +204,8 @@ impl page::Page<crate::pages::Message> for Page {
text::DISPLAY_REFRESH_RATE.as_str().into(),
text::DISPLAY_SCALE.as_str().into(),
text::ORIENTATION.as_str().into(),
text::ORIENTATION_LANDSCAPE.as_str().into(),
text::ORIENTATION_PORTRAIT.as_str().into(),
text::ORIENTATION_STANDARD.as_str().into(),
text::ORIENTATION_ROTATE_90.as_str().into(),
])
.view::<Page>(|_binder, page, _section| page.display_view()),
),
@ -364,10 +364,10 @@ impl Page {
}
self.cache.orientations = [
text::ORIENTATION_LANDSCAPE.as_str(),
text::ORIENTATION_PORTRAIT.as_str(),
text::ORIENTATION_LANDSCAPE_FLIPPED.as_str(),
text::ORIENTATION_PORTRAIT_FLIPPED.as_str(),
text::ORIENTATION_STANDARD.as_str(),
text::ORIENTATION_ROTATE_90.as_str(),
text::ORIENTATION_ROTATE_180.as_str(),
text::ORIENTATION_ROTATE_270.as_str(),
];
}
}
@ -449,8 +449,8 @@ impl Page {
Message::Orientation(match id {
0 => Transform::Normal,
1 => Transform::Rotate90,
2 => Transform::Flipped,
_ => Transform::Flipped90,
2 => Transform::Rotate180,
_ => Transform::Rotate270,
})
},
),
@ -544,8 +544,8 @@ impl Page {
self.cache.orientation_selected = match output.transform {
Some(Transform::Normal) => Some(0),
Some(Transform::Rotate90) => Some(1),
Some(Transform::Flipped) => Some(2),
Some(Transform::Flipped90) => Some(3),
Some(Transform::Rotate180) => Some(2),
Some(Transform::Rotate270) => Some(3),
_ => None,
};
self.cache.resolution_selected = None;
@ -605,7 +605,7 @@ impl Page {
self.cache.orientation_selected = match transform {
Transform::Normal => Some(0),
Transform::Rotate90 => Some(1),
Transform::Flipped => Some(2),
Transform::Rotate180 => Some(2),
_ => Some(3),
};

View file

@ -3,95 +3,63 @@
crate::cache_dynamic_lazy! {
pub static COLOR: String = fl!("color");
pub static COLOR_DEPTH: String = fl!("color", "depth");
pub static COLOR_PROFILE: String = fl!("color", "profile");
pub static COLOR_PROFILES: String = fl!("color", "sidebar");
pub static COLOR_TEMPERATURE: String = fl!("color", "temperature");
pub static DISPLAY: String = fl!("display");
pub static DISPLAY_ARRANGEMENT: String = fl!("display", "arrangement");
pub static DISPLAY_ARRANGEMENT_DESC: String = fl!("display", "arrangement-desc");
pub static DISPLAY_ENABLE: String = fl!("display", "enable");
pub static DISPLAY_EXTERNAL: String = fl!("display", "external");
pub static DISPLAY_LAPTOP: String = fl!("display", "laptop");
pub static DISPLAY_OPTIONS: String = fl!("display", "options");
pub static DISPLAY_REFRESH_RATE: String = fl!("display", "refresh-rate");
pub static DISPLAY_RESOLUTION: String = fl!("display", "resolution");
pub static DISPLAY_SCALE: String = fl!("display", "scale");
pub static GRAPHICS_MODE: String = fl!("graphics-mode");
pub static GRAPHICS_MODE_COMPUTE: String =
fl!("graphics-mode", "mode", mode = super::graphics::COMPUTE);
pub static GRAPHICS_MODE_COMPUTE_ENABLE: String =
fl!("graphics-mode", "enable", mode = super::graphics::COMPUTE);
pub static GRAPHICS_MODE_COMPUTE_DESC: String =
fl!("graphics-mode", "desc", mode = super::graphics::COMPUTE);
pub static GRAPHICS_MODE_HYBRID: String =
fl!("graphics-mode", "mode", mode = super::graphics::HYBRID);
pub static GRAPHICS_MODE_HYBRID_ENABLE: String =
fl!("graphics-mode", "enable", mode = super::graphics::HYBRID);
pub static GRAPHICS_MODE_HYBRID_DESC: String =
fl!("graphics-mode", "desc", mode = super::graphics::HYBRID);
pub static GRAPHICS_MODE_INTEGRATED: String =
fl!("graphics-mode", "mode", mode = super::graphics::INTEGRATED);
pub static GRAPHICS_MODE_INTEGRATED_ENABLE: String = fl!(
"graphics-mode",
"enable",
mode = super::graphics::INTEGRATED
);
pub static GRAPHICS_MODE_INTEGRATED_DESC: String =
fl!("graphics-mode", "desc", mode = super::graphics::INTEGRATED);
pub static GRAPHICS_MODE_NVIDIA: String =
fl!("graphics-mode", "mode", mode = super::graphics::NVIDIA);
pub static GRAPHICS_MODE_NVIDIA_ENABLE: String =
fl!("graphics-mode", "enable", mode = super::graphics::NVIDIA);
pub static GRAPHICS_MODE_NVIDIA_DESC: String =
fl!("graphics-mode", "desc", mode = super::graphics::NVIDIA);
pub static MIRRORING: String = fl!("mirroring");
pub static NIGHT_LIGHT: String = fl!("night-light");
pub static NIGHT_LIGHT_AUTO: String = fl!("night-light", "auto");
pub static NIGHT_LIGHT_DESCRIPTION: String = fl!("night-light", "desc");
pub static ORIENTATION: String = fl!("orientation");
pub static ORIENTATION_LANDSCAPE: String = fl!("orientation", "landscape");
pub static ORIENTATION_LANDSCAPE_FLIPPED: String = fl!("orientation", "landscape-flipped");
pub static ORIENTATION_PORTRAIT: String = fl!("orientation", "portrait");
pub static ORIENTATION_PORTRAIT_FLIPPED: String = fl!("orientation", "portrait-flipped");
pub static ORIENTATION_STANDARD: String = fl!("orientation", "standard");
pub static ORIENTATION_ROTATE_90: String = fl!("orientation", "rotate-90");
pub static ORIENTATION_ROTATE_180: String = fl!("orientation", "rotate-180");
pub static ORIENTATION_ROTATE_270: String = fl!("orientation", "rotate-270");
pub static SCHEDULING: String = fl!("scheduling");
pub static SCHEDULING_MANUAL: String = fl!("scheduling", "manual");
}

View file

@ -122,10 +122,10 @@ night-light = Night Light
.desc = Reduce blue light with warmer colors.
orientation = Orientation
.landscape = Landscape
.landscape-flipped = Landscape (Flipped)
.portrait = Portrait
.portrait-flipped = Portrait (Flipped)
.standard = Standard
.rotate-90 = Rotate 90
.rotate-180 = Rotate 180
.rotate-270 = Rotate 270
scheduling = Scheduling
.manual = Manual schedule

View file

@ -121,12 +121,6 @@ night-light = Night Light
.auto = Automatic (sunset to sunrise)
.desc = Reduce blue light with warmer colors.
orientation = Orientation
.landscape = Landscape
.landscape-flipped = Landscape (Flipped)
.portrait = Portrait
.portrait-flipped = Portrait (Flipped)
scheduling = Scheduling
.manual = Manual schedule

View file

@ -127,10 +127,6 @@ night-light = Nocne Światło
.desc = Zmniejsza ilość niebieskiego światła i ociepla kolory.
orientation = Kierunek
.landscape = Poziomy
.landscape-flipped = Poziomy (Obrócony)
.portrait = Pionowy
.portrait-flipped = Pionowy (Obrócony)
scheduling = Harmonogram
.manual = Ręcznie ustawiony harmonogram

View file

@ -122,10 +122,6 @@ night-light = Luz noturna
.desc = Reduz a luz azul com cores mais quentes.
orientation = Orientação
.landscape = Horizontal
.landscape-flipped = Horizontal (invertida)
.portrait = Vertical
.portrait-flipped = Vertical (invertida)
scheduling = Agendamento
.manual = Agendamento manual

View file

@ -122,10 +122,6 @@ night-light = Ноћно светло
.desc = Смањите плаво светло топлијим бојама.
orientation = Оријентација
.landscape = Положено
.landscape-flipped = Положено (преокренуто)
.portrait = Усправно
.portrait-flipped = Усправно (преокренуто)
scheduling = Распоред
.manual = Ручни распоред

View file

@ -122,10 +122,6 @@ night-light = Noćno svetlo
.desc = Smanjite plavo svetlo toplijim bojama.
orientation = Orijentacija
.landscape = Položeno
.landscape-flipped = Položeno (preokrenuto)
.portrait = Uspravno
.portrait-flipped = Uspravno (preokrenuto)
scheduling = Planiranje
.manual = Ručni raspored

View file

@ -119,10 +119,6 @@ night-light = Nattljus
.desc = Reducera blått ljus med varmare färger.
orientation = Orientering
.landscape = Landskap
.landscape-flipped = Landskap (Vänd)
.portrait = Porträtt
.portrait-flipped = Porträtt (Vänd)
scheduling = Schemaläggning
.manual = Manuellt schema