Merge pull request #159 from zed-industries/tabs-cleanup
Clean up tabs styling
This commit is contained in:
@@ -348,6 +348,17 @@ enum Spacing {
|
||||
},
|
||||
}
|
||||
|
||||
impl Padding {
|
||||
pub fn uniform(padding: f32) -> Self {
|
||||
Self {
|
||||
top: padding,
|
||||
left: padding,
|
||||
bottom: padding,
|
||||
right: padding,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ToJson for Padding {
|
||||
fn to_json(&self) -> serde_json::Value {
|
||||
let mut value = json!({});
|
||||
|
||||
@@ -116,7 +116,8 @@ impl Element for MouseEventHandler {
|
||||
let hit_bounds = RectF::from_points(
|
||||
bounds.origin() - vec2f(self.padding.left, self.padding.top),
|
||||
bounds.lower_right() + vec2f(self.padding.right, self.padding.bottom),
|
||||
);
|
||||
)
|
||||
.round_out();
|
||||
|
||||
self.state.update(cx, |state, cx| match event {
|
||||
Event::MouseMoved {
|
||||
|
||||
Reference in New Issue
Block a user