feat: MultiSelect support for segmented buttons
This commit is contained in:
parent
b1cbcfaf5b
commit
8988b25b6a
9 changed files with 263 additions and 112 deletions
|
|
@ -10,11 +10,11 @@ use iced_core::Color;
|
|||
|
||||
use crate::{theme, Theme};
|
||||
|
||||
use super::segmented_button::{self, cosmic::vertical_view_switcher};
|
||||
use super::segmented_button::{self, cosmic::vertical_view_switcher, SingleSelect};
|
||||
|
||||
/// A container holding a vertical view switcher with the n style
|
||||
pub fn nav_bar<Data, Message>(
|
||||
state: &segmented_button::State<Data>,
|
||||
state: &segmented_button::State<SingleSelect, Data>,
|
||||
on_activate: impl Fn(segmented_button::Key) -> Message + 'static,
|
||||
) -> iced::widget::Container<Message, crate::Renderer>
|
||||
where
|
||||
|
|
@ -26,7 +26,7 @@ where
|
|||
.button_padding([16, 10, 16, 10])
|
||||
.button_spacing(8)
|
||||
.icon_size(16)
|
||||
.spacing(14)
|
||||
.spacing(8)
|
||||
.apply(scrollable)
|
||||
.apply(container)
|
||||
.height(Length::Fill)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue