From a516aa958fb02130814201bb69f2453a94921ae3 Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 7 Jul 2024 06:50:41 +0300 Subject: [PATCH] add setSubtitle method --- src/Entity/Browser/Header.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Entity/Browser/Header.php b/src/Entity/Browser/Header.php index 0d8c56d4..78f32ddb 100644 --- a/src/Entity/Browser/Header.php +++ b/src/Entity/Browser/Header.php @@ -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 + ) + ); + } } \ No newline at end of file