Skip to content

Commit

Permalink
fix: fix window size being too small to see success or cancel labels
Browse files Browse the repository at this point in the history
  • Loading branch information
AvarianKnight committed Oct 30, 2021
1 parent 86ce5ee commit ffeeeed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Binary file modified exporter/exporter.exe
Binary file not shown.
10 changes: 6 additions & 4 deletions exporter/src/ui.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use eframe::{egui, epi};
use std::{env};
use native_dialog::{FileDialog};
use eframe::egui::Vec2;
use eframe::egui::{Vec2, Color32};

pub struct CarExporterUi {
first_frame: bool,
Expand All @@ -24,7 +24,7 @@ impl Default for CarExporterUi {
impl epi::App for CarExporterUi {
fn update(&mut self, ctx: &egui::CtxRef, frame: &mut epi::Frame<'_>) {
if self.first_frame {
frame.set_window_size(Vec2::new(800.0, 225.0));
frame.set_window_size(Vec2::new(800.0, 250.0));
self.first_frame = false;
}
egui::CentralPanel::default().show(ctx, |ui| {
Expand Down Expand Up @@ -67,11 +67,13 @@ impl epi::App for CarExporterUi {
}

if self.finished {
ui.add(egui::Label::new("Successfully exported"));
ui.add_space(space);
ui.add(egui::Label::new("Successfully exported").text_color(Color32::GREEN));
}

if self.was_canceled {
ui.add(egui::Label::new("User canceled"));
ui.add_space(space);
ui.add(egui::Label::new("User canceled").text_color(Color32::RED));
}

ui.with_layout(egui::Layout::bottom_up(egui::Align::LEFT), |ui| {
Expand Down

0 comments on commit ffeeeed

Please sign in to comment.