From 9c05de981a2c8ebd4d760d3025af593d30178219 Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 9 Jul 2024 08:49:58 +0300 Subject: [PATCH] show tab tooltip only on title value longer than length limit --- src/Entity/Browser/Container/Page/Title.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Entity/Browser/Container/Page/Title.php b/src/Entity/Browser/Container/Page/Title.php index c92bfda1..309d498a 100644 --- a/src/Entity/Browser/Container/Page/Title.php +++ b/src/Entity/Browser/Container/Page/Title.php @@ -53,9 +53,8 @@ class Title ); $this->gtk->set_tooltip_text( - is_null($tooltip) ? $value : trim( - $tooltip - ) + is_null($tooltip) ? (mb_strlen(strval($value)) > $this->_length ? $value : null) + : trim($tooltip) ); $this->setSubtitle(