Fix right click handler for tabs
Also, some fun test helpers Co-Authored-By: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
7b9e7fea4e
commit
920eced1d5
9 changed files with 116 additions and 11 deletions
|
@ -24,14 +24,16 @@ pub struct IconButton {
|
|||
|
||||
impl IconButton {
|
||||
pub fn new(id: impl Into<ElementId>, icon: IconName) -> Self {
|
||||
Self {
|
||||
let mut this = Self {
|
||||
base: ButtonLike::new(id),
|
||||
shape: IconButtonShape::Wide,
|
||||
icon,
|
||||
icon_size: IconSize::default(),
|
||||
icon_color: Color::Default,
|
||||
selected_icon: None,
|
||||
}
|
||||
};
|
||||
this.base.base = this.base.base.debug_selector(|| format!("ICON-{:?}", icon));
|
||||
this
|
||||
}
|
||||
|
||||
pub fn shape(mut self, shape: IconButtonShape) -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue