diff options
8 files changed, 63 insertions, 20 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp index 8cdcffa8..870de07d 100644 --- a/lumina-desktop/LPanel.cpp +++ b/lumina-desktop/LPanel.cpp @@ -34,8 +34,8 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){ this->setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus); this->setWindowTitle(""); - this->setObjectName("LuminaPanelWidget"); - panelArea->setObjectName("LuminaPanelPluginWidget"); + this->setObjectName("LuminaPanelBackgroundWidget"); + panelArea->setObjectName("LuminaPanelColor"); layout = new QBoxLayout(QBoxLayout::LeftToRight); layout->setContentsMargins(0,0,0,0); layout->setSpacing(1); @@ -142,10 +142,14 @@ void LPanel::UpdatePanel(){ //if(!this->testAttribute(Qt::WA_AlwaysShowToolTips)){ this->setAttribute(Qt::WA_AlwaysShowToolTips); } //Now update the appearance of the toolbar - QString color = settings->value(PPREFIX+"color", "rgba(255,255,255,160)").toString(); - QString style = "QWidget#LuminaPanelPluginWidget{ background: %1; border-radius: 3px; border: 1px solid %1; }"; - style = style.arg(color); - panelArea->setStyleSheet(style); + if(settings->value(PPREFIX+"customcolor", false).toBool()){ + QString color = settings->value(PPREFIX+"color", "rgba(255,255,255,160)").toString(); + QString style = "QWidget#LuminaPanelColor{ background: %1; border-radius: 3px; border: 1px solid %1; }"; + style = style.arg(color); + panelArea->setStyleSheet(style); + }else{ + panelArea->setStyleSheet(""); //clear it and use the one from the theme + } //Then go through the plugins and create them as necessary QStringList plugins = settings->value(PPREFIX+"pluginlist", QStringList()).toStringList(); diff --git a/lumina-desktop/desktop-plugins/LDPlugin.h b/lumina-desktop/desktop-plugins/LDPlugin.h index d71bde0a..96a5042f 100644 --- a/lumina-desktop/desktop-plugins/LDPlugin.h +++ b/lumina-desktop/desktop-plugins/LDPlugin.h @@ -16,6 +16,7 @@ #define _LUMINA_DESKTOP_DESKTOP_PLUGIN_H #include <QObject> +#include <QFrame> #include <QWidget> #include <QString> #include <QDebug> @@ -23,7 +24,7 @@ #include <QMoveEvent> #include <QResizeEvent> -class LDPlugin : public QWidget{ +class LDPlugin : public QFrame{ Q_OBJECT private: @@ -32,9 +33,10 @@ private: public: QSettings *settings; - LDPlugin(QWidget *parent = 0, QString id="unknown") : QWidget(parent){ + LDPlugin(QWidget *parent = 0, QString id="unknown") : QFrame(parent){ PLUGID=id; settings = new QSettings("desktop-plugins",PLUGID); + this->setObjectName("LuminaDesktopPlugin"); } ~LDPlugin(){ diff --git a/lumina-desktop/desktop-plugins/LDPluginContainer.h b/lumina-desktop/desktop-plugins/LDPluginContainer.h index 109083da..2145f49b 100644 --- a/lumina-desktop/desktop-plugins/LDPluginContainer.h +++ b/lumina-desktop/desktop-plugins/LDPluginContainer.h @@ -18,6 +18,7 @@ #include <QCloseEvent> #include <QString> #include <QFile> +#include <QIcon> #include "LDPlugin.h" @@ -47,9 +48,10 @@ public: } this->setContentsMargins(0,0,0,0); if(!locked){ - //this->setWindowTitle( plugin->ID().replace("---"," - ") ); - //this->setWidget( new QWidget() ); + this->setWindowTitle( plugin->ID().replace("---"," - ") ); + this->setWidget( new QWidget() ); this->setWidget( plugin ); + this->setWindowIcon(QIcon()); //remove the Qt icon }else{ this->setStyleSheet("LDPluginContainer{ background: transparent; border: none;}"); this->setWidget(plugin); diff --git a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp index 1d39441e..ffd5df93 100644 --- a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp +++ b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp @@ -213,7 +213,7 @@ AudioPlayerPlugin::AudioPlayerPlugin(QWidget *parent, QString ID) : LDPlugin(par this->layout()->setContentsMargins(0,0,0,0); this->layout()->addWidget(player); - this->setInitialSize(300,100); + this->setInitialSize(300,75); } AudioPlayerPlugin::~AudioPlayerPlugin(){ diff --git a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.ui b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.ui index aa8cbd8b..a27e0643 100644 --- a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.ui +++ b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.ui @@ -6,13 +6,16 @@ <rect> <x>0</x> <y>0</y> - <width>262</width> - <height>111</height> + <width>307</width> + <height>87</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> + <property name="styleSheet"> + <string notr="true">QToolButton::menu-indicator{ image: none; }</string> + </property> <layout class="QVBoxLayout" name="verticalLayout"> <property name="spacing"> <number>0</number> @@ -31,10 +34,6 @@ </property> <item> <widget class="QFrame" name="frame"> - <property name="styleSheet"> - <string notr="true">QFrame{ background: rgba(255,255,255,200); border-radius: 3px; } -QToolButton::menu-indicator{ image: none; }</string> - </property> <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> @@ -42,6 +41,21 @@ QToolButton::menu-indicator{ image: none; }</string> <enum>QFrame::Raised</enum> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="spacing"> + <number>3</number> + </property> + <property name="leftMargin"> + <number>4</number> + </property> + <property name="topMargin"> + <number>4</number> + </property> + <property name="rightMargin"> + <number>4</number> + </property> + <property name="bottomMargin"> + <number>4</number> + </property> <item> <layout class="QHBoxLayout" name="horizontalLayout_2"> <item> @@ -52,6 +66,9 @@ QToolButton::menu-indicator{ image: none; }</string> <property name="popupMode"> <enum>QToolButton::InstantPopup</enum> </property> + <property name="autoRaise"> + <bool>true</bool> + </property> </widget> </item> <item> @@ -62,6 +79,9 @@ QToolButton::menu-indicator{ image: none; }</string> <property name="popupMode"> <enum>QToolButton::InstantPopup</enum> </property> + <property name="autoRaise"> + <bool>true</bool> + </property> </widget> </item> <item> @@ -82,6 +102,9 @@ QToolButton::menu-indicator{ image: none; }</string> <property name="text"> <string notr="true">prev</string> </property> + <property name="autoRaise"> + <bool>true</bool> + </property> </widget> </item> <item> @@ -96,6 +119,9 @@ QToolButton::menu-indicator{ image: none; }</string> <property name="text"> <string notr="true">next</string> </property> + <property name="autoRaise"> + <bool>true</bool> + </property> </widget> </item> </layout> @@ -110,6 +136,9 @@ QToolButton::menu-indicator{ image: none; }</string> <property name="text"> <string notr="true">Play</string> </property> + <property name="autoRaise"> + <bool>true</bool> + </property> </widget> </item> <item> @@ -117,6 +146,9 @@ QToolButton::menu-indicator{ image: none; }</string> <property name="text"> <string notr="true">Pause</string> </property> + <property name="autoRaise"> + <bool>true</bool> + </property> </widget> </item> <item> @@ -124,6 +156,9 @@ QToolButton::menu-indicator{ image: none; }</string> <property name="text"> <string notr="true">Stop</string> </property> + <property name="autoRaise"> + <bool>true</bool> + </property> </widget> </item> <item> diff --git a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp index 5575dbd9..ddf504b4 100644 --- a/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp +++ b/lumina-desktop/desktop-plugins/desktopview/DesktopViewPlugin.cpp @@ -18,7 +18,7 @@ DesktopViewPlugin::DesktopViewPlugin(QWidget* parent, QString ID) : LDPlugin(par list->setSpacing(2); list->setSelectionBehavior(QAbstractItemView::SelectItems); list->setSelectionMode(QAbstractItemView::NoSelection); - list->setStyleSheet( "QListWidget{ background: rgba(255,255,255,50); border: none; border-radius: 3px; color: black;}" ); + list->setStyleSheet( "QListWidget{ background: transparent; border: none; }" ); list->setIconSize(QSize(64,64)); this->layout()->addWidget(list); this->setInitialSize(200,300); diff --git a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp index d3e1e10d..214de63c 100644 --- a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp +++ b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp @@ -11,7 +11,7 @@ NotePadPlugin::NotePadPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID) vlay->setContentsMargins(3,3,3,3); frame = new QFrame(this); frame->setObjectName("notepadbase"); - frame->setStyleSheet("QFrame#notepadbase{border-width: 1px; background: rgba(255,255,255,50); color: black;} QFrame{ border: none; border-radius: 3px; background: rgba(255,255,255,100); color: black;}"); + //frame->setStyleSheet("QFrame#notepadbase{border-width: 1px; background: rgba(255,255,255,50); color: black;} QFrame{ border: none; border-radius: 3px; background: rgba(255,255,255,100); color: black;}"); this->layout()->addWidget(frame); frame->setLayout(vlay); diff --git a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp index 1eafffee..2472d064 100644 --- a/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp +++ b/lumina-desktop/panel-plugins/systemtray/LSysTray.cpp @@ -22,7 +22,7 @@ LSysTray::LSysTray(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ frame = new QFrame(this); frame->setContentsMargins(0,0,0,0); - //frame->setStyleSheet("QFrame{ background: transparent; border: 1px solid transparent; border-radius: 5px; }"); + frame->setStyleSheet("QFrame{ background: transparent; border: 1px solid transparent; border-radius: 3px; }"); LI = new QBoxLayout( this->layout()->direction()); frame->setLayout(LI); LI->setAlignment(Qt::AlignCenter); |