Layout cleanup
This commit is contained in:
parent
eb125d9719
commit
f1735beaa8
|
|
@ -154,16 +154,25 @@ impl HubClient {
|
|||
ui.add_space(VERTICAL_SPACING);
|
||||
});
|
||||
header.col(|ui| {
|
||||
ui.heading("Version");
|
||||
ui.add_space(VERTICAL_SPACING);
|
||||
ui.vertical_centered_justified(|ui| {
|
||||
ui.heading("Version");
|
||||
ui.add_space(VERTICAL_SPACING);
|
||||
});
|
||||
});
|
||||
header.col(|ui| {
|
||||
ui.heading("Branch");
|
||||
ui.add_space(VERTICAL_SPACING);
|
||||
ui.vertical_centered_justified(|ui| {
|
||||
ui.heading("Branch");
|
||||
ui.add_space(VERTICAL_SPACING);
|
||||
});
|
||||
});
|
||||
header.col(|ui| {
|
||||
ui.heading("Directory");
|
||||
ui.add_space(VERTICAL_SPACING);
|
||||
ui.with_layout(
|
||||
Layout::top_down_justified(eframe::emath::Align::Max),
|
||||
|ui| {
|
||||
ui.heading("Directory");
|
||||
ui.add_space(VERTICAL_SPACING);
|
||||
},
|
||||
);
|
||||
});
|
||||
})
|
||||
.body(|body| {
|
||||
|
|
@ -284,15 +293,11 @@ impl HubClient {
|
|||
row.col(|ui| {
|
||||
ui.vertical_centered_justified(|ui| {
|
||||
ui.add_space(VERTICAL_SPACING);
|
||||
if ui.button("Refresh").clicked() {
|
||||
self.hub.update_info();
|
||||
}
|
||||
});
|
||||
});
|
||||
row.col(|ui| {
|
||||
ui.vertical_centered_justified(|ui| {
|
||||
ui.add_space(VERTICAL_SPACING);
|
||||
if ui.button("Add new").clicked() {
|
||||
if ui
|
||||
.button("Add new path")
|
||||
.on_hover_text("Add new editor search path")
|
||||
.clicked()
|
||||
{
|
||||
let directory = FileDialog::new().pick_folder();
|
||||
if let Some(dir) = directory {
|
||||
self.hub
|
||||
|
|
@ -304,6 +309,7 @@ impl HubClient {
|
|||
}
|
||||
});
|
||||
});
|
||||
row.col(|_ui| {});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -316,11 +322,14 @@ impl HubClient {
|
|||
row.col(|ui| {
|
||||
add_header(ui);
|
||||
});
|
||||
row.col(|_ui| {});
|
||||
row.col(|ui| {
|
||||
ui.vertical_centered_justified(|ui| {
|
||||
ui.add_space(VERTICAL_SPACING);
|
||||
if ui.button("Import").clicked() {
|
||||
if ui
|
||||
.button("Scan")
|
||||
.on_hover_text("Scan selected folder for projects")
|
||||
.clicked()
|
||||
{
|
||||
let directory = FileDialog::new().pick_folder();
|
||||
|
||||
if let Some(dir) = directory {
|
||||
|
|
@ -348,6 +357,7 @@ impl HubClient {
|
|||
}
|
||||
});
|
||||
});
|
||||
row.col(|_ui| {});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -356,7 +366,6 @@ impl HubClient {
|
|||
Layout::top_down_justified(eframe::emath::Align::Min),
|
||||
|ui| {
|
||||
ui.add_space(VERTICAL_SPACING);
|
||||
|
||||
let button = egui::Button::new(egui::RichText::new("📦 Projects").heading())
|
||||
.frame(&self.current_tab == &WindowTab::Projects);
|
||||
if ui
|
||||
|
|
@ -388,7 +397,7 @@ fn build_header_table(ui: &mut Ui) -> TableBuilder {
|
|||
.cell_layout(egui::Layout::left_to_right(egui::Align::Center))
|
||||
.column(Size::remainder().at_least(150.0))
|
||||
.column(Size::initial(100.0).at_most(100.0))
|
||||
.column(Size::initial(100.0).at_most(100.0))
|
||||
.column(Size::initial(5.0).at_most(5.0))
|
||||
.resizable(false);
|
||||
table
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ fn main() {
|
|||
decorated: true,
|
||||
fullscreen: false,
|
||||
drag_and_drop_support: false,
|
||||
initial_window_size: Some(egui::vec2(820.0, 400.0)),
|
||||
min_window_size: Some(egui::vec2(720.0, 400.0)),
|
||||
initial_window_size: Some(egui::vec2(850.0, 400.0)),
|
||||
min_window_size: Some(egui::vec2(850.0, 400.0)),
|
||||
icon_data: Some(icon),
|
||||
..NativeOptions::default()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,10 +36,7 @@ impl Configuration {
|
|||
fn is_unity_dir(entry: &DirEntry) -> bool {
|
||||
let uninstall_exists = entry.path().clone().join("Uninstall.exe").exists();
|
||||
let unity_exe_exists = entry.path().clone().join("Unity.exe").exists();
|
||||
// println!(
|
||||
// "{}: Unity.exe {}, Uninstall.exe {}", entry.path().display(),
|
||||
// unity_exe_exists, uninstall_exists
|
||||
// );
|
||||
|
||||
uninstall_exists && unity_exe_exists
|
||||
}
|
||||
|
||||
|
|
@ -63,10 +60,6 @@ impl Configuration {
|
|||
}
|
||||
}
|
||||
}
|
||||
println!("Result paths are:");
|
||||
for path in &result_paths {
|
||||
println!("- {}", path);
|
||||
}
|
||||
result_paths
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,11 +40,6 @@ impl UnityEditor {
|
|||
version = Some(short.to_string());
|
||||
}
|
||||
}
|
||||
// println!(
|
||||
// "Printing info for {}: \n{:#?}\n\n",
|
||||
// base_path.display(),
|
||||
// hashmap
|
||||
// );
|
||||
}
|
||||
|
||||
if version.is_none() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue