Browse Source

implement setText method

PHP-GTK3
yggverse 4 months ago
parent
commit
aea00e602f
  1. 12
      src/Entity/Window/Tab/Address/Statusbar.php

12
src/Entity/Window/Tab/Address/Statusbar.php

@ -12,6 +12,7 @@ class Statusbar @@ -12,6 +12,7 @@ class Statusbar
// Defaults
private int $_margin = 8;
private string $_text = '';
public function __construct(
\Yggverse\Yoda\Entity\Window\Tab\Address $address
@ -48,4 +49,15 @@ class Statusbar @@ -48,4 +49,15 @@ class Statusbar
$this->_margin
);
}
public function setText(
?string $text = null
): void
{
$this->gtk->set_text(
is_null($text) ? $this->_text : trim(
$text
)
);
}
}
Loading…
Cancel
Save