feat(segmented-button): Vertical orientation functionality

This commit is contained in:
Michael Aaron Murphy 2022-12-30 17:39:35 +01:00 committed by Ashley Wulber
parent de580ffefc
commit ad0443af3f
6 changed files with 166 additions and 49 deletions

View file

@ -2,7 +2,7 @@
// SPDX-License-Identifier: MPL-2.0
use slotmap::{SecondaryMap, SlotMap};
use std::borrow::Cow;
use std::{borrow::Cow, cell::Cell};
slotmap::new_key_type! {
/// An ID for a segmented button
@ -35,6 +35,9 @@ pub struct WidgetState {
/// The actively-selected segmented button.
pub active: Key,
/// The button currently hovered.
pub hovered: Cell<Key>,
}
/// State which is most useful to the application.