From d7271a49bf276af73b76f083443bd9b317b4f613 Mon Sep 17 00:00:00 2001 From: yggverse Date: Mon, 22 Jul 2024 14:41:05 +0300 Subject: [PATCH] set label on icon image not provided --- src/Abstract/Entity/Button.php | 13 ++++++++----- src/Entity/Browser/Header/Tray/Tab.php | 9 ++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Abstract/Entity/Button.php b/src/Abstract/Entity/Button.php index c7d4cd2..834e489 100644 --- a/src/Abstract/Entity/Button.php +++ b/src/Abstract/Entity/Button.php @@ -9,8 +9,8 @@ abstract class Button public \GtkButton $gtk; public const SENSITIVE = false; - public const LABEL = 'Button'; public const IMAGE = null; + public const LABEL = 'Button'; public function __construct() { @@ -26,14 +26,17 @@ abstract class Button ); } + else + { + $this->gtk->set_label( + _($this::LABEL) + ); + } + $this->gtk->set_sensitive( $this::SENSITIVE ); - $this->gtk->set_label( - _($this::LABEL) - ); - // Render $this->gtk->show(); diff --git a/src/Entity/Browser/Header/Tray/Tab.php b/src/Entity/Browser/Header/Tray/Tab.php index 2caab50..b97fda4 100644 --- a/src/Entity/Browser/Header/Tray/Tab.php +++ b/src/Entity/Browser/Header/Tray/Tab.php @@ -37,9 +37,12 @@ class Tab ); } - $this->gtk->set_label( - _($this::LABEL) - ); + else + { + $this->gtk->set_label( + _($this::LABEL) + ); + } $this->gtk->set_tooltip_text( _($this::TOOLTIP)