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