From a0d0b876b6447c5be26a50a0b295e91cd95a8ceb Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 17 Jan 2013 14:34:51 -0600 Subject: Fix taskbar configuration issues Fix Kicker menu button layout in Deep Buttons mode --- kicker/taskbar/taskbarcontainer.cpp | 10 ++++++++++ kicker/taskbar/taskcontainer.cpp | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'kicker/taskbar') diff --git a/kicker/taskbar/taskbarcontainer.cpp b/kicker/taskbar/taskbarcontainer.cpp index 00ed9786c..581719660 100644 --- a/kicker/taskbar/taskbarcontainer.cpp +++ b/kicker/taskbar/taskbarcontainer.cpp @@ -23,11 +23,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include +#include #include #include #include #include +#include #include #include @@ -57,6 +59,14 @@ TaskBarContainer::TaskBarContainer( bool enableFrame, TQString configFileOverrid { configFile = GLOBAL_TASKBAR_CONFIG_FILE_NAME; } + TQFile configFileObject(locateLocal("config", configFile)); + if (!configFileObject.exists()) + { + KConfig globalConfig(GLOBAL_TASKBAR_CONFIG_FILE_NAME, TRUE, TRUE); + KConfig localConfig(configFile); + globalConfig.copyTo(configFile, &localConfig); + localConfig.sync(); + } settingsObject = new TaskBarSettings(KSharedConfig::openConfig(configFile)); setBackgroundOrigin( AncestorOrigin ); diff --git a/kicker/taskbar/taskcontainer.cpp b/kicker/taskbar/taskcontainer.cpp index 600bac7e9..8e10d131b 100644 --- a/kicker/taskbar/taskcontainer.cpp +++ b/kicker/taskbar/taskcontainer.cpp @@ -661,7 +661,7 @@ void TaskContainer::drawButton(TQPainter *p) // draw button background if (drawButton) { - if (KickerSettings::showDeepButtons()) { + if (m_settingsObject->drawButtons() && KickerSettings::showDeepButtons()) { style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, p, TQRect(1, 1, width()-3, height()-2), colors, sunken ? TQStyle::Style_On : TQStyle::Style_Raised); @@ -770,7 +770,7 @@ void TaskContainer::drawButton(TQPainter *p) } } - int availableWidth = width() - (br.x() * 2) - textPos - 2 - KickerSettings::showDeepButtons()?2:0; + int availableWidth = width() - (br.x() * 2) - textPos - 2 - (m_settingsObject->drawButtons() && KickerSettings::showDeepButtons())?2:0; if (m_filteredTasks.count() > 1) { availableWidth -= 8; @@ -846,7 +846,7 @@ void TaskContainer::drawButton(TQPainter *p) } // draw popup arrow - if ((m_filteredTasks.count() > 1) && (!KickerSettings::showDeepButtons())) + if ((m_filteredTasks.count() > 1) && (!(m_settingsObject->drawButtons() && KickerSettings::showDeepButtons()))) { TQStyle::PrimitiveElement e = TQStyle::PE_ArrowLeft; -- cgit v1.2.1