Added "Follow Kicker panel style" feature

This option overrides existing TastyMenu-specific transparency and blur options by using the appearance options for Kicker (transparency, blur, tint).

This option works with both Kicker transparency enabled and disabled but ignores the background image option by design.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
feat/minor-improvements
Mavridis Philippe 1 year ago
parent a524c4c5c6
commit 8a05c7576b
No known key found for this signature in database
GPG Key ID: 93F66F98F906147D

@ -9,7 +9,7 @@
<x>0</x>
<y>0</y>
<width>647</width>
<height>734</height>
<height>608</height>
</rect>
</property>
<property name="caption">
@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQLabel" row="4" column="0" rowspan="1" colspan="5">
<widget class="TQLabel" row="4" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>menuSize</cstring>
</property>
@ -35,7 +35,7 @@
<set>AlignBottom</set>
</property>
</widget>
<widget class="TQLabel" row="6" column="0" rowspan="1" colspan="5">
<widget class="TQLabel" row="6" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>menuStyleLabel</cstring>
</property>
@ -51,7 +51,7 @@
<set>AlignBottom</set>
</property>
</widget>
<widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3">
<widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>Icons</cstring>
</property>
@ -67,7 +67,7 @@
<set>AlignBottom</set>
</property>
</widget>
<widget class="TQLabel" row="2" column="0" rowspan="1" colspan="3">
<widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>MenuButton</cstring>
</property>
@ -83,7 +83,7 @@
<set>AlignBottom</set>
</property>
</widget>
<widget class="TQLayoutWidget" row="1" column="1" rowspan="1" colspan="3">
<widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
<cstring>layout2</cstring>
</property>
@ -281,7 +281,7 @@
</size>
</property>
</spacer>
<spacer row="1" column="4">
<spacer row="1" column="2">
<property name="name">
<cstring>spacer6_2</cstring>
</property>
@ -315,7 +315,7 @@
</size>
</property>
</spacer>
<widget class="TQLayoutWidget" row="3" column="2">
<widget class="TQLayoutWidget" row="3" column="1">
<property name="name">
<cstring>layout3</cstring>
</property>
@ -508,7 +508,7 @@ Empty means default.</string>
</widget>
</grid>
</widget>
<spacer row="3" column="3" rowspan="1" colspan="2">
<spacer row="3" column="2">
<property name="name">
<cstring>spacer6_4</cstring>
</property>
@ -525,7 +525,7 @@ Empty means default.</string>
</size>
</property>
</spacer>
<widget class="TQLayoutWidget" row="5" column="2">
<widget class="TQLayoutWidget" row="5" column="1">
<property name="name">
<cstring>layout4</cstring>
</property>
@ -638,7 +638,7 @@ Empty means default.</string>
</size>
</property>
</spacer>
<spacer row="5" column="4">
<spacer row="5" column="2">
<property name="name">
<cstring>spacer6_6</cstring>
</property>
@ -655,33 +655,7 @@ Empty means default.</string>
</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="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>kcfg_BlurBackground</cstring>
</property>
<property name="text">
<string>Blur transparent background</string>
</property>
</widget>
</grid>
</widget>
<spacer row="7" column="0" rowspan="1" colspan="2">
<spacer row="7" column="0">
<property name="name">
<cstring>spacer6_7</cstring>
</property>
@ -698,7 +672,7 @@ Empty means default.</string>
</size>
</property>
</spacer>
<spacer row="7" column="3" rowspan="1" colspan="2">
<spacer row="7" column="2">
<property name="name">
<cstring>spacer6_7_2</cstring>
</property>
@ -715,8 +689,44 @@ Empty means default.</string>
</size>
</property>
</spacer>
<widget class="TQLayoutWidget" row="7" column="1">
<property name="name">
<cstring>layout6</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_Transparent</cstring>
</property>
<property name="text">
<string>Transparent background</string>
</property>
</widget>
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_BlurBackground</cstring>
</property>
<property name="text">
<string>Blur transparent background</string>
</property>
</widget>
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_UseKickerStyle</cstring>
</property>
<property name="text">
<string>Follow Kicker panel style</string>
</property>
</widget>
</vbox>
</widget>
</grid>
</widget>
<customwidgets>
</customwidgets>
<connections>
<connection>
<sender>kcfg_MenuButtonText</sender>
@ -748,6 +758,18 @@ Empty means default.</string>
<receiver>Appearance</receiver>
<slot>iconChanged(TQString)</slot>
</connection>
<connection>
<sender>kcfg_UseKickerStyle</sender>
<signal>toggled(bool)</signal>
<receiver>kcfg_BlurBackground</receiver>
<slot>setDisabled(bool)</slot>
</connection>
<connection>
<sender>kcfg_UseKickerStyle</sender>
<signal>toggled(bool)</signal>
<receiver>kcfg_Transparent</receiver>
<slot>setDisabled(bool)</slot>
</connection>
</connections>
<includes>
<include location="global" impldecl="in implementation">kicondialog.h</include>

@ -1150,6 +1150,7 @@ void MenuHandler::slotModKickerConf()
fillMoreUsed();
else if( currentMenuMode == RecentlyUsed )
fillRecentlyUsed();
setBackground();
}
@ -1703,10 +1704,17 @@ void MenuHandler::setBackground()
rootPix = nullptr;
}
if (prefSkel->transparent()) {
if (isTransparent()) {
rootPix = new KRootPixmap(this);
rootPix->setCustomPainting(true);
rootPix->setBlurEffect(0.0, prefSkel->blurBackground() ? 4.0 : 0.0);
rootPix->setBlurEffect(0.0, isBlurred() ? 4.0 : 0.0);
if (prefSkel->useKickerStyle()) {
kickerConf->setGroup("General");
double tint = double(kickerConf->readDoubleNumEntry("TintValue")) / 100;
rootPix->setFadeEffect(tint, kickerConf->readColorEntry("TintColor"));
}
connect(rootPix, TQT_SIGNAL(backgroundUpdated(const TQPixmap&)),
TQT_SLOT(updateBackground(const TQPixmap&)));
rootPix->start();
@ -1718,5 +1726,23 @@ void MenuHandler::updateBackground(const TQPixmap &pix)
menu->setPaletteBackgroundPixmap(pix);
}
bool MenuHandler::isTransparent()
{
if (prefSkel->useKickerStyle()) {
kickerConf->setGroup("General");
return kickerConf->readBoolEntry("Transparent", false);
}
return prefSkel->transparent();
}
bool MenuHandler::isBlurred()
{
if (prefSkel->useKickerStyle()) {
kickerConf->setGroup("General");
return kickerConf->readBoolEntry("MenubarPanelBlurred", false);
}
return prefSkel->blurBackground();
}
#include "menuhandler.moc"
//EOF

@ -69,6 +69,9 @@ public:
prefSkel->setNewInstalledApps( newInstalledList );
prefSkel->setNewInstalledAppsTimeStamps( newInstalledTimeStamps );}
bool isTransparent();
bool isBlurred();
signals:
void newApplications(int);
void kickerConfChanged();

@ -111,6 +111,11 @@
<label>Blur background</label>
<default>false</default>
</entry>
<entry name="UseKickerStyle" type="Bool">
<label>Follow Kicker panel style</label>
<default>false</default>
</entry>
</group>
<group name="Behaviour">

Loading…
Cancel
Save