aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/systemstart
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-10-07 17:07:13 -0400
committerKen Moore <moorekou@gmail.com>2015-10-07 17:07:13 -0400
commit9fd1372203ef8da796b370e063959c9bab344b1e (patch)
tree3a6c7a5f818487ea4cb1d6e6a8693ade33786ab3 /lumina-desktop/panel-plugins/systemstart
parentReverse the order of items in the startmenu logout page - now they start at t... (diff)
downloadlumina-9fd1372203ef8da796b370e063959c9bab344b1e.tar.gz
lumina-9fd1372203ef8da796b370e063959c9bab344b1e.tar.bz2
lumina-9fd1372203ef8da796b370e063959c9bab344b1e.zip
Another batch of small fixes:
1) Add a new ResizeMenu() class to the LuminaUtils library - this class allows the resulting menu to be resizable by the user clicking on an edge and dragging. 2) In the systemstart panel plugin, reverse the location of the shutdown options on the leave page (put them at the bottom next to where the leave button is in the first place) 3) Setup the systemstart plugin to use the new ResizeMenu. It currently does not save the new size to be used for later sessions, but per-session resizing works fine. 4) Quick adjustment to the systemtray icon sizes 5) Quick fix to the detection of a desktop file removal.
Diffstat (limited to 'lumina-desktop/panel-plugins/systemstart')
-rw-r--r--lumina-desktop/panel-plugins/systemstart/LStartButton.cpp8
-rw-r--r--lumina-desktop/panel-plugins/systemstart/LStartButton.h7
-rw-r--r--lumina-desktop/panel-plugins/systemstart/StartMenu.cpp1
-rw-r--r--lumina-desktop/panel-plugins/systemstart/StartMenu.h1
-rw-r--r--lumina-desktop/panel-plugins/systemstart/StartMenu.ui16
5 files changed, 19 insertions, 14 deletions
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>
bgstack15