summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2014-06-04 20:37:39 +0900
committerMichele Calgaro <[email protected]>2014-06-04 20:37:39 +0900
commit8a8b8ce4a43df3cb0a8861207d425c8c12437342 (patch)
tree4f7d351e5ac1877a3f399c38bd652c6963008ba5
parente5f5e70d8780c4ed7a024a2ebed36b77734fdd0b (diff)
downloadtdebase-8a8b8ce4a43df3cb0a8861207d425c8c12437342.tar.gz
tdebase-8a8b8ce4a43df3cb0a8861207d425c8c12437342.zip
Moved position and improved appearance of "Change TDE menu icon" button
in Configure Panel -> Menus. This resolves bug 1706.
-rw-r--r--kcontrol/kicker/menutab.ui103
-rw-r--r--kcontrol/kicker/menutab_impl.cpp12
2 files changed, 40 insertions, 75 deletions
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 @@
</widget>
</grid>
</widget>
- <widget class="TQPushButton" colspan="4">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_editKMenuButton</cstring>
</property>
@@ -174,7 +174,21 @@
<string>Start the editor for the TDE Menu. Here you can add, edit, remove and hide applications.</string>
</property>
</widget>
- <spacer>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>btnCustomKMenuIcon</cstring>
+ </property>
+ <property name="text">
+ <string>Change menu icon</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Allows you to choose a different icon for the TDE menu.</string>
+ </property>
+ <property name="acceptDrops">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <spacer>
<property name="name">
<cstring>Spacer10</cstring>
</property>
@@ -293,6 +307,22 @@
<property name="margin">
<number>0</number>
</property>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1_3_3_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Text:</string>
+ </property>
+ </widget>
<widget class="TQLineEdit" row="0" column="1" colspan="3">
<property name="name">
<cstring>kcfg_KMenuText</cstring>
@@ -301,70 +331,7 @@
<number>35</number>
</property>
</widget>
- <widget class="TQLabel" row="3" column="0" colspan="2">
- <property name="name">
- <cstring>TextLabel1_3_3_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>4</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Change TDE Menu icon:</string>
- </property>
- </widget>
- <widget class="KPushButton" row="3" column="3" colspan="1">
- <property name="name">
- <cstring>btnCustomKMenuIcon</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>26</width>
- <height>26</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>26</width>
- <height>26</height>
- </size>
- </property>
- <property name="acceptDrops">
- <bool>false</bool>
- </property>
- <property name="text">
- <string></string>
- </property>
- </widget>
- <widget class="TQLabel" row="0" column="0">
- <property name="name">
- <cstring>TextLabel1_3_3_2</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>4</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Text:</string>
- </property>
- </widget>
- <widget class="TQLabel" row="2" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel1_3_3_2</cstring>
</property>
@@ -380,12 +347,12 @@
<string>Font:</string>
</property>
</widget>
- <widget class="TDEFontRequester" row="2" column="1" rowspan="1" colspan="3">
+ <widget class="TDEFontRequester" row="1" column="1" colspan="3">
<property name="name">
<cstring>kcfg_ButtonFont</cstring>
</property>
</widget>
- <spacer row="4" column="3">
+ <spacer row="2" column="3">
<property name="name">
<cstring>spacer6</cstring>
</property>
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();