mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
use const for default values, use namespace
This commit is contained in:
parent
8a622ec335
commit
c985cf20af
20 changed files with 157 additions and 130 deletions
|
|
@ -18,7 +18,7 @@ class Navigation
|
|||
public Menu $menu;
|
||||
|
||||
// Defaults
|
||||
private string $_tooltip = 'Navigation';
|
||||
public const TOOLTIP = 'Navigation';
|
||||
|
||||
public function __construct(
|
||||
Tray $tray
|
||||
|
|
@ -30,7 +30,7 @@ class Navigation
|
|||
$this->gtk = new \GtkMenuButton;
|
||||
|
||||
$this->gtk->set_tooltip_text(
|
||||
_($this->_tooltip)
|
||||
_($this::TOOLTIP)
|
||||
);
|
||||
|
||||
// Init menu
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ class Tab
|
|||
public Tray $tray;
|
||||
|
||||
// Defaults
|
||||
protected string $_label = '+';
|
||||
private string $_tooltip = 'New tab';
|
||||
public const LABEL = '+';
|
||||
public const TOOLTIP = 'New tab';
|
||||
|
||||
public function __construct(
|
||||
Tray $tray
|
||||
|
|
@ -27,11 +27,11 @@ class Tab
|
|||
$this->gtk = new \GtkButton;
|
||||
|
||||
$this->gtk->set_label(
|
||||
_($this->_label)
|
||||
_($this::LABEL)
|
||||
);
|
||||
|
||||
$this->gtk->set_tooltip_text(
|
||||
_($this->_tooltip)
|
||||
_($this::TOOLTIP)
|
||||
);
|
||||
|
||||
// Render
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue