mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Improve deprecation message for old egui::menu
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#![allow(deprecated)]
|
||||
//! Menu bar functionality (very basic so far).
|
||||
//! Deprecated menu API - Use [`crate::containers::menu`] instead.
|
||||
//!
|
||||
//! Usage:
|
||||
//! ```
|
||||
@@ -88,6 +88,7 @@ fn set_menu_style(style: &mut Style) {
|
||||
/// The menu bar goes well in a [`crate::TopBottomPanel::top`],
|
||||
/// but can also be placed in a [`crate::Window`].
|
||||
/// In the latter case you may want to wrap it in [`Frame`].
|
||||
#[deprecated = "Use `crate::containers::menu::Bar` instead"]
|
||||
pub fn bar<R>(ui: &mut Ui, add_contents: impl FnOnce(&mut Ui) -> R) -> InnerResponse<R> {
|
||||
ui.horizontal(|ui| {
|
||||
set_menu_style(ui.style_mut());
|
||||
|
||||
Reference in New Issue
Block a user