Update default MenuList padding

This commit is contained in:
Jeremy Soller 2023-02-10 07:38:38 -07:00
parent 5258bf4811
commit c6c46cea1a
No known key found for this signature in database
GPG key ID: DCFCA852D3906975
2 changed files with 1 additions and 4 deletions

View file

@ -248,13 +248,10 @@ impl Application for Window {
.padding(8) .padding(8)
.placeholder("File"), .placeholder("File"),
MenuList::new(vec!["Todo"], None, |_| Message::Todo) MenuList::new(vec!["Todo"], None, |_| Message::Todo)
.padding(8)
.placeholder("Edit"), .placeholder("Edit"),
MenuList::new(vec!["Todo"], None, |_| Message::Todo) MenuList::new(vec!["Todo"], None, |_| Message::Todo)
.padding(8)
.placeholder("View"), .placeholder("View"),
MenuList::new(vec!["Todo"], None, |_| Message::Todo) MenuList::new(vec!["Todo"], None, |_| Message::Todo)
.padding(8)
.placeholder("Help"), .placeholder("Help"),
] ]
.align_items(Alignment::Start) .align_items(Alignment::Start)

View file

@ -101,7 +101,7 @@ where
<Renderer::Theme as menu::StyleSheet>::Style: From<<Renderer::Theme as StyleSheet>::Style>, <Renderer::Theme as menu::StyleSheet>::Style: From<<Renderer::Theme as StyleSheet>::Style>,
{ {
/// The default padding of a [`MenuList`]. /// The default padding of a [`MenuList`].
pub const DEFAULT_PADDING: Padding = Padding::new(5); pub const DEFAULT_PADDING: Padding = Padding::new(8);
/// Creates a new [`MenuList`] with the given list of options, the current /// Creates a new [`MenuList`] with the given list of options, the current
/// selected value, and the message to produce when an option is selected. /// selected value, and the message to produce when an option is selected.