Skip to content

Commit 0d1f119

Browse files
committed
add new A11y themes and improve modals
1 parent 0bd552d commit 0d1f119

3 files changed

Lines changed: 16 additions & 21 deletions

File tree

resources/themes/sniffnet_rebrand.toml

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/gui/styles/container.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl ContainerType {
5858
Background::Color(Color::TRANSPARENT)
5959
}
6060
ContainerType::ModalBackground => Background::Color(Color {
61-
a: 0.8,
61+
a: 0.9,
6262
..Color::BLACK
6363
}),
6464
}),
@@ -75,7 +75,7 @@ impl ContainerType {
7575
},
7676
width: match self {
7777
ContainerType::Standard
78-
| ContainerType::Modal
78+
| ContainerType::ModalBackground
7979
| ContainerType::Gradient(_)
8080
| ContainerType::HighlightedOnHeader
8181
| ContainerType::Highlighted => 0.0,
@@ -86,6 +86,7 @@ impl ContainerType {
8686
color: match self {
8787
ContainerType::Palette => Color::BLACK,
8888
ContainerType::BadgeInfo => colors.secondary,
89+
ContainerType::Modal => ext.buttons_color,
8990
_ => Color {
9091
a: ext.alpha_round_borders,
9192
..ext.buttons_color

src/gui/styles/custom_themes/a11y.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
#![allow(clippy::unreadable_literal)]
22

3-
//! Themes optimized for OLED displays and visually impaired users
4-
//! <https://github.com/GyulyVGC/sniffnet/pull/708>
3+
//! Themes optimized for Accessibility
4+
//! <https://github.com/GyulyVGC/sniffnet/pull/785>
55
66
use iced::color;
77

88
use crate::gui::styles::types::palette::Palette;
99
use crate::gui::styles::types::palette_extension::PaletteExtension;
1010

1111
pub static A11Y_DARK_PALETTE: std::sync::LazyLock<Palette> = std::sync::LazyLock::new(|| Palette {
12-
primary: color!(0x000000),
13-
secondary: color!(0x934900),
14-
outgoing: color!(0xF0F0F0),
15-
starred: color!(0xFFFF00),
16-
text_headers: color!(0xE0E0E0),
17-
text_body: color!(0xfcfaf0),
12+
primary: color!(0x0f1e3c),
13+
secondary: color!(0xFCB608),
14+
outgoing: color!(0x0BB1FC),
15+
starred: color!(0xFBFF0F),
16+
text_headers: color!(0x081020),
17+
text_body: color!(0xdddddd),
1818
});
1919

2020
pub static A11Y_DARK_PALETTE_EXTENSION: std::sync::LazyLock<PaletteExtension> =
@@ -23,11 +23,11 @@ pub static A11Y_DARK_PALETTE_EXTENSION: std::sync::LazyLock<PaletteExtension> =
2323
pub static A11Y_LIGHT_PALETTE: std::sync::LazyLock<Palette> =
2424
std::sync::LazyLock::new(|| Palette {
2525
primary: color!(0xFFFFFF),
26-
secondary: color!(0x6CB6FF),
27-
outgoing: color!(0x0F0F0F),
28-
starred: color!(0x0000FF),
29-
text_headers: color!(0x1F1F1F),
30-
text_body: color!(0x03050F),
26+
secondary: color!(0xB30000),
27+
outgoing: color!(0x004ECC),
28+
starred: color!(0xC25E00),
29+
text_headers: color!(0xFFFFFF),
30+
text_body: color!(0x081020),
3131
});
3232

3333
pub static A11Y_LIGHT_PALETTE_EXTENSION: std::sync::LazyLock<PaletteExtension> =

0 commit comments

Comments
 (0)