fix(segmented_button): active font for context menu & prioritize active font over hover
This commit is contained in:
parent
ab3eedd0f2
commit
9aa87cd66b
1 changed files with 5 additions and 4 deletions
|
|
@ -246,12 +246,13 @@ where
|
|||
|
||||
fn update_entity_paragraph(&mut self, state: &mut LocalState, key: Entity) {
|
||||
if let Some(text) = self.model.text.get(key) {
|
||||
let font = if self.button_is_focused(state, key) {
|
||||
let font = if self.button_is_focused(state, key)
|
||||
|| state.show_context == Some(key)
|
||||
|| self.model.is_active(key)
|
||||
{
|
||||
self.font_active
|
||||
} else if state.show_context == Some(key) || self.button_is_hovered(state, key) {
|
||||
} else if self.button_is_hovered(state, key) {
|
||||
self.font_hovered
|
||||
} else if self.model.is_active(key) {
|
||||
self.font_active
|
||||
} else {
|
||||
self.font_inactive
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue