add setSubtitle method

This commit is contained in:
yggverse 2024-07-07 06:50:41 +03:00
parent d4bf1f6c56
commit a516aa958f

View File

@ -53,17 +53,28 @@ class Header
}
public function setTitle(
?string $title = null
?string $value = null
): void
{
$this->gtk->set_title(
is_null($title) ? $this->_title : sprintf(
is_null($value) ? $this->_title : sprintf(
'%s - %s',
trim(
$title
$value
),
$this->_title
)
);
}
public function setSubtitle(
?string $value = null
): void
{
$this->gtk->set_subtitle(
is_null($value) ? $this->_subtitle : trim(
$value
)
);
}
}