use constants for defaults, use namespaces

This commit is contained in:
yggverse 2024-07-21 18:29:02 +03:00
parent ea30508f52
commit a8b2fa0d23
15 changed files with 55 additions and 41 deletions

View file

@ -8,19 +8,19 @@ abstract class Button
{
public \GtkButton $gtk;
protected bool $_sensitive = false;
protected string $_label = 'Button';
public const SENSITIVE = false;
public const LABEL = 'Button';
public function __construct()
{
$this->gtk = new \GtkButton;
$this->gtk->set_sensitive(
$this->_sensitive
$this::SENSITIVE
);
$this->gtk->set_label(
_($this->_label)
_($this::LABEL)
);
// Render