feat(segmented-button): Vertical orientation functionality
This commit is contained in:
parent
de580ffefc
commit
ad0443af3f
6 changed files with 166 additions and 49 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue