mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
replace unsupported gtk class extension by local dependency array
This commit is contained in:
parent
518e575c83
commit
dfd37dcef4
3 changed files with 32 additions and 40 deletions
|
|
@ -4,11 +4,12 @@ declare(strict_types=1);
|
|||
|
||||
namespace Yggverse\Yoda\Entity\Browser\Container\Page;
|
||||
|
||||
use \Yggverse\Yoda\Gtk\Browser\Container\Page\Title\Label;
|
||||
|
||||
class Title
|
||||
{
|
||||
public Label $gtk;
|
||||
public \GtkLabel $gtk;
|
||||
|
||||
// Extras
|
||||
public ?string $subtitle = null;
|
||||
|
||||
// Dependencies
|
||||
public \Yggverse\Yoda\Entity\Browser\Container\Page $page;
|
||||
|
|
@ -27,7 +28,7 @@ class Title
|
|||
$this->page = $page;
|
||||
|
||||
// Init container
|
||||
$this->gtk = new Label(
|
||||
$this->gtk = new \GtkLabel(
|
||||
$this->_value
|
||||
);
|
||||
|
||||
|
|
@ -75,11 +76,9 @@ class Title
|
|||
?string $subtitle = null
|
||||
): void
|
||||
{
|
||||
$this->gtk->set_subtitle(
|
||||
is_null($subtitle) ? $this->_subtitle : strtolower(
|
||||
trim(
|
||||
$subtitle
|
||||
)
|
||||
$this->subtitle = is_null($subtitle) ? $this->_subtitle : strtolower(
|
||||
trim(
|
||||
$subtitle
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
@ -102,7 +101,7 @@ class Title
|
|||
|
||||
public function getSubtitle(): ?string
|
||||
{
|
||||
return $this->gtk->get_subtitle();
|
||||
return $this->subtitle;
|
||||
}
|
||||
|
||||
public function getTooltip(): ?string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue