Make the buttons a bit bigger, also jesus christ
This commit is contained in:
parent
cbfa1d009b
commit
738ccb53cf
@ -11,7 +11,7 @@ use std::path::Path;
|
||||
|
||||
fn main() {
|
||||
let native_options = eframe::NativeOptions::default();
|
||||
eframe::run_native("Board Builder", native_options, Box::new(|_cc| Box::new(BoardBuilderApp::default())));
|
||||
eframe::run_native("Board Builder", native_options, Box::new(|cc| Box::new(BoardBuilderApp::new(cc))));
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
@ -77,6 +77,16 @@ impl eframe::App for BoardBuilderApp {
|
||||
}
|
||||
|
||||
impl BoardBuilderApp {
|
||||
fn new(cc: &eframe::CreationContext<'_>) -> Self {
|
||||
let mut style = (*cc.egui_ctx.style()).clone();
|
||||
let mut button = style::TextStyle::Button.resolve(&style);
|
||||
button.size = 20.0;
|
||||
style.text_styles.insert(style::TextStyle::Button, button);
|
||||
cc.egui_ctx.set_style(style);
|
||||
|
||||
|
||||
BoardBuilderApp::default()
|
||||
}
|
||||
fn load_image_file(&mut self, ctx: &Context, image_file: &Path) -> Result<(), image::ImageError> {
|
||||
let image = image::io::Reader::open(image_file)?.decode()?;
|
||||
self.load_image(ctx, image);
|
||||
|
Loading…
Reference in New Issue
Block a user