From 8631bc8993aa992d05c670d8ed3627f39056f4d4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 21 Aug 2022 12:17:35 +0900 Subject: TCC taskbar configuration: fixed up remaining issues in 'Appearance' tab. Signed-off-by: Michele Calgaro --- kcontrol/taskbar/kcmtaskbar.cpp | 99 +++++----- kcontrol/taskbar/kcmtaskbar.h | 2 + kcontrol/taskbar/kcmtaskbarui.ui | 393 +++++++++++++++++++++------------------ 3 files changed, 270 insertions(+), 224 deletions(-) (limited to 'kcontrol/taskbar') diff --git a/kcontrol/taskbar/kcmtaskbar.cpp b/kcontrol/taskbar/kcmtaskbar.cpp index c93bf600c..570544a72 100644 --- a/kcontrol/taskbar/kcmtaskbar.cpp +++ b/kcontrol/taskbar/kcmtaskbar.cpp @@ -224,6 +224,8 @@ TaskbarConfig::TaskbarConfig(TQWidget *parent, const char* name, const TQStringL connect(m_widget->appearance, TQT_SIGNAL(activated(int)), this, TQT_SLOT(appearanceChanged(int))); + connect(m_widget->kcfg_DisplayIconsNText, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(displayIconsNTextChanged(int))); addConfig(m_settingsObject, m_widget); setQuickHelp(i18n("

Taskbar

You can configure the taskbar here." @@ -250,7 +252,6 @@ TaskbarConfig::TaskbarConfig(TQWidget *parent, const char* name, const TQStringL { m_widget->kcfg_ShowAllWindows->hide(); m_widget->kcfg_SortByDesktop->hide(); - // m_widget->spacer2->changeSize(0, 0); } if (!TQApplication::desktop()->isVirtualDesktop() || @@ -290,44 +291,44 @@ TaskbarConfig::~TaskbarConfig() } void TaskbarConfig::slotEditGlobalConfiguration() { - TQByteArray data; - kapp->dcopClient()->send("kicker", "kicker", "reshowTaskBarConfig()", data); + TQByteArray data; + kapp->dcopClient()->send("kicker", "kicker", "reshowTaskBarConfig()", data); } void TaskbarConfig::processLockouts() { - m_configFileName = GLOBAL_TASKBAR_CONFIG_FILE_NAME; - if (m_isGlobalConfig) - { - m_widget->globalConfigWarning->show(); - m_widget->localConfigWarning->hide(); - m_widget->globalConfigReload->hide(); - m_widget->globalConfigEdit->hide(); - m_widget->kcfg_UseGlobalSettings->hide(); - m_widget->localLikeGlobalSpacer->changeSize(0, 0, TQSizePolicy::Fixed, TQSizePolicy::Maximum); - } - else { - m_widget->globalConfigWarning->hide(); - m_widget->localConfigWarning->show(); - m_widget->kcfg_UseGlobalSettings->show(); - if (m_widget->kcfg_UseGlobalSettings->isChecked()) { - m_widget->tabs->hide(); - m_widget->globalConfigReload->hide(); - m_widget->globalConfigEdit->show(); - m_widget->localLikeGlobalSpacer->changeSize(0, 0, TQSizePolicy::Fixed, TQSizePolicy::MinimumExpanding); - } - else { - m_widget->tabs->show(); - // FIXME - // Disable this feature until a method can be found to force the TDECModule to reload its settings from disk after the global settings have been copied! - //m_widget->globalConfigReload->show(); - m_widget->globalConfigReload->hide(); - m_widget->globalConfigEdit->hide(); - m_widget->localLikeGlobalSpacer->changeSize(0, 0, TQSizePolicy::Fixed, TQSizePolicy::Maximum); - } - } - - m_widget->kcfg_AllowDragAndDropReArrange->setEnabled(!m_widget->kcfg_SortByApp->isChecked()); + m_configFileName = GLOBAL_TASKBAR_CONFIG_FILE_NAME; + if (m_isGlobalConfig) + { + m_widget->globalConfigWarning->show(); + m_widget->localConfigWarning->hide(); + m_widget->globalConfigReload->hide(); + m_widget->globalConfigEdit->hide(); + m_widget->kcfg_UseGlobalSettings->hide(); + m_widget->localLikeGlobalSpacer->changeSize(0, 0, TQSizePolicy::Fixed, TQSizePolicy::Maximum); + } + else { + m_widget->globalConfigWarning->hide(); + m_widget->localConfigWarning->show(); + m_widget->kcfg_UseGlobalSettings->show(); + if (m_widget->kcfg_UseGlobalSettings->isChecked()) { + m_widget->tabs->hide(); + m_widget->globalConfigReload->hide(); + m_widget->globalConfigEdit->show(); + m_widget->localLikeGlobalSpacer->changeSize(0, 0, TQSizePolicy::Fixed, TQSizePolicy::MinimumExpanding); + } + else { + m_widget->tabs->show(); + // FIXME + // Disable this feature until a method can be found to force the TDECModule to reload its settings from disk after the global settings have been copied! + //m_widget->globalConfigReload->show(); + m_widget->globalConfigReload->hide(); + m_widget->globalConfigEdit->hide(); + m_widget->localLikeGlobalSpacer->changeSize(0, 0, TQSizePolicy::Fixed, TQSizePolicy::Maximum); + } + } + + m_widget->kcfg_AllowDragAndDropReArrange->setEnabled(!m_widget->kcfg_SortByApp->isChecked()); } void TaskbarConfig::slotReloadConfigurationFromGlobals() @@ -393,12 +394,8 @@ void TaskbarConfig::updateAppearanceCombo() return; } - else if (m_widget->appearance->count() == (int)m_appearances.count()) - { - m_widget->customAppearance->setEnabled(true); - } - m_widget->appearance->setCurrentItem(m_appearances.count()); + m_widget->customAppearance->setEnabled(true); } void TaskbarConfig::updateCustomAppearance() @@ -408,19 +405,35 @@ void TaskbarConfig::updateCustomAppearance() m_widget->kcfg_ShowButtonOnHover->setChecked(m_settingsObject->showButtonOnHover()); } +void TaskbarConfig::updateIconsTextCombo() +{ + if (m_widget->kcfg_DisplayIconsNText->currentText() == "Text only") + { + m_widget->useIconsFrame->setEnabled(false); + } + else + { + m_widget->useIconsFrame->setEnabled(true); + } +} + void TaskbarConfig::appearanceChanged(int selected) { if (selected < m_appearances.count()) { m_widget->customAppearance->setEnabled(false); - unmanagedWidgetChangeState(!m_appearances[selected].matchesSettings()); } else if(selected == m_appearances.count()) { m_widget->customAppearance->setEnabled(true); updateCustomAppearance(); - unmanagedWidgetChangeState(true); } + unmanagedWidgetChangeState(true); +} + +void TaskbarConfig::displayIconsNTextChanged(int selected) +{ + m_widget->useIconsFrame->setEnabled(selected != 1); // 1 == Text only } void TaskbarConfig::load() @@ -428,6 +441,7 @@ void TaskbarConfig::load() TDECModule::load(); slotUpdateComboBox(); updateAppearanceCombo(); + updateIconsTextCombo(); m_widget->showAllScreens->setChecked(!m_settingsObject->showCurrentScreenOnly()); int iconSize = m_settingsObject->iconSize(); @@ -468,6 +482,7 @@ void TaskbarConfig::defaults() TDECModule::defaults(); slotUpdateComboBox(); updateAppearanceCombo(); + updateIconsTextCombo(); } void TaskbarConfig::notChanged() diff --git a/kcontrol/taskbar/kcmtaskbar.h b/kcontrol/taskbar/kcmtaskbar.h index 68fb91e12..1a0860c69 100644 --- a/kcontrol/taskbar/kcmtaskbar.h +++ b/kcontrol/taskbar/kcmtaskbar.h @@ -67,6 +67,7 @@ public slots: protected slots: void slotUpdateComboBox(); void appearanceChanged(int); + void displayIconsNTextChanged(int); void notChanged(); void slotUpdateCustomColors(); @@ -78,6 +79,7 @@ private slots: private: TaskbarAppearance::List m_appearances; void updateAppearanceCombo(); + void updateIconsTextCombo(); void updateCustomAppearance(); static const TQStringList& actionList(); static TQStringList i18nActionList(); diff --git a/kcontrol/taskbar/kcmtaskbarui.ui b/kcontrol/taskbar/kcmtaskbarui.ui index 930a82d7f..012e562cc 100644 --- a/kcontrol/taskbar/kcmtaskbarui.ui +++ b/kcontrol/taskbar/kcmtaskbarui.ui @@ -139,7 +139,7 @@ unnamed - + kcfg_ShowAllWindows @@ -153,12 +153,27 @@ true - Turning this option off will cause the taskbar to display <b>only</b> the windows on the current desktop. - -By default, this option is selected and all windows are shown. + Turning this option off will cause the taskbar to display <b>only</b> the windows on the current desktop. By default, this option is selected and all windows are shown. - + + + spacer2_2_3 + + + Horizontal + + + Fixed + + + + 20 + 20 + + + + kcfg_SortByDesktop @@ -172,12 +187,27 @@ By default, this option is selected and all windows are shown. true - Selecting this option causes the taskbar to show windows in order of the desktop they appear on. - -By default this option is selected. + Selecting this option causes the taskbar to show windows in order of the desktop they appear on. By default this option is selected. - + + + showAllScreens + + + Show windows from all sc&reens + + + Alt+R + + + true + + + Turning this option off will cause the taskbar to display <b>only</b> windows which are on the same Xinerama screen as the taskbar. By default, this option is selected and all windows are shown. + + + kcfg_ShowOnlyIconified @@ -188,33 +218,14 @@ By default this option is selected. Alt+N - Select this option if you want the taskbar to display <b>only</b> minimized windows. - -By default, this option is not selected and the taskbar will show all windows. + Select this option if you want the taskbar to display <b>only</b> minimized windows. By default, this option is not selected and the taskbar will show all windows. - + kSeparator5 - - - spacer23 - - - Horizontal - - - Expanding - - - - 31 - 20 - - - showTaskStatesLabel @@ -232,7 +243,7 @@ By default, this option is not selected and the taskbar will show all windows.kcfg_ShowTaskStates - + kcfg_ShowTaskStates @@ -251,45 +262,26 @@ By default, this option is not selected and the taskbar will show all windows. - The taskbar can show and/or hide tasks based on their current process state. Select <em>Any</em> to show all tasks regardless of current state. + The taskbar can show and/or hide tasks based on their current process state. Select <em>Any</em> to show all tasks regardless of current state. - + - spacer2_2_3 + spacer23 Horizontal - Fixed + Expanding - 20 + 31 20 - - - showAllScreens - - - Show windows from all sc&reens - - - Alt+R - - - true - - - Turning this option off will cause the taskbar to display <b>only</b> windows which are on the same Xinerama screen as the taskbar. - -By default, this option is selected and all windows are shown. - - @@ -328,7 +320,7 @@ By default, this option is selected and all windows are shown. - + kcfg_AllowDragAndDropReArrange @@ -345,7 +337,7 @@ By default, this option is selected and all windows are shown. Turning this option on will allow tasks on the taskbar to be manually rearranged using drag and drop. - + kcfg_SortByApp @@ -359,12 +351,12 @@ By default, this option is selected and all windows are shown. true - + kSeparator6 - + groupTasksLabel @@ -400,11 +392,7 @@ By default, this option is selected and all windows are shown. - The taskbar can group similar windows into single buttons. When one of these window group buttons are clicked on a menu appears showing all the windows in that group. This can be especially useful with the <em>Show all windows</em> option. - -You can set the taskbar to <strong>Never</strong> group windows, to <strong>Always</strong> group windows or to group windows only <strong>When the Taskbar is Full</strong>. - -By default the taskbar groups windows when it is full. + The taskbar can group similar windows into single buttons. When one of these window group buttons are clicked on a menu appears showing all the windows in that group. This can be especially useful with the <em>Show all windows</em> option. You can set the taskbar to <strong>Never</strong> group windows, to <strong>Always</strong> group windows or to group windows only <strong>When the Taskbar is Full</strong>. By default the taskbar groups windows when it is full. @@ -480,7 +468,7 @@ By default the taskbar groups windows when it is full. 3 - 4 + 5 0 0 @@ -509,7 +497,7 @@ By default the taskbar groups windows when it is full. - + kcfg_UseCustomColors @@ -526,7 +514,7 @@ By default the taskbar groups windows when it is full. true - + layout19 @@ -576,25 +564,16 @@ By default the taskbar groups windows when it is full. kcfg_InactiveTaskTextColor - - - kcfg_ActiveTaskTextColor - - - kcfg_TaskBackgroundColor - - - @@ -638,7 +617,7 @@ By default the taskbar groups windows when it is full. unnamed - + kcfg_ShowWindowListBtn @@ -655,7 +634,23 @@ By default the taskbar groups windows when it is full. Selecting this option causes the taskbar to display a button that, when clicked, shows a list of all windows in a popup menu. - + + + kSeparator7 + + + + + maxButtonWidthLabel + + + Max width for buttons: + + + This option allows to set the maximum width for taskbar buttons. + + + kcfg_MaximumButtonWidth @@ -672,14 +667,6 @@ By default the taskbar groups windows when it is full. 200 - - - maxButtonWidthLabel - - - Maximum button width: - - @@ -701,78 +688,26 @@ By default the taskbar groups windows when it is full. unnamed - - - kcfg_DisplayIconsNText - - - - 5 - 0 - 0 - 0 - - - - Choose taskbar display mode among <strong>Icons and text</strong>, <strong>Text only</strong> and <strong>Icons only</strong>. - - - + displayIconsNTextLabel - - - 1 - 5 - 0 - 0 - - - - - 100 - 0 - - Dis&play: kcfg_DisplayIconsNText - - - - kcfg_ShowThumbnails - - - Show thumbnails on hover (needs TWin compositor enabled) - - - - - kcfg_ThumbnailMaxDimension - - - false - - - px - - - 500 - - - 50 - - - 100 + + + 130 + 0 + - + - spacer2_2_2_3 + spacer2_2_2_3_3 Horizontal @@ -787,27 +722,107 @@ By default the taskbar groups windows when it is full. - + - thumbMaxDimensionLabel + kcfg_DisplayIconsNText - - false + + + 5 + 0 + 0 + 0 + - - Maximum dimension: + + Choose taskbar display mode among <strong>Icons and text</strong>, <strong>Text only</strong> and <strong>Icons only</strong>. - + - smallIcons + useIconsFrame - - Small icons + + false - - true + + StyledPanel + + + Raised + + + + smallIcons + + + Small icons + + + Selecting this option makes the taskbar use small icons. + + + true + + + + + kcfg_ShowThumbnails + + + Show thumbnails on hover + + + + + spacer2_2_2_3 + + + Horizontal + + + Fixed + + + + 20 + 20 + + + + + + thumbMaxDimensionLabel + + + false + + + Maximum dimension: + + + + + kcfg_ThumbnailMaxDimension + + + false + + + px + + + 500 + + + 50 + + + 100 + + + @@ -840,8 +855,31 @@ By default the taskbar groups windows when it is full. appearance + + + 130 + 0 + + - + + + spacer2_2_2_3_3 + + + Horizontal + + + Fixed + + + + 20 + 20 + + + + appearance @@ -854,7 +892,7 @@ By default the taskbar groups windows when it is full. - + customAppearance @@ -871,30 +909,13 @@ By default the taskbar groups windows when it is full. unnamed - - - kcfg_HaloText - - - Draw halo around text - - - - - - true - - - + kcfg_DrawButtons Always draw items as buttons - - - @@ -913,15 +934,23 @@ By default the taskbar groups windows when it is full. - + kcfg_ShowButtonOnHover Draw items as buttons on hover - - + + + + kcfg_HaloText + + + Draw halo around text + + + true @@ -1032,7 +1061,7 @@ By default the taskbar groups windows when it is full. kcfg_RightButtonAction - + kcfg_CycleWheel -- cgit v1.2.1