mirror of
https://github.com/hinto-janai/gupax.git
synced 2024-11-16 17:27:37 +00:00
constants: fix visuals
This commit is contained in:
parent
27cc46d615
commit
039aed1679
1 changed files with 18 additions and 17 deletions
|
@ -425,6 +425,8 @@ pub static VISUALS: Lazy<Visuals> = Lazy::new(|| {
|
|||
stroke: Stroke::new(1.0, Color32::from_gray(255)),
|
||||
};
|
||||
|
||||
// Based off default dark() mode.
|
||||
// https://docs.rs/egui/0.24.1/src/egui/style.rs.html#1210
|
||||
let widgets = Widgets {
|
||||
noninteractive: WidgetVisuals {
|
||||
bg_fill: BG,
|
||||
|
@ -432,6 +434,7 @@ pub static VISUALS: Lazy<Visuals> = Lazy::new(|| {
|
|||
fg_stroke: Stroke::new(1.0, Color32::from_gray(140)), // normal text color
|
||||
rounding: Rounding::same(10.0),
|
||||
expansion: 0.0,
|
||||
weak_bg_fill: Color32::from_gray(27),
|
||||
},
|
||||
inactive: WidgetVisuals {
|
||||
bg_fill: Color32::from_gray(50),
|
||||
|
@ -439,6 +442,7 @@ pub static VISUALS: Lazy<Visuals> = Lazy::new(|| {
|
|||
fg_stroke: Stroke::new(1.0, Color32::from_gray(180)), // button text
|
||||
rounding: Rounding::same(10.0),
|
||||
expansion: 0.0,
|
||||
weak_bg_fill: Color32::from_gray(27),
|
||||
},
|
||||
hovered: WidgetVisuals {
|
||||
bg_fill: Color32::from_gray(80),
|
||||
|
@ -446,6 +450,7 @@ pub static VISUALS: Lazy<Visuals> = Lazy::new(|| {
|
|||
fg_stroke: Stroke::new(1.5, Color32::from_gray(240)),
|
||||
rounding: Rounding::same(10.0),
|
||||
expansion: 1.0,
|
||||
weak_bg_fill: Color32::from_gray(27),
|
||||
},
|
||||
active: WidgetVisuals {
|
||||
bg_fill: Color32::from_gray(55),
|
||||
|
@ -453,6 +458,7 @@ pub static VISUALS: Lazy<Visuals> = Lazy::new(|| {
|
|||
fg_stroke: Stroke::new(2.0, Color32::WHITE),
|
||||
rounding: Rounding::same(10.0),
|
||||
expansion: 1.0,
|
||||
weak_bg_fill: Color32::from_gray(27),
|
||||
},
|
||||
open: WidgetVisuals {
|
||||
bg_fill: Color32::from_gray(27),
|
||||
|
@ -460,12 +466,12 @@ pub static VISUALS: Lazy<Visuals> = Lazy::new(|| {
|
|||
fg_stroke: Stroke::new(1.0, Color32::from_gray(210)),
|
||||
rounding: Rounding::same(10.0),
|
||||
expansion: 0.0,
|
||||
weak_bg_fill: Color32::from_gray(27),
|
||||
},
|
||||
};
|
||||
|
||||
// https://docs.rs/egui/0.24.1/src/egui/style.rs.html#1113
|
||||
Visuals {
|
||||
dark_mode: true,
|
||||
override_text_color: None,
|
||||
widgets,
|
||||
selection,
|
||||
hyperlink_color: Color32::from_rgb(90, 170, 255),
|
||||
|
@ -477,12 +483,7 @@ pub static VISUALS: Lazy<Visuals> = Lazy::new(|| {
|
|||
window_rounding: Rounding::same(6.0),
|
||||
window_shadow: Shadow::big_dark(),
|
||||
popup_shadow: Shadow::small_dark(),
|
||||
resize_corner_size: 12.0,
|
||||
text_cursor_width: 2.0,
|
||||
text_cursor_preview: false,
|
||||
clip_rect_margin: 3.0, // should be at least half the size of the widest frame stroke + max WidgetVisuals::expansion
|
||||
button_frame: true,
|
||||
collapsing_header_frame: false,
|
||||
..Visuals::dark()
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue