Improve width for linux

pull/2/head
Benedikt Terhechte 3 years ago
parent 0d105c0cc0
commit d547dec223

@ -94,7 +94,7 @@ impl StartupUI {
// `ui.allocate_exact_size` // `ui.allocate_exact_size`
// `ui.allocate_with_layout` // `ui.allocate_with_layout`
// and variations. This, at least, worked. // and variations. This, at least, worked.
let desired_size = egui::vec2(330.0, 370.0); let desired_size = egui::vec2(450.0, 370.0);
let paint_rect = Rect::from_min_size( let paint_rect = Rect::from_min_size(
Pos2 { Pos2 {
@ -135,7 +135,7 @@ impl StartupUI {
.show(ui, |ui| { .show(ui, |ui| {
ui.add( ui.add(
egui::widgets::Label::new("Choose Import Format:") egui::widgets::Label::new("Choose Import Format:")
.text_color(Color32::WHITE) .text_color(colors.text_primary)
.text_style(TextStyle::Body), .text_style(TextStyle::Body),
); );
ui.end_row(); ui.end_row();
@ -170,7 +170,7 @@ impl StartupUI {
ui.end_row(); ui.end_row();
ui.add( ui.add(
egui::widgets::Label::new("Your Email Address:").text_color(Color32::WHITE), egui::widgets::Label::new("Your Email Address:").text_color(colors.text_primary),
); );
ui.end_row(); ui.end_row();
@ -224,7 +224,7 @@ impl StartupUI {
self.email_folder.is_some() && self.email_folder.is_some() &&
(self.save_to_disk == self.database_path.is_some()) (self.save_to_disk == self.database_path.is_some())
) )
.text_color(Color32::WHITE), .text_color(colors.text_primary),
); );
if response.clicked() { if response.clicked() {
self.action_start(); self.action_start();
@ -290,18 +290,16 @@ impl StartupUI {
fn format_selection(&mut self, ui: &mut egui::Ui, width: f32) { fn format_selection(&mut self, ui: &mut egui::Ui, width: f32) {
let mut selected = self.format; let mut selected = self.format;
let response = egui::ComboBox::from_id_source("mailbox_type_comboox") egui::ComboBox::from_id_source("mailbox_type_combobox")
.width(width) .width(width)
.selected_text(format!("{:?}", selected.name())) .selected_text(format!("{}", selected.name()))
.show_ui(ui, |ui| { .show_ui(ui, |ui| {
for format in FormatType::all_cases() { for format in FormatType::all_cases() {
ui.selectable_value(&mut selected, format, format.name()); ui.selectable_value(&mut selected, format, format.name());
} }
}); });
if response.response.changed() {
self.format = selected; self.format = selected;
} }
}
fn open_email_folder_dialog(&mut self) { fn open_email_folder_dialog(&mut self) {
let default_path = self let default_path = self

Loading…
Cancel
Save