mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 17:45:28 +00:00
add setSubtitle method
This commit is contained in:
parent
d4bf1f6c56
commit
a516aa958f
1 changed files with 14 additions and 3 deletions
|
|
@ -53,17 +53,28 @@ class Header
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTitle(
|
public function setTitle(
|
||||||
?string $title = null
|
?string $value = null
|
||||||
): void
|
): void
|
||||||
{
|
{
|
||||||
$this->gtk->set_title(
|
$this->gtk->set_title(
|
||||||
is_null($title) ? $this->_title : sprintf(
|
is_null($value) ? $this->_title : sprintf(
|
||||||
'%s - %s',
|
'%s - %s',
|
||||||
trim(
|
trim(
|
||||||
$title
|
$value
|
||||||
),
|
),
|
||||||
$this->_title
|
$this->_title
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setSubtitle(
|
||||||
|
?string $value = null
|
||||||
|
): void
|
||||||
|
{
|
||||||
|
$this->gtk->set_subtitle(
|
||||||
|
is_null($value) ? $this->_subtitle : trim(
|
||||||
|
$value
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue