Browse Source

allow nullable _subtitle value, fix getValue data type returned

PHP-GTK3
yggverse 2 months ago
parent
commit
112fa6507f
  1. 4
      src/Entity/Browser/Container/Tab/Page/Title.php
  2. 6
      src/Gtk/Browser/Container/Tab/Page/Title/Label.php

4
src/Entity/Browser/Container/Tab/Page/Title.php

@ -66,12 +66,12 @@ class Title @@ -66,12 +66,12 @@ class Title
);
}
public function getValue(): string
public function getValue(): ?string
{
return $this->gtk->get_text();
}
public function getSubtitle(): string
public function getSubtitle(): ?string
{
return $this->gtk->get_subtitle();
}

6
src/Gtk/Browser/Container/Tab/Page/Title/Label.php

@ -6,16 +6,16 @@ namespace Yggverse\Yoda\Gtk\Browser\Container\Tab\Page\Title; @@ -6,16 +6,16 @@ namespace Yggverse\Yoda\Gtk\Browser\Container\Tab\Page\Title;
class Label extends \GtkLabel
{
private string $_subtitle = '';
private ?string $_subtitle = null;
public function set_subtitle(
string $value
?string $value = null
): void
{
$this->_subtitle = $value;
}
public function get_subtitle(): string
public function get_subtitle(): ?string
{
return $this->_subtitle;
}

Loading…
Cancel
Save