diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2023-10-29 13:42:00 +0200 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2023-10-29 13:42:00 +0200 |
commit | 6d92006da35d74aa4aa72c5ca679aec5db125de8 (patch) | |
tree | 879a7a387708be62f95cb37f426a61369a3ba99c | |
parent | 30cc7c2464faae2a768052da092daa6705fa5401 (diff) | |
download | tastymenu-6d92006da35d74aa4aa72c5ca679aec5db125de8.tar.gz tastymenu-6d92006da35d74aa4aa72c5ca679aec5db125de8.zip |
Add initial menu transparency support
There is a (mostly aesthetic) problem related to widgets not respecting the palette's background pixmap, due to lack of support in themes (and probably the styles API?).
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
-rw-r--r-- | src/appearance.ui | 850 | ||||
-rw-r--r-- | src/menu.ui | 32 | ||||
-rw-r--r-- | src/menuhandler.cpp | 38 | ||||
-rw-r--r-- | src/menuhandler.h | 4 | ||||
-rw-r--r-- | src/tastymenu.cpp | 7 | ||||
-rw-r--r-- | src/tastymenu.kcfg | 10 |
6 files changed, 583 insertions, 358 deletions
diff --git a/src/appearance.ui b/src/appearance.ui index 209f5aa..ef4728a 100644 --- a/src/appearance.ui +++ b/src/appearance.ui @@ -8,8 +8,8 @@ <rect> <x>0</x> <y>0</y> - <width>520</width> - <height>465</height> + <width>647</width> + <height>734</height> </rect> </property> <property name="caption"> @@ -19,9 +19,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="5"> <property name="name"> - <cstring>Icons</cstring> + <cstring>menuSize</cstring> </property> <property name="font"> <font> @@ -29,110 +29,31 @@ </font> </property> <property name="text"> - <string>Applications list</string> + <string>Menu size</string> </property> <property name="alignment"> <set>AlignBottom</set> </property> </widget> - <widget class="TQCheckBox" row="13" column="2" rowspan="1" colspan="2"> - <property name="name"> - <cstring>kcfg_ShowExpander</cstring> - </property> - <property name="text"> - <string>Show tree e&xpanders</string> - </property> - </widget> - <widget class="TQCheckBox" row="14" column="2" rowspan="1" colspan="2"> - <property name="name"> - <cstring>kcfg_AlwaysCollapsed</cstring> - </property> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="text"> - <string>Alwa&ys collapsed categories</string> - </property> - </widget> - <widget class="TQLabel" row="10" column="1"> - <property name="name"> - <cstring>textLabel2</cstring> - </property> - <property name="text"> - <string>Hei&ght:</string> - </property> - <property name="alignment"> - <set>AlignVCenter|AlignRight</set> - </property> - <property name="buddy" stdset="0"> - <cstring>kcfg_MenuHeight</cstring> - </property> - </widget> - <widget class="TQLabel" row="5" column="1"> + <widget class="TQLabel" row="6" column="0" rowspan="1" colspan="5"> <property name="name"> - <cstring>textLabel1_4</cstring> - </property> - <property name="text"> - <string>Button label:</string> - </property> - <property name="alignment"> - <set>AlignVCenter|AlignRight</set> - </property> - </widget> - <spacer row="1" column="0"> - <property name="name"> - <cstring>spacer6</cstring> + <cstring>menuStyleLabel</cstring> </property> - <property name="orientation"> - <enum>Horizontal</enum> - </property> - <property name="sizeType"> - <enum>Expanding</enum> - </property> - <property name="sizeHint"> - <size> - <width>79</width> - <height>20</height> - </size> - </property> - </spacer> - <widget class="TQLineEdit" row="7" column="2"> - <property name="name"> - <cstring>kcfg_ToolTipTitle</cstring> - </property> - <property name="whatsThis" stdset="0"> - <string>What text should be displayed in the Kicker button tooltip instead of "Tasty Menu". -Empty means default.</string> - </property> - </widget> - <widget class="TQLabel" row="9" column="1"> - <property name="name"> - <cstring>textLabel1_2</cstring> - </property> - <property name="text"> - <string>Wi&dth:</string> - </property> - <property name="alignment"> - <set>AlignVCenter|AlignRight</set> - </property> - <property name="buddy" stdset="0"> - <cstring>kcfg_MenuWidth</cstring> - </property> - </widget> - <widget class="TQLabel" row="7" column="1"> - <property name="name"> - <cstring>textLabel5</cstring> + <property name="font"> + <font> + <bold>1</bold> + </font> </property> <property name="text"> - <string>Tootip title:</string> + <string>Menu style</string> </property> <property name="alignment"> - <set>AlignVCenter|AlignRight</set> + <set>AlignBottom</set> </property> </widget> - <widget class="TQLabel" row="12" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>ApplicationsList</cstring> + <cstring>Icons</cstring> </property> <property name="font"> <font> @@ -146,15 +67,7 @@ Empty means default.</string> <set>AlignBottom</set> </property> </widget> - <widget class="TQLabel" row="9" column="3"> - <property name="name"> - <cstring>textLabel3</cstring> - </property> - <property name="text"> - <string>of the screen width</string> - </property> - </widget> - <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>MenuButton</cstring> </property> @@ -170,246 +83,434 @@ Empty means default.</string> <set>AlignBottom</set> </property> </widget> - <widget class="TQLabel" row="10" column="3"> - <property name="name"> - <cstring>textLabel4</cstring> - </property> - <property name="text"> - <string>of the screen height</string> - </property> - </widget> - <widget class="TQCheckBox" row="11" column="2" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="1" rowspan="1" colspan="3"> <property name="name"> - <cstring>kcfg_StartFullScreen</cstring> + <cstring>layout2</cstring> </property> - <property name="text"> - <string>Start in full screen mode</string> - </property> - </widget> - <widget class="TQButtonGroup" row="6" column="2" rowspan="1" colspan="2"> - <property name="name"> - <cstring>kcfg_MenuButtonIconType</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="frameShape"> - <enum>NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>Plain</enum> - </property> - <property name="title"> - <string></string> - </property> - <hbox> + <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <property name="margin"> - <number>0</number> - </property> - <widget class="TQRadioButton"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> - <cstring>kcfg_Icon</cstring> + <cstring>textLabel1_3</cstring> </property> <property name="text"> - <string>&Icon:</string> + <string>&Action icons size:</string> + </property> + <property name="alignment"> + <set>AlignVCenter|AlignRight</set> + </property> + <property name="buddy" stdset="0"> + <cstring>kcfg_ActionIconSize</cstring> + </property> + </widget> + <widget class="TQSpinBox" row="1" column="1"> + <property name="name"> + <cstring>kcfg_ActionIconSize</cstring> + </property> + <property name="suffix"> + <string> pixels</string> + </property> + <property name="maxValue"> + <number>48</number> + </property> + <property name="minValue"> + <number>16</number> </property> - <property name="checked"> + </widget> + <widget class="TQCheckBox" row="4" column="1"> + <property name="name"> + <cstring>kcfg_AlwaysCollapsed</cstring> + </property> + <property name="enabled"> <bool>true</bool> </property> + <property name="text"> + <string>Alwa&ys collapsed categories</string> + </property> + <property name="accel"> + <string>Alt+Y</string> + </property> + </widget> + <widget class="TQLayoutWidget" row="0" column="1"> + <property name="name"> + <cstring>layout1</cstring> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQLabel" row="0" column="2"> + <property name="name"> + <cstring>textLabel1_5_3</cstring> + </property> + <property name="text"> + <string>third column:</string> + </property> + </widget> + <widget class="TQLabel" row="0" column="1"> + <property name="name"> + <cstring>textLabel1_5_2</cstring> + </property> + <property name="text"> + <string>second column:</string> + </property> + </widget> + <widget class="TQSpinBox" row="1" column="0"> + <property name="name"> + <cstring>kcfg_IconSize1</cstring> + </property> + <property name="suffix"> + <string> pixels</string> + </property> + <property name="maxValue"> + <number>48</number> + </property> + <property name="minValue"> + <number>16</number> + </property> + <property name="value"> + <number>22</number> + </property> + </widget> + <widget class="TQSpinBox" row="1" column="2"> + <property name="name"> + <cstring>kcfg_IconSize3</cstring> + </property> + <property name="suffix"> + <string> pixels</string> + </property> + <property name="maxValue"> + <number>48</number> + </property> + <property name="minValue"> + <number>16</number> + </property> + <property name="value"> + <number>22</number> + </property> + </widget> + <widget class="TQSpinBox" row="1" column="1"> + <property name="name"> + <cstring>kcfg_IconSize2</cstring> + </property> + <property name="suffix"> + <string> pixels</string> + </property> + <property name="maxValue"> + <number>48</number> + </property> + <property name="minValue"> + <number>16</number> + </property> + <property name="value"> + <number>22</number> + </property> + </widget> + <widget class="TQLabel" row="0" column="0"> + <property name="name"> + <cstring>textLabel1_5</cstring> + </property> + <property name="text"> + <string>first column:</string> + </property> + </widget> + </grid> </widget> - <widget class="TDEIconButton"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> - <cstring>MenuButtonIcon</cstring> + <cstring>textLabel1</cstring> </property> <property name="sizePolicy"> <sizepolicy> <hsizetype>7</hsizetype> - <vsizetype>0</vsizetype> + <vsizetype>5</vsizetype> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="text"> - <string></string> + <string>Icons sizes:</string> </property> - <property name="whatsThis" stdset="0"> - <string>What icon should be displayed in the kicker button instead of the TMenu one. -Empty means default.</string> + <property name="alignment"> + <set>AlignVCenter|AlignRight</set> + </property> + <property name="buddy" stdset="0"> + <cstring>kcfg_IconSize</cstring> </property> </widget> - <widget class="TQLineEdit"> + <widget class="TQCheckBox" row="2" column="1"> <property name="name"> - <cstring>kcfg_MenuButtonIcon</cstring> + <cstring>kcfg_DisplaySubText</cstring> </property> - <property name="enabled"> - <bool>false</bool> + <property name="text"> + <string>&Display applications descriptions</string> + </property> + <property name="accel"> + <string>Alt+D</string> </property> </widget> - <widget class="TQRadioButton"> + <widget class="TQCheckBox" row="3" column="1"> <property name="name"> - <cstring>kcfg_IconNone</cstring> + <cstring>kcfg_ShowExpander</cstring> </property> <property name="text"> - <string>N&one</string> + <string>Show tree e&xpanders</string> + </property> + <property name="accel"> + <string>Alt+X</string> </property> </widget> - </hbox> + </grid> </widget> - <widget class="TQLabel" row="8" column="0" rowspan="1" colspan="4"> + <spacer row="1" column="0"> <property name="name"> - <cstring>menuSize</cstring> + <cstring>spacer6</cstring> </property> - <property name="font"> - <font> - <bold>1</bold> - </font> + <property name="orientation"> + <enum>Horizontal</enum> </property> - <property name="text"> - <string>Menu size</string> + <property name="sizeType"> + <enum>Expanding</enum> </property> - <property name="alignment"> - <set>AlignBottom</set> + <property name="sizeHint"> + <size> + <width>79</width> + <height>20</height> + </size> </property> - </widget> - <widget class="TQLabel" row="2" column="1"> + </spacer> + <spacer row="1" column="4"> <property name="name"> - <cstring>textLabel1_3</cstring> + <cstring>spacer6_2</cstring> </property> - <property name="text"> - <string>&Action icons size:</string> - </property> - <property name="alignment"> - <set>AlignVCenter|AlignRight</set> - </property> - <property name="buddy" stdset="0"> - <cstring>kcfg_ActionIconSize</cstring> + <property name="orientation"> + <enum>Horizontal</enum> </property> - </widget> - <widget class="TQCheckBox" row="3" column="2" rowspan="1" colspan="2"> - <property name="name"> - <cstring>kcfg_DisplaySubText</cstring> + <property name="sizeType"> + <enum>Expanding</enum> </property> - <property name="text"> - <string>&Display applications descriptions</string> + <property name="sizeHint"> + <size> + <width>88</width> + <height>20</height> + </size> </property> - </widget> - <widget class="TQButtonGroup" row="5" column="2" rowspan="1" colspan="2"> + </spacer> + <spacer row="3" column="0"> <property name="name"> - <cstring>kcfg_MenuButtonLabelType</cstring> + <cstring>spacer6_3</cstring> </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>5</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <property name="orientation"> + <enum>Horizontal</enum> </property> - <property name="frameShape"> - <enum>NoFrame</enum> + <property name="sizeType"> + <enum>Expanding</enum> </property> - <property name="frameShadow"> - <enum>Plain</enum> + <property name="sizeHint"> + <size> + <width>88</width> + <height>20</height> + </size> </property> - <property name="title"> - <string></string> + </spacer> + <widget class="TQLayoutWidget" row="3" column="2"> + <property name="name"> + <cstring>layout3</cstring> </property> - <hbox> + <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <property name="margin"> - <number>0</number> - </property> - <widget class="TQRadioButton"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> - <cstring>kcfg_MenuButtonText</cstring> + <cstring>kcfg_ToolTipTitle</cstring> + </property> + <property name="whatsThis" stdset="0"> + <string>What text should be displayed in the Kicker button tooltip instead of "Tasty Menu". +Empty means default.</string> + </property> + </widget> + <widget class="TQLabel" row="2" column="0"> + <property name="name"> + <cstring>textLabel5</cstring> </property> <property name="text"> - <string>&Text:</string> + <string>Tootip title:</string> </property> - <property name="checked"> - <bool>true</bool> + <property name="alignment"> + <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="TQLineEdit"> + <widget class="TQButtonGroup" row="1" column="1"> <property name="name"> - <cstring>kcfg_MenuButtonLabel</cstring> + <cstring>kcfg_MenuButtonIconType</cstring> </property> - <property name="text"> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>Plain</enum> + </property> + <property name="title"> <string></string> </property> - <property name="whatsThis" stdset="0"> - <string>What label instead of "Menu" should be shown for the Kicker button. + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <widget class="TQRadioButton"> + <property name="name"> + <cstring>kcfg_Icon</cstring> + </property> + <property name="text"> + <string>&Icon:</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + <widget class="TDEIconButton"> + <property name="name"> + <cstring>MenuButtonIcon</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string></string> + </property> + <property name="whatsThis" stdset="0"> + <string>What icon should be displayed in the kicker button instead of the TMenu one. Empty means default.</string> + </property> + </widget> + <widget class="TQLineEdit"> + <property name="name"> + <cstring>kcfg_MenuButtonIcon</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + </widget> + <widget class="TQRadioButton"> + <property name="name"> + <cstring>kcfg_IconNone</cstring> + </property> + <property name="text"> + <string>N&one</string> + </property> + </widget> + </hbox> + </widget> + <widget class="TQLabel" row="0" column="0"> + <property name="name"> + <cstring>textLabel1_4</cstring> + </property> + <property name="text"> + <string>Button label:</string> + </property> + <property name="alignment"> + <set>AlignVCenter|AlignRight</set> + </property> + </widget> + <widget class="TQButtonGroup" row="0" column="1"> + <property name="name"> + <cstring>kcfg_MenuButtonLabelType</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>Plain</enum> </property> + <property name="title"> + <string></string> + </property> + <hbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <property name="margin"> + <number>0</number> + </property> + <widget class="TQRadioButton"> + <property name="name"> + <cstring>kcfg_MenuButtonText</cstring> + </property> + <property name="text"> + <string>&Text:</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + <widget class="TQLineEdit"> + <property name="name"> + <cstring>kcfg_MenuButtonLabel</cstring> + </property> + <property name="text"> + <string></string> + </property> + <property name="whatsThis" stdset="0"> + <string>What label instead of "Menu" should be shown for the Kicker button. +Empty means default.</string> + </property> + </widget> + <widget class="TQRadioButton"> + <property name="name"> + <cstring>kcfg_MenuButtonNone</cstring> + </property> + <property name="text"> + <string>&None</string> + </property> + <property name="accel"> + <string>Alt+N</string> + </property> + </widget> + </hbox> </widget> - <widget class="TQRadioButton"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> - <cstring>kcfg_MenuButtonNone</cstring> + <cstring>textLabel2_2</cstring> </property> <property name="text"> - <string>&None</string> + <string>Button icon:</string> + </property> + <property name="alignment"> + <set>AlignVCenter|AlignRight</set> </property> </widget> - </hbox> - </widget> - <widget class="TQSpinBox" row="9" column="2"> - <property name="name"> - <cstring>kcfg_MenuWidth</cstring> - </property> - <property name="suffix"> - <string>%</string> - </property> - <property name="maxValue"> - <number>90</number> - </property> - <property name="minValue"> - <number>10</number> - </property> - <property name="value"> - <number>70</number> - </property> - </widget> - <widget class="TQSpinBox" row="10" column="2"> - <property name="name"> - <cstring>kcfg_MenuHeight</cstring> - </property> - <property name="suffix"> - <string>%</string> - </property> - <property name="maxValue"> - <number>90</number> - </property> - <property name="minValue"> - <number>10</number> - </property> - <property name="value"> - <number>70</number> - </property> - </widget> - <widget class="TQLabel" row="6" column="1"> - <property name="name"> - <cstring>textLabel2_2</cstring> - </property> - <property name="text"> - <string>Button icon:</string> - </property> - <property name="alignment"> - <set>AlignVCenter|AlignRight</set> - </property> + </grid> </widget> - <spacer row="9" column="4" rowspan="2" colspan="1"> + <spacer row="3" column="3" rowspan="1" colspan="2"> <property name="name"> - <cstring>spacer4</cstring> + <cstring>spacer6_4</cstring> </property> <property name="orientation"> <enum>Horizontal</enum> @@ -419,136 +520,203 @@ Empty means default.</string> </property> <property name="sizeHint"> <size> - <width>78</width> - <height>21</height> + <width>88</width> + <height>20</height> </size> </property> </spacer> - <widget class="TQLayoutWidget" row="1" column="2" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="5" column="2"> <property name="name"> - <cstring>layout1</cstring> + <cstring>layout4</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="TQLabel" row="0" column="2"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> - <cstring>textLabel1_5_3</cstring> + <cstring>kcfg_MenuHeight</cstring> </property> - <property name="text"> - <string>third column:</string> + <property name="suffix"> + <string>%</string> + </property> + <property name="maxValue"> + <number>90</number> + </property> + <property name="minValue"> + <number>10</number> + </property> + <property name="value"> + <number>70</number> </property> </widget> - <widget class="TQLabel" row="0" column="1"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> - <cstring>textLabel1_5_2</cstring> + <cstring>textLabel2</cstring> </property> <property name="text"> - <string>second column:</string> + <string>Hei&ght:</string> + </property> + <property name="alignment"> + <set>AlignVCenter|AlignRight</set> + </property> + <property name="buddy" stdset="0"> + <cstring>kcfg_MenuHeight</cstring> </property> </widget> - <widget class="TQSpinBox" row="1" column="0"> + <widget class="TQLabel" row="0" column="0" rowspan="2" colspan="1"> <property name="name"> - <cstring>kcfg_IconSize1</cstring> + <cstring>textLabel1_2</cstring> </property> - <property name="suffix"> - <string> pixels</string> + <property name="text"> + <string>Wi&dth:</string> </property> - <property name="maxValue"> - <number>48</number> + <property name="alignment"> + <set>AlignVCenter|AlignRight</set> </property> - <property name="minValue"> - <number>16</number> + <property name="buddy" stdset="0"> + <cstring>kcfg_MenuWidth</cstring> </property> - <property name="value"> - <number>22</number> + </widget> + <widget class="TQLabel" row="1" column="2" rowspan="2" colspan="1"> + <property name="name"> + <cstring>textLabel4</cstring> + </property> + <property name="text"> + <string>of the screen height</string> </property> </widget> - <widget class="TQSpinBox" row="1" column="2"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> - <cstring>kcfg_IconSize3</cstring> + <cstring>kcfg_MenuWidth</cstring> </property> <property name="suffix"> - <string> pixels</string> + <string>%</string> </property> <property name="maxValue"> - <number>48</number> + <number>90</number> </property> <property name="minValue"> - <number>16</number> + <number>10</number> </property> <property name="value"> - <number>22</number> + <number>70</number> </property> </widget> - <widget class="TQSpinBox" row="1" column="1"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> - <cstring>kcfg_IconSize2</cstring> + <cstring>textLabel3</cstring> </property> - <property name="suffix"> - <string> pixels</string> + <property name="text"> + <string>of the screen width</string> </property> - <property name="maxValue"> - <number>48</number> + </widget> + <widget class="TQCheckBox" row="3" column="1" rowspan="1" colspan="2"> + <property name="name"> + <cstring>kcfg_StartFullScreen</cstring> </property> - <property name="minValue"> - <number>16</number> + <property name="text"> + <string>Start in full screen mode</string> </property> - <property name="value"> - <number>22</number> + </widget> + </grid> + </widget> + <spacer row="5" column="0"> + <property name="name"> + <cstring>spacer6_5</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>88</width> + <height>20</height> + </size> + </property> + </spacer> + <spacer row="5" column="4"> + <property name="name"> + <cstring>spacer6_6</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>88</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="TQLayoutWidget" row="7" column="2"> + <property name="name"> + <cstring>layout5</cstring> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TQCheckBox" row="0" column="0"> + <property name="name"> + <cstring>kcfg_Transparent</cstring> + </property> + <property name="text"> + <string>Transparent background</string> </property> </widget> - <widget class="TQLabel" row="0" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> - <cstring>textLabel1_5</cstring> + <cstring>kcfg_BlurBackground</cstring> </property> <property name="text"> - <string>first column:</string> + <string>Blur transparent background</string> </property> </widget> </grid> </widget> - <widget class="TQLabel" row="1" column="1"> + <spacer row="7" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>textLabel1</cstring> - </property> - <property name="sizePolicy"> - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>5</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <cstring>spacer6_7</cstring> </property> - <property name="text"> - <string>Icons sizes:</string> + <property name="orientation"> + <enum>Horizontal</enum> </property> - <property name="alignment"> - <set>AlignVCenter|AlignRight</set> + <property name="sizeType"> + <enum>Expanding</enum> </property> - <property name="buddy" stdset="0"> - <cstring>kcfg_IconSize</cstring> + <property name="sizeHint"> + <size> + <width>88</width> + <height>20</height> + </size> </property> - </widget> - <widget class="TQSpinBox" row="2" column="2"> + </spacer> + <spacer row="7" column="3" rowspan="1" colspan="2"> <property name="name"> - <cstring>kcfg_ActionIconSize</cstring> + <cstring>spacer6_7_2</cstring> </property> - <property name="suffix"> - <string> pixels</string> + <property name="orientation"> + <enum>Horizontal</enum> </property> - <property name="maxValue"> - <number>48</number> + <property name="sizeType"> + <enum>Expanding</enum> </property> - <property name="minValue"> - <number>16</number> + <property name="sizeHint"> + <size> + <width>88</width> + <height>20</height> + </size> </property> - </widget> + </spacer> </grid> </widget> -<customwidgets> -</customwidgets> <connections> <connection> <sender>kcfg_MenuButtonText</sender> @@ -581,13 +749,13 @@ Empty means default.</string> <slot>iconChanged(TQString)</slot> </connection> </connections> +<includes> + <include location="global" impldecl="in implementation">kicondialog.h</include> + <include location="local" impldecl="in implementation">appearance.ui.h</include> +</includes> <slots> <slot>kcfg_ShowExpander_toggled( bool status )</slot> <slot>iconChanged( TQString icon )</slot> </slots> <layoutdefaults spacing="6" margin="11"/> -<includes> - <include location="local" impldecl="in implementation">appearance.ui.h</include> - <include location="global" impldecl="in implementation">kicondialog.h</include> -</includes> </UI> diff --git a/src/menu.ui b/src/menu.ui index 561a0a8..091124f 100644 --- a/src/menu.ui +++ b/src/menu.ui @@ -8,8 +8,8 @@ <rect> <x>0</x> <y>0</y> - <width>538</width> - <height>428</height> + <width>879</width> + <height>708</height> </rect> </property> <property name="caption"> @@ -27,7 +27,10 @@ </property> <widget class="TQFrame"> <property name="name"> - <cstring>frame9</cstring> + <cstring>menuFrame</cstring> + </property> + <property name="backgroundOrigin"> + <enum>WidgetOrigin</enum> </property> <property name="frameShape"> <enum>PopupPanel</enum> @@ -49,6 +52,9 @@ <height>32767</height> </size> </property> + <property name="backgroundOrigin"> + <enum>AncestorOrigin</enum> + </property> <property name="frameShape"> <enum>StyledPanel</enum> </property> @@ -88,6 +94,9 @@ <property name="name"> <cstring>searchLabel</cstring> </property> + <property name="backgroundOrigin"> + <enum>AncestorOrigin</enum> + </property> <property name="text"> <string>Se&arch:</string> </property> @@ -162,6 +171,9 @@ <property name="name"> <cstring>showLabel</cstring> </property> + <property name="backgroundOrigin"> + <enum>AncestorOrigin</enum> + </property> <property name="text"> <string>&Show:</string> </property> @@ -205,6 +217,9 @@ <verstretch>0</verstretch> </sizepolicy> </property> + <property name="backgroundOrigin"> + <enum>AncestorOrigin</enum> + </property> <property name="frameShape"> <enum>StyledPanel</enum> </property> @@ -220,7 +235,10 @@ </property> <widget class="TQLabel"> <property name="name"> - <cstring>textLabel1</cstring> + <cstring>allAppsLabel</cstring> + </property> + <property name="backgroundOrigin"> + <enum>AncestorOrigin</enum> </property> <property name="font"> <font> @@ -246,6 +264,9 @@ <verstretch>0</verstretch> </sizepolicy> </property> + <property name="backgroundOrigin"> + <enum>AncestorOrigin</enum> + </property> <property name="text"> <string>...</string> </property> @@ -350,9 +371,10 @@ <tabstop>lockButton</tabstop> <tabstop>logoutButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> <includes> <include location="global" impldecl="in implementation">kpushbutton.h</include> <include location="global" impldecl="in implementation">tdelistviewsearchline.h</include> + <include location="global" impldecl="in implementation">tastylistview.h</include> </includes> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/src/menuhandler.cpp b/src/menuhandler.cpp index 8eaeabb..e0c226f 100644 --- a/src/menuhandler.cpp +++ b/src/menuhandler.cpp @@ -1,4 +1,3 @@ - /*************************************************************************** * Copyright (C) 2006-2007 by Marco Martin * * notmart@gmail.com * @@ -30,14 +29,16 @@ #include <tqfile.h> #include <tqcursor.h> #include <tdepopupmenu.h> +#include <tqobjectlist.h> #include <kdebug.h> +#include <tqlabel.h> #include <time.h> #include "menuhandler.h" #include "buttons.h" MenuHandler::MenuHandler( TQWidget *parent, Prefs *prefs, char *name, WFlags fl) - :TQFrame(parent, name, fl ), searchMode(false) + :TQFrame(parent, name, fl ), searchMode(false), rootPix(nullptr) { prefSkel = prefs; @@ -82,6 +83,7 @@ MenuHandler::MenuHandler( TQWidget *parent, Prefs *prefs, char *name, WFlags fl) readConfig(); setupColumns(); updateWindowType(); + setBackground(); //Searchline... iconLoader = TDEGlobal::iconLoader(); @@ -139,6 +141,7 @@ MenuHandler::MenuHandler( TQWidget *parent, Prefs *prefs, char *name, WFlags fl) sessionsMenu = new TQPopupMenu(); menu->switchButton->setPopup(sessionsMenu); + menu->allAppsFrame->setPaletteBackgroundColor(colorGroup().background()); initializeRecentlyUsed( ); @@ -490,6 +493,7 @@ void MenuHandler::updateConfig() { readConfig(); updateWindowType(); + setBackground(); menu->dynamicList->setActionIconSize( _actionIconSize ); menu->rootList->setActionIconSize( _actionIconSize ); @@ -501,7 +505,7 @@ void MenuHandler::updateConfig() menuModeChanged( _menuMode ); KServiceGroup::Ptr service = KServiceGroup::root(); menu->rootList->clear(); - populateList( service, menu->rootList, NULL, false ); + populateList( service, menu->rootList, NULL, false ); } @@ -518,10 +522,8 @@ void MenuHandler::mousePressEvent( TQMouseEvent *e) } } -void MenuHandler::closeEvent ( TQCloseEvent *e) +void MenuHandler::closeEvent(TQCloseEvent *e) { - e=e; - if( _isNormalWindow ) { prefSkel->setNormalWindowWidth(width()); @@ -1697,5 +1699,29 @@ void MenuHandler::switchWindowMode() menu->detachButton->setIconSet(TQPixmap(uic_findImage(_isNormalWindow ? "attach.png" : "detach.png"))); } + +void MenuHandler::setBackground() +{ + if (rootPix) { + rootPix->stop(); + delete rootPix; + rootPix = nullptr; + } + + if (prefSkel->transparent()) { + rootPix = new KRootPixmap(this); + rootPix->setCustomPainting(true); + rootPix->setBlurEffect(0.0, prefSkel->blurBackground() ? 4.0 : 0.0); + connect(rootPix, TQT_SIGNAL(backgroundUpdated(const TQPixmap&)), + TQT_SLOT(updateBackground(const TQPixmap&))); + rootPix->start(); + } +} + +void MenuHandler::updateBackground(const TQPixmap &pix) +{ + menu->setPaletteBackgroundPixmap(pix); +} + #include "menuhandler.moc" //EOF diff --git a/src/menuhandler.h b/src/menuhandler.h index f87109a..e020f60 100644 --- a/src/menuhandler.h +++ b/src/menuhandler.h @@ -41,6 +41,7 @@ #include <kdirlister.h> #include <tqlayout.h> #include <tdefileitem.h> +#include <krootpixmap.h> #include "dmctl.h" #include "menu.h" @@ -109,6 +110,7 @@ private: int firstListing; TQStringList oldInstalledList, newInstalledList; TQValueList<int> newInstalledTimeStamps; + KRootPixmap *rootPix; TQPixmap bookMarkPix; TQVBoxLayout * MenuHandlerLayout; @@ -152,6 +154,7 @@ private: void setupDynList( MenuMode mode ); //FIXME: this thing is UBER HEAVY bool searchNewItems(KServiceGroup::Ptr group); + void setBackground(); public slots: void slotUpdateApplications(); @@ -178,6 +181,7 @@ private slots: void menuModeChanged( int index ); void switchWindowMode(); void updateWindowType(); + void updateBackground(const TQPixmap &pix); }; #endif diff --git a/src/tastymenu.cpp b/src/tastymenu.cpp index c85d28a..2b8520c 100644 --- a/src/tastymenu.cpp +++ b/src/tastymenu.cpp @@ -56,12 +56,7 @@ TastyMenu::TastyMenu(const TQString& configFile, Type type, int actions, TQWidge _showBigToolTip = kickerConf->readBoolEntry("EnableIconZoom", true); button = new TastyButton(this); - - auto windowType = (prefSkel->isNormalWindow() ? TQt::WType_Dialog - : (prefSkel->startFullScreen() ? TQt::WType_TopLevel - : TQt::WType_Popup)); - - menuHandler = new MenuHandler(this, prefSkel, "MenuHandler", windowType | TQt::WNoAutoErase); + menuHandler = new MenuHandler(this, prefSkel, "MenuHandler", 0); connect (button, SIGNAL (pressed()), this, SLOT (clickSlot ())); connect (menuHandler, SIGNAL(hidden()), this, SLOT(setButtonUp())); diff --git a/src/tastymenu.kcfg b/src/tastymenu.kcfg index 38dd337..e896a36 100644 --- a/src/tastymenu.kcfg +++ b/src/tastymenu.kcfg @@ -101,6 +101,16 @@ <label>If the applications categories should be collapsed by default</label> <default>false</default> </entry> + + <entry name="Transparent" type="Bool"> + <label>Transparent background</label> + <default>false</default> + </entry> + + <entry name="BlurBackground" type="Bool"> + <label>Blur background</label> + <default>false</default> + </entry> </group> <group name="Behaviour"> |