Made the navigation bar scrollable
- Added padding to the entries to avoid collisioning with the scrollbar
This commit is contained in:
parent
89285d78be
commit
8b73478c57
1 changed files with 8 additions and 7 deletions
|
|
@ -9,16 +9,17 @@ use iced::{
|
|||
macro_rules! nav_bar {
|
||||
($($x:expr),+ $(,)?) => (
|
||||
$crate::iced::widget::Container::new(
|
||||
$crate::iced::widget::Column::with_children(vec![
|
||||
$($crate::iced::Element::from($x)),+,
|
||||
$crate::iced::widget::vertical_space(
|
||||
$crate::iced::Length::Fill
|
||||
).into()
|
||||
])
|
||||
.spacing(12)
|
||||
$crate::iced::widget::scrollable(
|
||||
$crate::iced::widget::Column::with_children(
|
||||
vec![$($crate::iced::Element::from($x)),+]
|
||||
)
|
||||
.spacing(12)
|
||||
.padding([0,20,0,0])
|
||||
)
|
||||
)
|
||||
.max_width(300)
|
||||
.padding(12)
|
||||
.height(Length::Fill)
|
||||
.style(theme::Container::Custom(
|
||||
$crate::widget::nav_bar_style
|
||||
))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue