Browse Source

remove ui.vertical_centered

pull/25/head
Emil Ernerfeldt 4 years ago
parent
commit
8cbf90442b
  1. 5
      egui/src/ui.rs
  2. 2
      egui/src/widgets/color_picker.rs

5
egui/src/ui.rs

@ -704,11 +704,6 @@ impl Ui {
self.inner_layout(Layout::vertical(Align::Min), initial_size, add_contents)
}
pub fn vertical_centered<R>(&mut self, add_contents: impl FnOnce(&mut Ui) -> R) -> (R, Rect) {
let initial_size = vec2(0.0, self.available().height());
self.inner_layout(Layout::vertical(Align::Center), initial_size, add_contents)
}
pub fn inner_layout<R>(
&mut self,
layout: Layout,

2
egui/src/widgets/color_picker.rs

@ -188,7 +188,7 @@ fn color_slider_2d(
}
fn color_picker_hsvag_2d(ui: &mut Ui, hsva: &mut HsvaGamma) {
ui.vertical_centered(|ui| {
ui.vertical(|ui| {
let current_color_size = vec2(
ui.style().spacing.slider_width,
ui.style().spacing.interact_size.y * 2.0,

Loading…
Cancel
Save