mirror of
https://github.com/hinto-janai/gupax.git
synced 2024-11-17 01:37:52 +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)),
|
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 {
|
let widgets = Widgets {
|
||||||
noninteractive: WidgetVisuals {
|
noninteractive: WidgetVisuals {
|
||||||
bg_fill: BG,
|
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
|
fg_stroke: Stroke::new(1.0, Color32::from_gray(140)), // normal text color
|
||||||
rounding: Rounding::same(10.0),
|
rounding: Rounding::same(10.0),
|
||||||
expansion: 0.0,
|
expansion: 0.0,
|
||||||
|
weak_bg_fill: Color32::from_gray(27),
|
||||||
},
|
},
|
||||||
inactive: WidgetVisuals {
|
inactive: WidgetVisuals {
|
||||||
bg_fill: Color32::from_gray(50),
|
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
|
fg_stroke: Stroke::new(1.0, Color32::from_gray(180)), // button text
|
||||||
rounding: Rounding::same(10.0),
|
rounding: Rounding::same(10.0),
|
||||||
expansion: 0.0,
|
expansion: 0.0,
|
||||||
|
weak_bg_fill: Color32::from_gray(27),
|
||||||
},
|
},
|
||||||
hovered: WidgetVisuals {
|
hovered: WidgetVisuals {
|
||||||
bg_fill: Color32::from_gray(80),
|
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)),
|
fg_stroke: Stroke::new(1.5, Color32::from_gray(240)),
|
||||||
rounding: Rounding::same(10.0),
|
rounding: Rounding::same(10.0),
|
||||||
expansion: 1.0,
|
expansion: 1.0,
|
||||||
|
weak_bg_fill: Color32::from_gray(27),
|
||||||
},
|
},
|
||||||
active: WidgetVisuals {
|
active: WidgetVisuals {
|
||||||
bg_fill: Color32::from_gray(55),
|
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),
|
fg_stroke: Stroke::new(2.0, Color32::WHITE),
|
||||||
rounding: Rounding::same(10.0),
|
rounding: Rounding::same(10.0),
|
||||||
expansion: 1.0,
|
expansion: 1.0,
|
||||||
|
weak_bg_fill: Color32::from_gray(27),
|
||||||
},
|
},
|
||||||
open: WidgetVisuals {
|
open: WidgetVisuals {
|
||||||
bg_fill: Color32::from_gray(27),
|
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)),
|
fg_stroke: Stroke::new(1.0, Color32::from_gray(210)),
|
||||||
rounding: Rounding::same(10.0),
|
rounding: Rounding::same(10.0),
|
||||||
expansion: 0.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 {
|
Visuals {
|
||||||
dark_mode: true,
|
|
||||||
override_text_color: None,
|
|
||||||
widgets,
|
widgets,
|
||||||
selection,
|
selection,
|
||||||
hyperlink_color: Color32::from_rgb(90, 170, 255),
|
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_rounding: Rounding::same(6.0),
|
||||||
window_shadow: Shadow::big_dark(),
|
window_shadow: Shadow::big_dark(),
|
||||||
popup_shadow: Shadow::small_dark(),
|
popup_shadow: Shadow::small_dark(),
|
||||||
resize_corner_size: 12.0,
|
..Visuals::dark()
|
||||||
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,
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue