Deprecate left/centered/right column functions in Ui
This commit is contained in:
parent
1e1bfa4dc7
commit
ea10add1cb
3 changed files with 13 additions and 5 deletions
|
@ -30,7 +30,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
* `egui::App`: added `fn name(&self)` and `fn clear_color(&self)`.
|
||||
|
||||
### Deprecated
|
||||
* Deprecated `RawInput::screen_size` - use `RawInput::screen_rect` instead.
|
||||
* `RawInput::screen_size` - use `RawInput::screen_rect` instead.
|
||||
* left/centered/right column functions on `Ui`.
|
||||
|
||||
|
||||
## 0.5.0 - 2020-12-13
|
||||
|
|
|
@ -58,17 +58,17 @@ impl FractalClock {
|
|||
ui.available_rect_before_wrap_finite(),
|
||||
);
|
||||
self.paint(&painter);
|
||||
// Make sure we allocate what we used (everything)
|
||||
ui.expand_to_include_rect(painter.clip_rect());
|
||||
|
||||
Frame::popup(ui.style())
|
||||
.fill(Rgba::luminance_alpha(0.02, 0.5).into())
|
||||
.stroke(Stroke::none())
|
||||
.show(&mut ui.left_column(320.0), |ui| {
|
||||
.show(ui, |ui| {
|
||||
ui.set_max_width(270.0);
|
||||
CollapsingHeader::new("Settings")
|
||||
.show(ui, |ui| self.options_ui(ui, seconds_since_midnight));
|
||||
});
|
||||
|
||||
// Make sure we allocate what we used (everything)
|
||||
ui.allocate_space(painter.clip_rect().size());
|
||||
}
|
||||
|
||||
fn options_ui(&mut self, ui: &mut Ui, seconds_since_midnight: Option<f64>) {
|
||||
|
|
|
@ -834,19 +834,26 @@ impl Ui {
|
|||
(ret, self.interact_hover(rect))
|
||||
}
|
||||
|
||||
#[deprecated]
|
||||
pub fn left_column(&mut self, width: f32) -> Self {
|
||||
#[allow(deprecated)]
|
||||
self.column(Align::Min, width)
|
||||
}
|
||||
|
||||
#[deprecated]
|
||||
pub fn centered_column(&mut self, width: f32) -> Self {
|
||||
#[allow(deprecated)]
|
||||
self.column(Align::Center, width)
|
||||
}
|
||||
|
||||
#[deprecated]
|
||||
pub fn right_column(&mut self, width: f32) -> Self {
|
||||
#[allow(deprecated)]
|
||||
self.column(Align::Max, width)
|
||||
}
|
||||
|
||||
/// A column ui with a given width.
|
||||
#[deprecated]
|
||||
pub fn column(&mut self, column_position: Align, width: f32) -> Self {
|
||||
let x = match column_position {
|
||||
Align::Min => 0.0,
|
||||
|
|
Loading…
Reference in a new issue