Apply styles

This commit is contained in:
Simon Gellis 2024-11-06 23:26:31 -05:00
parent 5c5d56cb12
commit 498e6fbdcc
2 changed files with 7 additions and 2 deletions

BIN
assets/selawk.ttf Normal file

Binary file not shown.

View File

@ -223,10 +223,12 @@ impl AppWindow {
);
context.set_ini_filename(None);
let font_size = (13.0 * self.hidpi_factor) as f32;
let font_size = (16.0 * self.hidpi_factor) as f32;
context.io_mut().font_global_scale = (1.0 / self.hidpi_factor) as f32;
context.fonts().add_font(&[FontSource::DefaultFontData {
context.fonts().add_font(&[FontSource::TtfData {
data: include_bytes!("../assets/selawk.ttf"),
size_pixels: font_size,
config: Some(imgui::FontConfig {
oversample_h: 1,
pixel_snap_h: true,
@ -235,6 +237,9 @@ impl AppWindow {
}),
}]);
let style = context.style_mut();
style.use_light_colors();
//
// Set up dear imgui wgpu renderer
//