--- kicker/applets/menu/menuapplet.cpp 2005-05-23 14:14:14.000000000 +0200 +++ kicker/applets/menu/menuapplet.cpp 2005-07-20 19:07:21.000000000 +0200 @@ -354,7 +354,7 @@ { if (active_menu) return active_menu->width(); - return 0; // we're stretch applet + return 50; // we're stretch applet } int Applet::heightForWidth( int ) const --- kicker/kicker/buttons/kbutton.cpp 2005-05-23 14:14:12.000000000 +0200 +++ kicker/kicker/buttons/kbutton.cpp 2005-07-20 19:07:22.000000000 +0200 @@ -36,6 +36,22 @@ #include "kbutton.h" #include "kbutton.moc" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include KButton::KButton( QWidget* parent ) : PanelPopupButton( parent, "KButton" ) @@ -45,9 +61,28 @@ setPopup(MenuManager::the()->kmenu()); MenuManager::the()->registerKButton(this); - setIcon("kmenu"); - if (KickerSettings::showKMenuText()) + KIconLoader * skin_loader = KGlobal::iconLoader (); + skin = skin_loader->iconPath ("klauncher", KIcon::Small, true); + normal = QImage (skin); + + if(normal.isNull()) + { + + setIcon("kmenu"); + + } else { + + int applet_width = normal.width (); + int applet_height = normal.height (); + setIcon("klauncher"); + mainView = new QLabel (this); + mainView->setFixedSize (applet_width, applet_height); + mainView->setPixmap (normal); + + } + + if (KickerSettings::showKMenuText()) { setButtonText(KickerSettings::kMenuText()); setFont(KickerSettings::buttonFont()); --- kicker/kicker/buttons/kbutton.h 2005-09-10 04:25:31.000000000 -0400 +++ kicker/kicker/buttons/kbutton.h.new 2008-02-14 22:31:12.000000000 -0500 @@ -25,6 +25,13 @@ #define __kbutton_h__ #include "panelbutton.h" +#include +#include +#include +#include + +class QLabel; + /** * Button that contains the PanelKMenu and client menu manager. @@ -41,10 +48,19 @@ virtual void properties(); + QPixmap normal; + QString skin; + QLabel *mainView; + + protected: virtual QString tileName() { return "KMenu"; } virtual void initPopup(); virtual QString defaultIcon() const { return "go"; } + +private: + + }; #endif --- kicker/kicker/core/container_button.cpp 2007-01-15 06:31:29.000000000 -0500 +++ kicker/kicker/core/container_button.cpp.new 2008-02-14 22:39:39.000000000 -0500 @@ -32,9 +32,14 @@ #include #include #include - +#include +#include +#include #include "global.h" #include "appletop_mnu.h" +#include +#include +#include #include "containerarea.h" #include "panelbutton.h" @@ -366,24 +371,64 @@ KMenuButtonContainer::KMenuButtonContainer(const KConfigGroup& config, QPopupMenu *opMenu, QWidget* parent) : ButtonContainer(opMenu, parent) { - checkImmutability(config); - embedButton( new KButton(this) ); - _actions = PanelAppletOpMenu::KMenuEditor; + + KIconLoader * skin_loader = KGlobal::iconLoader (); + skin = skin_loader->iconPath ("klauncher", KIcon::Small, true); + normal = QImage (skin); + + if(normal.isNull()) + { + checkImmutability(config); + embedButton( new KButton(this) ); + _actions = PanelAppletOpMenu::KMenuEditor; + + } else { + + applet_width = normal.width (); + applet_height = normal.height (); + + checkImmutability(config); + embedButton( new KButton(this) ); + _actions = PanelAppletOpMenu::KMenuEditor; + + } + } KMenuButtonContainer::KMenuButtonContainer(QPopupMenu *opMenu, QWidget* parent) : ButtonContainer(opMenu, parent) + { embedButton( new KButton(this) ); _actions = PanelAppletOpMenu::KMenuEditor; + } + + int KMenuButtonContainer::heightForWidth( int width ) const { - if ( width < 32 ) - return width + 10; - else - return ButtonContainer::heightForWidth(width); + + if(normal.isNull()) + { + + if ( height < 32 ) + return height + 10; + else + return height; + + + } else + { + + if ( height < 32 ) + return applet_width + 1; + else + return applet_width; + + } + + } // DesktopButton container --- kicker/kicker/core/container_button.h 2005-09-10 04:25:30.000000000 -0400 +++ kicker/kicker/core/container_button.h.new 2008-02-14 22:44:18.000000000 -0500 @@ -27,6 +27,8 @@ #include #include #include +#include "global.h" +#include #include "container_base.h" @@ -90,6 +92,17 @@ virtual int heightForWidth( int width ) const; bool isAMenu() const { return true; } + + QPixmap normal; + QString skin; + QLabel *mainView; + int applet_width; + int applet_height; + +private: + + + }; class DesktopButtonContainer : public ButtonContainer