Deprecate `CollapsingHeader::selectable/selected

Better to use the more powerful CollapsingState::show_header
This commit is contained in:
Emil Ernerfeldt 2022-04-28 20:06:55 +02:00
parent 355d70d2b9
commit 881f9b4161
2 changed files with 5 additions and 1 deletions

View file

@ -41,6 +41,9 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui_w
* Text is darker and more readable in bright mode ([#1412](https://github.com/emilk/egui/pull/1412)). * Text is darker and more readable in bright mode ([#1412](https://github.com/emilk/egui/pull/1412)).
* Fixed `Ui::add_visible` sometimes leaving the `Ui` in a disabled state. ([#1436](https://github.com/emilk/egui/issues/1436)). * Fixed `Ui::add_visible` sometimes leaving the `Ui` in a disabled state. ([#1436](https://github.com/emilk/egui/issues/1436)).
### Deprecated ☢️
* Deprecated `CollapsingHeader::selectable` ([#1538](https://github.com/emilk/egui/pull/1538)).
### Removed 🔥 ### Removed 🔥
* Removed the `single_threaded/multi_threaded` flags - egui is now always thread-safe ([#1390](https://github.com/emilk/egui/pull/1390)). * Removed the `single_threaded/multi_threaded` flags - egui is now always thread-safe ([#1390](https://github.com/emilk/egui/pull/1390)).

View file

@ -358,7 +358,7 @@ impl CollapsingHeader {
} }
/// Can the [`CollapsingHeader`] be selected by clicking it? Default: `false`. /// Can the [`CollapsingHeader`] be selected by clicking it? Default: `false`.
/// #[deprecated = "Use the more powerful egui::collapsing_header::CollapsingState::show_header"] // Deprecated in 2022-04-28, before egui 0.18
pub fn selectable(mut self, selectable: bool) -> Self { pub fn selectable(mut self, selectable: bool) -> Self {
self.selectable = selectable; self.selectable = selectable;
self self
@ -379,6 +379,7 @@ impl CollapsingHeader {
/// } /// }
/// # }); /// # });
/// ``` /// ```
#[deprecated = "Use the more powerful egui::collapsing_header::CollapsingState::show_header"] // Deprecated in 2022-04-28, before egui 0.18
pub fn selected(mut self, selected: bool) -> Self { pub fn selected(mut self, selected: bool) -> Self {
self.selected = selected; self.selected = selected;
self self