You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to create a split-screen layout similar to egui's SidePanel::left. However, the default separator takes up the entire width/height of the parent, which in this case is a ui.horizontal. As a result, the text is positioned on the right side and the separator only fills in by one character, due to the ui.horizontal aformentioned.
Code:
egui::Window::new("Settings").id(widget_ids[6]).resizable(true).show(ctx, |ui| {
//TODO Need to add editor for config_db in here
ui.horizontal(|ui| {
ui.add(egui::Separator::default().vertical().spacing(40.0));
// egui::Resize::default().default_size([550.0, 500.0]).show(ui, |ui| {
ui.vertical(|ui| {
if ui.add(egui::Checkbox::new(&mut self.display_image.lock().unwrap(), "Display album art while playing music")).clicked() {}
}
if ui.add(egui::Checkbox::new(&mut self.display_image_main_body.lock().unwrap(), "Display album art in the center")).clicked() {}
})
})
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm attempting to create a split-screen layout similar to egui's SidePanel::left. However, the default separator takes up the entire width/height of the parent, which in this case is a ui.horizontal. As a result, the text is positioned on the right side and the separator only fills in by one character, due to the ui.horizontal aformentioned.
Code:
here is a image for reference:
Beta Was this translation helpful? Give feedback.
All reactions