Skip to content

Commit bdef6a9

Browse files
committed
Add tooltip setting
1 parent 68a7867 commit bdef6a9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/MenuBar/MenuBar.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class MenuBar
2020

2121
protected string $label = '';
2222

23+
protected string $tooltip = '';
24+
2325
protected bool $onlyShowContextMenu = false;
2426

2527
protected ?Menu $contextMenu = null;
@@ -70,6 +72,13 @@ public function label(string $label = ''): self
7072
return $this;
7173
}
7274

75+
public function tooltip(string $tooltip = ''): self
76+
{
77+
$this->tooltip = $tooltip;
78+
79+
return $this;
80+
}
81+
7382
public function alwaysOnTop($alwaysOnTop = true): self
7483
{
7584
$this->alwaysOnTop = $alwaysOnTop;
@@ -93,6 +102,7 @@ public function toArray(): array
93102
'x' => $this->x,
94103
'y' => $this->y,
95104
'label' => $this->label,
105+
'tooltip' => $this->tooltip,
96106
'width' => $this->width,
97107
'height' => $this->height,
98108
'vibrancy' => $this->vibrancy,

0 commit comments

Comments
 (0)