Switch MouseEventHandler to use MouseRegions
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
50edcb06dd
commit
893f15ddab
26 changed files with 150 additions and 195 deletions
|
@ -2,9 +2,9 @@ mod theme_registry;
|
|||
|
||||
use gpui::{
|
||||
color::Color,
|
||||
elements::{ContainerStyle, ImageStyle, LabelStyle, MouseState},
|
||||
elements::{ContainerStyle, ImageStyle, LabelStyle},
|
||||
fonts::{HighlightStyle, TextStyle},
|
||||
Border,
|
||||
Border, MouseState,
|
||||
};
|
||||
use serde::{de::DeserializeOwned, Deserialize};
|
||||
use serde_json::Value;
|
||||
|
@ -488,7 +488,7 @@ pub struct Interactive<T> {
|
|||
}
|
||||
|
||||
impl<T> Interactive<T> {
|
||||
pub fn style_for(&self, state: &MouseState, active: bool) -> &T {
|
||||
pub fn style_for(&self, state: MouseState, active: bool) -> &T {
|
||||
if active {
|
||||
if state.hovered {
|
||||
self.active_hover
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue