mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
update title setters API
This commit is contained in:
parent
20f71fcdcf
commit
52ade7be77
2 changed files with 34 additions and 25 deletions
|
|
@ -40,10 +40,28 @@ class Title
|
|||
);
|
||||
}
|
||||
|
||||
public function setValue(
|
||||
public function set(
|
||||
?string $value = null,
|
||||
?string $subtitle = null,
|
||||
?string $tooltip = null,
|
||||
?string $tooltip = null
|
||||
): void
|
||||
{
|
||||
$this->setValue(
|
||||
$value
|
||||
);
|
||||
|
||||
$this->setSubtitle(
|
||||
$subtitle
|
||||
);
|
||||
|
||||
$this->setTooltip(
|
||||
is_null($tooltip) ? (mb_strlen(strval($value)) > $this->_length ? $value : null)
|
||||
: $tooltip
|
||||
);
|
||||
}
|
||||
|
||||
public function setValue(
|
||||
?string $value = null
|
||||
): void
|
||||
{
|
||||
$this->gtk->set_text(
|
||||
|
|
@ -51,15 +69,6 @@ class Title
|
|||
$value
|
||||
)
|
||||
);
|
||||
|
||||
$this->gtk->set_tooltip_text(
|
||||
is_null($tooltip) ? (mb_strlen(strval($value)) > $this->_length ? $value : null)
|
||||
: trim($tooltip)
|
||||
);
|
||||
|
||||
$this->setSubtitle(
|
||||
$subtitle
|
||||
);
|
||||
}
|
||||
|
||||
public function setSubtitle(
|
||||
|
|
@ -79,7 +88,7 @@ class Title
|
|||
?string $tooltip = null
|
||||
): void
|
||||
{
|
||||
$this->gtk->set_subtitle(
|
||||
$this->gtk->set_tooltip_text(
|
||||
is_null($tooltip) ? $this->_tooltip : trim(
|
||||
$tooltip
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue