Render a close tab button on tab hover
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
co-authored by
Max Brunsfeld
parent
bb95d58c79
commit
eca9f495a1
@@ -12,8 +12,8 @@ pub struct MouseEventHandler {
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default)]
|
||||
pub struct MouseState {
|
||||
hovered: bool,
|
||||
clicked: bool,
|
||||
pub hovered: bool,
|
||||
pub clicked: bool,
|
||||
}
|
||||
|
||||
impl MouseEventHandler {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use serde_json::json;
|
||||
|
||||
use crate::{
|
||||
@@ -11,14 +13,14 @@ use crate::{
|
||||
};
|
||||
|
||||
pub struct Svg {
|
||||
path: String,
|
||||
path: Cow<'static, str>,
|
||||
color: ColorU,
|
||||
}
|
||||
|
||||
impl Svg {
|
||||
pub fn new(path: String) -> Self {
|
||||
pub fn new(path: impl Into<Cow<'static, str>>) -> Self {
|
||||
Self {
|
||||
path,
|
||||
path: path.into(),
|
||||
color: ColorU::black(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user