Skip to content

Commit

Permalink
Small improvements on the UI drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofl committed Oct 19, 2024
1 parent d29126a commit e3f3d6e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/ui/window.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use eframe::egui;
use egui::{DragValue, TextEdit};
use egui::{Label, TextStyle};
// use log::info;
use crate::ui::toggle_switch::toggle;
use crate::servers::server::Protocol;
use crate::DefaultChannel;
use crate::{DefaultChannel, PROTOCOL_LIST};

use crate::messages::CommandMsg;

Expand All @@ -30,10 +27,9 @@ impl UI {
path: "/tmp/".into(),
..Default::default()
};

s.protocols.push(CommandMsg::new(&Protocol::Http));
s.protocols.push(CommandMsg::new(&Protocol::Ftp));
s.protocols.push(CommandMsg::new(&Protocol::Tftp));
for protocol in PROTOCOL_LIST {
s.protocols.push(CommandMsg::new(protocol));
}
s
}
}
Expand All @@ -54,7 +50,7 @@ impl eframe::App for UI {
ui.selectable_value(&mut self.aspect_ratio, 1.0, "S");
});

egui::widgets::global_dark_light_mode_switch(ui);
egui::widgets::global_theme_preference_switch(ui);

if ui.button("Exit").clicked() {
std::process::exit(0);
Expand Down

0 comments on commit e3f3d6e

Please sign in to comment.