From 8a8b8ce4a43df3cb0a8861207d425c8c12437342 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 4 Jun 2014 20:37:39 +0900 Subject: Moved position and improved appearance of "Change TDE menu icon" button in Configure Panel -> Menus. This resolves bug 1706. --- kcontrol/kicker/menutab.ui | 103 +++++++++++++-------------------------- kcontrol/kicker/menutab_impl.cpp | 12 ++--- 2 files changed, 40 insertions(+), 75 deletions(-) (limited to 'kcontrol') diff --git a/kcontrol/kicker/menutab.ui b/kcontrol/kicker/menutab.ui index 78a9711ed..aa488c1b0 100644 --- a/kcontrol/kicker/menutab.ui +++ b/kcontrol/kicker/menutab.ui @@ -163,7 +163,7 @@ - + m_editKMenuButton @@ -174,7 +174,21 @@ Start the editor for the TDE Menu. Here you can add, edit, remove and hide applications. - + + + btnCustomKMenuIcon + + + Change menu icon + + + Allows you to choose a different icon for the TDE menu. + + + false + + + Spacer10 @@ -293,6 +307,22 @@ 0 + + + TextLabel1_3_3_2 + + + + 4 + 1 + 0 + 0 + + + + Text: + + kcfg_KMenuText @@ -301,70 +331,7 @@ 35 - - - TextLabel1_3_3_2 - - - - 4 - 1 - 0 - 0 - - - - Change TDE Menu icon: - - - - - btnCustomKMenuIcon - - - - 0 - 0 - 0 - 0 - - - - - 26 - 26 - - - - - 26 - 26 - - - - false - - - - - - - - TextLabel1_3_3_2 - - - - 4 - 1 - 0 - 0 - - - - Text: - - - + TextLabel1_3_3_2 @@ -380,12 +347,12 @@ Font: - + kcfg_ButtonFont - + spacer6 diff --git a/kcontrol/kicker/menutab_impl.cpp b/kcontrol/kicker/menutab_impl.cpp index 571365a55..6be59c475 100644 --- a/kcontrol/kicker/menutab_impl.cpp +++ b/kcontrol/kicker/menutab_impl.cpp @@ -85,13 +85,12 @@ MenuTab::MenuTab( TQWidget *parent, const char* name ) connect(maxrecentdocs, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(kmenuChanged())); TDEIconLoader * ldr = TDEGlobal::iconLoader(); - TQPixmap kmenu_icon; m_kmenu_icon = KickerSettings::customKMenuIcon(); if (m_kmenu_icon.isNull() == true) { m_kmenu_icon = TQString("kmenu"); } - kmenu_icon = ldr->loadIcon(m_kmenu_icon, TDEIcon::Small, TDEIcon::SizeSmall); - btnCustomKMenuIcon->setPixmap(kmenu_icon); + TQIconSet kmenu_icon = ldr->loadIconSet(m_kmenu_icon, TDEIcon::Small, TDEIcon::SizeSmall); + btnCustomKMenuIcon->setIconSet(kmenu_icon); TDEConfig *config; config = new TDEConfig(TQString::fromLatin1("kdeglobals"), false, false); @@ -323,10 +322,9 @@ void MenuTab::launchIconEditor() return; m_kmenu_icon = newIcon; - TDEIconLoader * ldr = TDEGlobal::iconLoader(); - TQPixmap kmenu_icon; - kmenu_icon = ldr->loadIcon(m_kmenu_icon, TDEIcon::Small, TDEIcon::SizeSmall); - btnCustomKMenuIcon->setPixmap(kmenu_icon); + TDEIconLoader * ldr = TDEGlobal::iconLoader(); + TQIconSet kmenu_icon = ldr->loadIconSet(m_kmenu_icon, TDEIcon::Small, TDEIcon::SizeSmall); + btnCustomKMenuIcon->setIconSet(kmenu_icon); m_kmenu_button_changed = true; emit changed(); -- cgit v1.2.1