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 {
|
macro_rules! nav_bar {
|
||||||
($($x:expr),+ $(,)?) => (
|
($($x:expr),+ $(,)?) => (
|
||||||
$crate::iced::widget::Container::new(
|
$crate::iced::widget::Container::new(
|
||||||
$crate::iced::widget::Column::with_children(vec![
|
$crate::iced::widget::scrollable(
|
||||||
$($crate::iced::Element::from($x)),+,
|
$crate::iced::widget::Column::with_children(
|
||||||
$crate::iced::widget::vertical_space(
|
vec![$($crate::iced::Element::from($x)),+]
|
||||||
$crate::iced::Length::Fill
|
)
|
||||||
).into()
|
.spacing(12)
|
||||||
])
|
.padding([0,20,0,0])
|
||||||
.spacing(12)
|
)
|
||||||
)
|
)
|
||||||
.max_width(300)
|
.max_width(300)
|
||||||
.padding(12)
|
.padding(12)
|
||||||
|
.height(Length::Fill)
|
||||||
.style(theme::Container::Custom(
|
.style(theme::Container::Custom(
|
||||||
$crate::widget::nav_bar_style
|
$crate::widget::nav_bar_style
|
||||||
))
|
))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue