summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2022-07-22 15:37:20 +0300
committerMavridis Philippe <mavridisf@gmail.com>2022-07-22 16:38:40 +0300
commit81575d9def903b470486705f76560d0ca438459c (patch)
treeccd50463e2b73de8f4b41b8e297ec182ff3118c7
parent2ccd7c6665440fb5340a07b245e5398e917c2fc5 (diff)
downloadtdebase-feat/kicker-more-settings.tar.gz
tdebase-feat/kicker-more-settings.zip
taskbar: fix text positioning when changing from icons only to text&iconsfeat/kicker-more-settings
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
-rw-r--r--kicker/taskbar/taskcontainer.cpp14
-rw-r--r--kicker/taskbar/taskcontainer.h2
2 files changed, 11 insertions, 5 deletions
diff --git a/kicker/taskbar/taskcontainer.cpp b/kicker/taskbar/taskcontainer.cpp
index fb395c7e5..2b497ccd0 100644
--- a/kicker/taskbar/taskcontainer.cpp
+++ b/kicker/taskbar/taskcontainer.cpp
@@ -392,9 +392,13 @@ TQSizePolicy TaskContainer::sizePolicy() const
void TaskContainer::resizeEvent( TQResizeEvent * )
{
- int iconSize = READ_MERGED_TASKBAR_SETTING(iconSize);
+ recalculateIconRect();
+}
+
+void TaskContainer::recalculateIconRect()
+{
+ iconSize = READ_MERGED_TASKBAR_SETTING(iconSize);
- // calculate the icon rect
if(taskBar->showText())
{
TQRect br( style().subRect( TQStyle::SR_PushButtonContents, this ) );
@@ -599,7 +603,7 @@ void TaskContainer::drawButton(TQPainter *p)
(m_mouseOver && !halo && isEnabled() &&
READ_MERGED_TASKBAR_SETTING(showButtonOnHover));
TQFont font(TDEGlobalSettings::taskbarFont());
- int iconSize = READ_MERGED_TASKBAR_SETTING(iconSize);
+ recalculateIconRect();
// draw sunken if we contain the active task
bool active = false;
@@ -628,7 +632,7 @@ void TaskContainer::drawButton(TQPainter *p)
font.setBold(active);
TQColorGroup colors = palette().active();
-
+
if (READ_MERGED_TASKBAR_SETTING(useCustomColors))
{
colors.setColor( TQColorGroup::Button, READ_MERGED_TASKBAR_SETTING(taskBackgroundColor));
@@ -636,7 +640,7 @@ void TaskContainer::drawButton(TQPainter *p)
colors.setColor( TQColorGroup::ButtonText, READ_MERGED_TASKBAR_SETTING(inactiveTaskTextColor) );
colors.setColor( TQColorGroup::Text, READ_MERGED_TASKBAR_SETTING(inactiveTaskTextColor) );
}
-
+
if (demandsAttention)
{
if (!drawButton)
diff --git a/kicker/taskbar/taskcontainer.h b/kicker/taskbar/taskcontainer.h
index f40566e9c..cc95b5f8c 100644
--- a/kicker/taskbar/taskcontainer.h
+++ b/kicker/taskbar/taskcontainer.h
@@ -118,6 +118,7 @@ protected:
void updateFilteredTaskList();
void updateIconSize();
+ void recalculateIconRect();
protected slots:
void animationTimerFired();
@@ -145,6 +146,7 @@ private:
PixmapList frames;
int attentionState;
TQRect iconRect;
+ int iconSize;
TQPixmap animBg;
Task::List tasks;
Task::List m_filteredTasks;