-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nord-dark and nord-light color schemes
Fix carl dark export bug
- Loading branch information
1 parent
d7b8e9e
commit 81511d5
Showing
10 changed files
with
202 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
//! Carl Dark theme, no light theme currently exists | ||
|
||
mod dark; | ||
|
||
pub use dark::CarlDark; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
//! Nord Light theme | ||
//! <https://www.nordtheme.com/> | ||
|
||
use crate::Aesthetix; | ||
|
||
/// Dark theme, with rounded buttons, and ample margin. Adapted from the Nord light | ||
/// color scheme. | ||
pub struct NordDark; | ||
|
||
impl Aesthetix for NordDark { | ||
fn name(&self) -> &str { | ||
"Nord Dark" | ||
} | ||
|
||
fn primary_accent_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(94, 129, 172) | ||
} | ||
|
||
fn secondary_accent_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(129, 161, 193) | ||
} | ||
|
||
fn bg_primary_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(46, 52, 64) | ||
} | ||
|
||
fn bg_secondary_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(59, 66, 82) | ||
} | ||
|
||
fn bg_triage_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(59, 66, 82) | ||
} | ||
|
||
fn bg_auxiliary_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(59, 66, 82) | ||
} | ||
|
||
fn bg_contrast_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(59, 66, 82) | ||
} | ||
|
||
fn fg_primary_text_color_visuals(&self) -> Option<egui::Color32> { | ||
Some(egui::Color32::from_rgb(216, 222, 233)) | ||
} | ||
|
||
fn fg_success_text_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(80, 250, 123) | ||
} | ||
|
||
fn fg_warn_text_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(255, 215, 64) | ||
} | ||
|
||
fn fg_error_text_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(255, 121, 121) | ||
} | ||
|
||
fn dark_mode_visuals(&self) -> bool { | ||
true | ||
} | ||
|
||
fn margin_style(&self) -> f32 { | ||
12.0 | ||
} | ||
|
||
fn button_padding(&self) -> egui::Vec2 { | ||
egui::Vec2 { x: 12.0, y: 10.0 } | ||
} | ||
|
||
fn item_spacing_style(&self) -> f32 { | ||
18.0 | ||
} | ||
|
||
fn scroll_bar_width_style(&self) -> f32 { | ||
14.0 | ||
} | ||
|
||
fn rounding_visuals(&self) -> f32 { | ||
6.0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
//! Nord Light theme | ||
//! <https://www.nordtheme.com/> | ||
|
||
use crate::Aesthetix; | ||
|
||
/// Light theme, with rounded buttons, and ample margin. Adapted from the Nord light | ||
/// color scheme. | ||
pub struct NordLight; | ||
|
||
impl Aesthetix for NordLight { | ||
fn name(&self) -> &str { | ||
"Nord Light" | ||
} | ||
|
||
fn primary_accent_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(104, 161, 210) | ||
} | ||
|
||
fn secondary_accent_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(129, 161, 193) | ||
} | ||
|
||
fn bg_primary_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(216, 222, 233) | ||
} | ||
|
||
fn bg_secondary_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(229, 233, 240) | ||
} | ||
|
||
fn bg_triage_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(255, 255, 255) | ||
} | ||
|
||
fn bg_auxiliary_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(206, 212, 224) | ||
} | ||
|
||
fn bg_contrast_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(180, 186, 189) | ||
} | ||
|
||
fn fg_primary_text_color_visuals(&self) -> Option<egui::Color32> { | ||
Some(egui::Color32::BLACK) | ||
} | ||
|
||
fn fg_success_text_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(82, 163, 137) | ||
} | ||
|
||
fn fg_warn_text_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(255, 179, 71) | ||
} | ||
|
||
fn fg_error_text_color_visuals(&self) -> egui::Color32 { | ||
egui::Color32::from_rgb(228, 97, 107) | ||
} | ||
|
||
fn dark_mode_visuals(&self) -> bool { | ||
false | ||
} | ||
|
||
fn margin_style(&self) -> f32 { | ||
12.0 | ||
} | ||
|
||
fn button_padding(&self) -> egui::Vec2 { | ||
egui::Vec2 { x: 12.0, y: 10.0 } | ||
} | ||
|
||
fn item_spacing_style(&self) -> f32 { | ||
18.0 | ||
} | ||
|
||
fn scroll_bar_width_style(&self) -> f32 { | ||
14.0 | ||
} | ||
|
||
fn rounding_visuals(&self) -> f32 { | ||
6.0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//! Nord Dark and Light themes | ||
//! | ||
//! The [`egui_aesthetix::themes::NordDark`] and [`egui_aesthetix::themes::NordLight`] | ||
//! structs are good examples on how to implement a theme you want using the | ||
//! [`egui_aesthetix::Aesthetix`] trait. | ||
|
||
mod dark; | ||
mod light; | ||
|
||
pub use dark::NordDark; | ||
pub use light::NordLight; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters