rewrite it in rust #1
Binary file not shown.
|
@ -223,10 +223,12 @@ impl AppWindow {
|
||||||
);
|
);
|
||||||
context.set_ini_filename(None);
|
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.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 {
|
config: Some(imgui::FontConfig {
|
||||||
oversample_h: 1,
|
oversample_h: 1,
|
||||||
pixel_snap_h: true,
|
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
|
// Set up dear imgui wgpu renderer
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue