diff options
author | Philippe Mavridis <philippe.mavridis@yandex.com> | 2025-08-03 12:28:33 +0300 |
---|---|---|
committer | Philippe Mavridis <philippe.mavridis@yandex.com> | 2025-08-03 12:28:33 +0300 |
commit | fab5d964c7ca0184f569a4dff9d32ae96737bcbf (patch) | |
tree | 005096fbf399606fc135d99aafc69206b355959a | |
parent | 8cf18473ac698b11c3bd8953ec745d00301b3da8 (diff) | |
download | tdebase-fix/issue/647.tar.gz tdebase-fix/issue/647.zip |
Fix system tray layout calculationfix/issue/647
This fixes #647.
Signed-off-by: Philippe Mavridis <philippe.mavridis@yandex.com>
-rw-r--r-- | kicker/applets/systemtray/systemtrayapplet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kicker/applets/systemtray/systemtrayapplet.cpp b/kicker/applets/systemtray/systemtrayapplet.cpp index 175e037e5..2f0e56645 100644 --- a/kicker/applets/systemtray/systemtrayapplet.cpp +++ b/kicker/applets/systemtray/systemtrayapplet.cpp @@ -978,7 +978,7 @@ void SystemTrayApplet::layoutTray() if (orientation() == TQt::Vertical) { int iconWidth = maxIconWidth() + m_iconMargin * 2; // +2 for the margins that implied by the layout - heightWidth = width() - m_iconMargin * 2; + heightWidth = width(); // to avoid nbrOfLines=0 we ensure heightWidth >= iconWidth! heightWidth = heightWidth < iconWidth ? iconWidth : heightWidth; nbrOfLines = heightWidth / iconWidth; @@ -1055,7 +1055,7 @@ void SystemTrayApplet::layoutTray() else // horizontal { int iconHeight = maxIconHeight() + m_iconMargin * 2; // +2 for the margins that implied by the layout - heightWidth = height() - m_iconMargin * 2; + heightWidth = height(); heightWidth = heightWidth < iconHeight ? iconHeight : heightWidth; // to avoid nbrOfLines=0 nbrOfLines = heightWidth / iconHeight; |