From 80035308b1907d75e7e09be7c8f6e14098edd533 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 4 Aug 2011 08:18:22 +0000 Subject: Add initial support for Kicker "Deep Buttons", a more highly textured style than the normal "flat" Kicker GUI Add preliminary GUI and configuration structures needed for hot-resizing panels git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1244835 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kicker/taskbar/taskbar.cpp | 2 +- kicker/taskbar/taskcontainer.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'kicker/taskbar') diff --git a/kicker/taskbar/taskbar.cpp b/kicker/taskbar/taskbar.cpp index d78ad5cf1..33109c576 100644 --- a/kicker/taskbar/taskbar.cpp +++ b/kicker/taskbar/taskbar.cpp @@ -690,7 +690,7 @@ void TaskBar::reLayout() } // needed because Panner doesn't know how big it's contents are so it's - // up to use to initialize it. =( + // up to us to initialize it. =( resizeContents(contentsRect().width(), contentsRect().height()); // number of rows simply depends on our height which is either the diff --git a/kicker/taskbar/taskcontainer.cpp b/kicker/taskbar/taskcontainer.cpp index 4cd893e1b..ee457bc32 100644 --- a/kicker/taskbar/taskcontainer.cpp +++ b/kicker/taskbar/taskcontainer.cpp @@ -586,9 +586,16 @@ void TaskContainer::drawButton(TQPainter *p) // draw button background if (drawButton) { - tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonTool, p, + if (KickerSettings::showDeepButtons()) { + tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonBevel, p, + TQRect(1, 1, width()-3, height()-2), + colors, sunken ? TQStyle::Style_On : TQStyle::Style_Raised); + } + else { + tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonTool, p, TQRect(1, 1, width()-2, height()-2), colors, sunken ? TQStyle::Style_Down : TQStyle::Style_Raised); + } } // shift button label on sunken buttons @@ -688,7 +695,7 @@ void TaskContainer::drawButton(TQPainter *p) } } - int availableWidth = width() - (br.x() * 2) - textPos - 2; + int availableWidth = width() - (br.x() * 2) - textPos - 2 - KickerSettings::showDeepButtons()?2:0; if (m_filteredTasks.count() > 1) { availableWidth -= 8; -- cgit v1.2.1