mirror of
https://github.com/GyulyVGC/sniffnet.git
synced 2026-07-10 18:33:05 +00:00
rename OLED themes to A11y
This commit is contained in:
parent
44c3591f3c
commit
b4ebe43b05
4 changed files with 22 additions and 22 deletions
|
|
@ -9,7 +9,7 @@ All Sniffnet releases with the relative changes are documented in this file.
|
|||
- Portuguese ([#690](https://github.com/GyulyVGC/sniffnet/pull/690))
|
||||
- Ukrainian ([#692](https://github.com/GyulyVGC/sniffnet/pull/692))
|
||||
- Show more information when domain name is short ([#720](https://github.com/GyulyVGC/sniffnet/pull/720) — fixes [#696](https://github.com/GyulyVGC/sniffnet/issues/696))
|
||||
- Added new themes _OLED (Night)_ and _OLED (Day)_ based on palettes optimized for OLED displays and users with visual impairments ([#708](https://github.com/GyulyVGC/sniffnet/pull/708))
|
||||
- Added new themes _A11y (Night)_ and _A11y (Day)_ based on palettes optimized for OLED displays and users with visual impairments ([#708](https://github.com/GyulyVGC/sniffnet/pull/708))
|
||||
- Add icon to window title bar ([#719](https://github.com/GyulyVGC/sniffnet/pull/719) — fixes [#715](https://github.com/GyulyVGC/sniffnet/issues/715))
|
||||
- Fix _crates.io_ package for Windows ([#718](https://github.com/GyulyVGC/sniffnet/pull/718) — fixes [#681](https://github.com/GyulyVGC/sniffnet/issues/681))
|
||||
- Remove pre-uninstall script on Linux (fixes [#644](https://github.com/GyulyVGC/sniffnet/issues/644))
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use once_cell::sync::Lazy;
|
|||
use crate::gui::styles::types::palette::Palette;
|
||||
use crate::gui::styles::types::palette_extension::PaletteExtension;
|
||||
|
||||
pub static OLED_DARK_PALETTE: Lazy<Palette> = Lazy::new(|| Palette {
|
||||
pub static A11Y_DARK_PALETTE: Lazy<Palette> = Lazy::new(|| Palette {
|
||||
primary: color!(0x000000),
|
||||
secondary: color!(0x934900),
|
||||
outgoing: color!(0xF0F0F0),
|
||||
|
|
@ -18,10 +18,10 @@ pub static OLED_DARK_PALETTE: Lazy<Palette> = Lazy::new(|| Palette {
|
|||
text_body: color!(0xfcfaf0),
|
||||
});
|
||||
|
||||
pub static OLED_DARK_PALETTE_EXTENSION: Lazy<PaletteExtension> =
|
||||
Lazy::new(|| OLED_DARK_PALETTE.generate_palette_extension());
|
||||
pub static A11Y_DARK_PALETTE_EXTENSION: Lazy<PaletteExtension> =
|
||||
Lazy::new(|| A11Y_DARK_PALETTE.generate_palette_extension());
|
||||
|
||||
pub static OLED_LIGHT_PALETTE: Lazy<Palette> = Lazy::new(|| Palette {
|
||||
pub static A11Y_LIGHT_PALETTE: Lazy<Palette> = Lazy::new(|| Palette {
|
||||
primary: color!(0xFFFFFF),
|
||||
secondary: color!(0x6CB6FF),
|
||||
outgoing: color!(0x0F0F0F),
|
||||
|
|
@ -30,5 +30,5 @@ pub static OLED_LIGHT_PALETTE: Lazy<Palette> = Lazy::new(|| Palette {
|
|||
text_body: color!(0x03050F),
|
||||
});
|
||||
|
||||
pub static OLED_LIGHT_PALETTE_EXTENSION: Lazy<PaletteExtension> =
|
||||
Lazy::new(|| OLED_LIGHT_PALETTE.generate_palette_extension());
|
||||
pub static A11Y_LIGHT_PALETTE_EXTENSION: Lazy<PaletteExtension> =
|
||||
Lazy::new(|| A11Y_LIGHT_PALETTE.generate_palette_extension());
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
pub mod a11y;
|
||||
pub mod dracula;
|
||||
pub mod gruvbox;
|
||||
pub mod nord;
|
||||
pub mod oled;
|
||||
pub mod solarized;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
use std::fmt;
|
||||
use std::hash::Hash;
|
||||
|
||||
use crate::gui::styles::custom_themes::a11y::{
|
||||
A11Y_DARK_PALETTE, A11Y_DARK_PALETTE_EXTENSION, A11Y_LIGHT_PALETTE,
|
||||
A11Y_LIGHT_PALETTE_EXTENSION,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::gui::styles::custom_themes::dracula::{
|
||||
|
|
@ -15,10 +19,6 @@ use crate::gui::styles::custom_themes::nord::{
|
|||
NORD_DARK_PALETTE, NORD_DARK_PALETTE_EXTENSION, NORD_LIGHT_PALETTE,
|
||||
NORD_LIGHT_PALETTE_EXTENSION,
|
||||
};
|
||||
use crate::gui::styles::custom_themes::oled::{
|
||||
OLED_DARK_PALETTE, OLED_DARK_PALETTE_EXTENSION, OLED_LIGHT_PALETTE,
|
||||
OLED_LIGHT_PALETTE_EXTENSION,
|
||||
};
|
||||
use crate::gui::styles::custom_themes::solarized::{
|
||||
SOLARIZED_DARK_PALETTE, SOLARIZED_DARK_PALETTE_EXTENSION, SOLARIZED_LIGHT_PALETTE,
|
||||
SOLARIZED_LIGHT_PALETTE_EXTENSION,
|
||||
|
|
@ -55,8 +55,8 @@ pub enum ExtraStyles {
|
|||
NordLight,
|
||||
SolarizedDark,
|
||||
SolarizedLight,
|
||||
OledDark,
|
||||
OledLight,
|
||||
A11yDark,
|
||||
A11yLight,
|
||||
CustomToml(CustomPalette),
|
||||
}
|
||||
|
||||
|
|
@ -72,8 +72,8 @@ impl ExtraStyles {
|
|||
ExtraStyles::NordLight => *NORD_LIGHT_PALETTE,
|
||||
ExtraStyles::SolarizedDark => *SOLARIZED_DARK_PALETTE,
|
||||
ExtraStyles::SolarizedLight => *SOLARIZED_LIGHT_PALETTE,
|
||||
ExtraStyles::OledDark => *OLED_DARK_PALETTE,
|
||||
ExtraStyles::OledLight => *OLED_LIGHT_PALETTE,
|
||||
ExtraStyles::A11yDark => *A11Y_DARK_PALETTE,
|
||||
ExtraStyles::A11yLight => *A11Y_LIGHT_PALETTE,
|
||||
ExtraStyles::CustomToml(custom_palette) => custom_palette.palette,
|
||||
}
|
||||
}
|
||||
|
|
@ -89,8 +89,8 @@ impl ExtraStyles {
|
|||
ExtraStyles::NordLight => *NORD_LIGHT_PALETTE_EXTENSION,
|
||||
ExtraStyles::SolarizedDark => *SOLARIZED_DARK_PALETTE_EXTENSION,
|
||||
ExtraStyles::SolarizedLight => *SOLARIZED_LIGHT_PALETTE_EXTENSION,
|
||||
ExtraStyles::OledDark => *OLED_DARK_PALETTE_EXTENSION,
|
||||
ExtraStyles::OledLight => *OLED_LIGHT_PALETTE_EXTENSION,
|
||||
ExtraStyles::A11yDark => *A11Y_DARK_PALETTE_EXTENSION,
|
||||
ExtraStyles::A11yLight => *A11Y_LIGHT_PALETTE_EXTENSION,
|
||||
ExtraStyles::CustomToml(custom_palette) => custom_palette.extension,
|
||||
}
|
||||
}
|
||||
|
|
@ -106,8 +106,8 @@ impl ExtraStyles {
|
|||
ExtraStyles::NordLight,
|
||||
ExtraStyles::SolarizedDark,
|
||||
ExtraStyles::SolarizedLight,
|
||||
ExtraStyles::OledDark,
|
||||
ExtraStyles::OledLight,
|
||||
ExtraStyles::A11yDark,
|
||||
ExtraStyles::A11yLight,
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -123,8 +123,8 @@ impl fmt::Display for ExtraStyles {
|
|||
ExtraStyles::NordDark => write!(f, "Nord (Night)"),
|
||||
ExtraStyles::SolarizedLight => write!(f, "Solarized (Day)"),
|
||||
ExtraStyles::SolarizedDark => write!(f, "Solarized (Night)"),
|
||||
ExtraStyles::OledLight => write!(f, "OLED (Day)"),
|
||||
ExtraStyles::OledDark => write!(f, "OLED (Night)"),
|
||||
ExtraStyles::A11yLight => write!(f, "A11y (Day)"),
|
||||
ExtraStyles::A11yDark => write!(f, "A11y (Night)"),
|
||||
// Custom style names aren't used anywhere so this shouldn't be reached
|
||||
ExtraStyles::CustomToml(_) => unreachable!(),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue