diff options
Diffstat (limited to 'lumina-desktop/panel-plugins')
8 files changed, 29 insertions, 23 deletions
diff --git a/lumina-desktop/panel-plugins/clock/LClock.cpp b/lumina-desktop/panel-plugins/clock/LClock.cpp index b9f15c49..7af36e5a 100644 --- a/lumina-desktop/panel-plugins/clock/LClock.cpp +++ b/lumina-desktop/panel-plugins/clock/LClock.cpp @@ -125,7 +125,8 @@ void LClock::updateFormats(){ void LClock::updateMenu(){ QDateTime cdt = QDateTime::currentDateTime(); TZMenu->setTitle(QString(tr("Time Zone (%1)")).arg(cdt.timeZoneAbbreviation()) ); - calendar->showToday(); + calendar->showToday(); //make sure the current month is visible + calendar->setSelectedDate(QDate::currentDate()); //select the actual date for today } void LClock::openMenu(){ diff --git a/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp b/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp index 146fec3d..3e644803 100644 --- a/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp +++ b/lumina-desktop/panel-plugins/systemstart/LStartButton.cpp @@ -8,6 +8,7 @@ #include "../../LSession.h" #include <LuminaXDG.h> +#include <LuminaUtils.h> LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ button = new QToolButton(this); @@ -17,15 +18,16 @@ LStartButtonPlugin::LStartButtonPlugin(QWidget *parent, QString id, bool horizon connect(button, SIGNAL(clicked()), this, SLOT(openMenu())); this->layout()->setContentsMargins(0,0,0,0); this->layout()->addWidget(button); - menu = new QMenu(this); + menu = new ResizeMenu(this); menu->setContentsMargins(1,1,1,1); connect(menu, SIGNAL(aboutToHide()), this, SIGNAL(MenuClosed())); startmenu = new StartMenu(this); connect(startmenu, SIGNAL(CloseMenu()), this, SLOT(closeMenu()) ); connect(startmenu, SIGNAL(UpdateQuickLaunch(QStringList)), this, SLOT(updateQuickLaunch(QStringList))); - mact = new QWidgetAction(this); + menu->setContents(startmenu); + /*mact = new QWidgetAction(this); mact->setDefaultWidget(startmenu); - menu->addAction(mact); + menu->addAction(mact);*/ button->setMenu(menu); connect(menu, SIGNAL(aboutToHide()), this, SLOT(updateButtonVisuals()) ); diff --git a/lumina-desktop/panel-plugins/systemstart/LStartButton.h b/lumina-desktop/panel-plugins/systemstart/LStartButton.h index 33c48bbf..ac9ad59b 100644 --- a/lumina-desktop/panel-plugins/systemstart/LStartButton.h +++ b/lumina-desktop/panel-plugins/systemstart/LStartButton.h @@ -23,7 +23,8 @@ #include "../LPPlugin.h" //main plugin widget // libLumina includes -#include "LuminaXDG.h" +#include <LuminaXDG.h> +#include <LuminaUtils.h> #include "StartMenu.h" @@ -64,8 +65,8 @@ public: ~LStartButtonPlugin(); private: - QMenu *menu; - QWidgetAction *mact; + ResizeMenu *menu; + //QWidgetAction *mact; StartMenu *startmenu; QToolButton *button; QList<LQuickLaunchButton*> QUICKL; diff --git a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp index 4c64f554..009e2351 100644 --- a/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp +++ b/lumina-desktop/panel-plugins/systemstart/StartMenu.cpp @@ -15,6 +15,7 @@ StartMenu::StartMenu(QWidget *parent) : QWidget(parent), ui(new Ui::StartMenu){ ui->setupUi(this); //load the designer file + this->setMouseTracking(true); sysapps = LSession::handle()->applicationMenu()->currentAppHash(); connect(LSession::handle()->applicationMenu(), SIGNAL(AppMenuUpdated()), this, SLOT(UpdateApps()) ); UpdateAll(); diff --git a/lumina-desktop/panel-plugins/systemstart/StartMenu.h b/lumina-desktop/panel-plugins/systemstart/StartMenu.h index bf673a86..8e2b2a3c 100644 --- a/lumina-desktop/panel-plugins/systemstart/StartMenu.h +++ b/lumina-desktop/panel-plugins/systemstart/StartMenu.h @@ -9,6 +9,7 @@ #include <QWidget> #include <QScrollArea> +#include <QMouseEvent> #include <LuminaXDG.h> diff --git a/lumina-desktop/panel-plugins/systemstart/StartMenu.ui b/lumina-desktop/panel-plugins/systemstart/StartMenu.ui index 716a5e97..332baa1e 100644 --- a/lumina-desktop/panel-plugins/systemstart/StartMenu.ui +++ b/lumina-desktop/panel-plugins/systemstart/StartMenu.ui @@ -21,16 +21,16 @@ <number>2</number> </property> <property name="leftMargin"> - <number>0</number> + <number>1</number> </property> <property name="topMargin"> - <number>0</number> + <number>1</number> </property> <property name="rightMargin"> - <number>0</number> + <number>1</number> </property> <property name="bottomMargin"> - <number>0</number> + <number>1</number> </property> <item> <widget class="QLineEdit" name="line_search"> @@ -142,8 +142,8 @@ <rect> <x>0</x> <y>0</y> - <width>180</width> - <height>195</height> + <width>178</width> + <height>193</height> </rect> </property> </widget> @@ -394,8 +394,8 @@ <rect> <x>0</x> <y>0</y> - <width>87</width> - <height>16</height> + <width>98</width> + <height>28</height> </rect> </property> </widget> diff --git a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp index 2befba0d..3be31f43 100644 --- a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp +++ b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp @@ -115,10 +115,10 @@ void LSysTray::checkAll(){ LI->addWidget(cont); //qDebug() << " - Update tray layout"; if(this->layout()->direction()==QBoxLayout::LeftToRight){ - cont->setSizeSquare(this->height()-2*frame->frameWidth()); //horizontal tray + cont->setSizeSquare(this->height()-2-2*frame->frameWidth()); //horizontal tray this->setMaximumSize( trayIcons.length()*this->height(), 10000); }else{ - cont->setSizeSquare(this->width()-2*frame->frameWidth()); //vertical tray + cont->setSizeSquare(this->width()-2-2*frame->frameWidth()); //vertical tray this->setMaximumSize(10000, trayIcons.length()*this->width()); } LSession::processEvents(); @@ -126,7 +126,7 @@ void LSysTray::checkAll(){ cont->attachApp(wins[i]); if(cont->appID()==0){ //could not attach window - remove the widget - qDebug() << "Invalid Tray Container:"; + //qDebug() << "Invalid Tray Container:"; trayIcons.takeAt(trayIcons.length()-1); //Always at the end LI->removeWidget(cont); delete cont; diff --git a/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp b/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp index 78d90524..1b843e3e 100644 --- a/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp +++ b/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp @@ -36,10 +36,10 @@ void TrayIcon::attachApp(WId id){ dmgID = LSession::handle()->XCB->EmbedWindow(AID, IID); if( dmgID != 0 ){ LSession::handle()->XCB->RestoreWindow(AID); //make it visible - qDebug() << "New System Tray App:" << AID; + //qDebug() << "New System Tray App:" << AID; QTimer::singleShot(1000, this, SLOT(updateIcon()) ); }else{ - qWarning() << "Could not Embed Tray Application:" << AID; + //qWarning() << "Could not Embed Tray Application:" << AID; IID = 0; AID = 0; } @@ -55,15 +55,15 @@ void TrayIcon::setSizeSquare(int side){ // ============== void TrayIcon::detachApp(){ if(AID==0){ return; } //already detached - qDebug() << "Detach App:" << AID; + //qDebug() << "Detach App:" << AID; //Temporarily move the AID, so that internal slots do not auto-run WId tmp = AID; AID = 0; //Now detach the application window and clean up - qDebug() << " - Unembed"; + //qDebug() << " - Unembed"; //WIN->setParent(0); //Reset parentage back to the main stack LSession::handle()->XCB->UnembedWindow(tmp); - qDebug() << " - finished app:" << tmp; + //qDebug() << " - finished app:" << tmp; IID = 0; } |