diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp index f44add77..d8014f4c 100644 --- a/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp +++ b/src-qt5/core/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp @@ -25,10 +25,13 @@ LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizon startmenu = new StartMenu(this); connect(startmenu, SIGNAL(CloseMenu()), this, SLOT(closeMenu()) ); connect(startmenu, SIGNAL(UpdateQuickLaunch(QStringList)), this, SLOT(updateQuickLaunch(QStringList))); + + QRect screenSize = QApplication::desktop()->availableGeometry(this); + QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize",QSize(this->fontMetrics().width("x")*30 ,screenSize.height()/1.8)).toSize(); + //qDebug() << "Got Start Menu Saved Size:" << saved; + if(!saved.isNull() && saved.isValid()){ startmenu->setFixedSize(saved); } //re-load the previously saved value menu->setContents(startmenu); - QSize saved = LSession::handle()->DesktopPluginSettings()->value("panelPlugs/"+this->type()+"/MenuSize", QSize(0,0)).toSize(); - if(!saved.isNull()){ startmenu->setFixedSize(saved); } //re-load the previously saved value - + button->setMenu(menu); connect(menu, SIGNAL(aboutToHide()), this, SLOT(updateButtonVisuals()) ); QTimer::singleShot(0,this, SLOT(OrientationChange())); //Update icons/sizes @@ -121,6 +124,7 @@ void LStartButtonPlugin::openMenu(){ menu->setContents(startmenu); if(old!=0){ old->deleteLater(); }*/ //-------- + //qDebug() << "Menu Size:" << startmenu->size(); startmenu->UpdateMenu(); button->showMenu(); } |