aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-02-03 11:15:34 -0500
committerKen Moore <ken@pcbsd.org>2015-02-03 11:15:34 -0500
commitb47eb6236261a1252c4dd2d70c2a6472735c17c0 (patch)
tree5b83b16fa992c626a8854160988bd193a7318c95
parentAdd an "apply" button to the lumina-config theme editor. Now the "save" butto... (diff)
downloadlumina-b47eb6236261a1252c4dd2d70c2a6472735c17c0.tar.gz
lumina-b47eb6236261a1252c4dd2d70c2a6472735c17c0.tar.bz2
lumina-b47eb6236261a1252c4dd2d70c2a6472735c17c0.zip
Add the ability to distinguish between desktop plugins that should be transparent/opaque on a plugin-level. This allows for finer control via the theme.
-rw-r--r--lumina-desktop/desktop-plugins/LDPlugin.h5
-rw-r--r--lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp2
-rw-r--r--lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.ui289
-rw-r--r--lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp2
4 files changed, 136 insertions, 162 deletions
diff --git a/lumina-desktop/desktop-plugins/LDPlugin.h b/lumina-desktop/desktop-plugins/LDPlugin.h
index 96a5042f..0e1f6847 100644
--- a/lumina-desktop/desktop-plugins/LDPlugin.h
+++ b/lumina-desktop/desktop-plugins/LDPlugin.h
@@ -33,10 +33,11 @@ private:
public:
QSettings *settings;
- LDPlugin(QWidget *parent = 0, QString id="unknown") : QFrame(parent){
+ LDPlugin(QWidget *parent = 0, QString id="unknown", bool opaque = false) : QFrame(parent){
PLUGID=id;
settings = new QSettings("desktop-plugins",PLUGID);
- this->setObjectName("LuminaDesktopPlugin");
+ if(opaque){ this->setObjectName("LuminaDesktopPluginVisible"); }
+ else{ this->setObjectName("LuminaDesktopPlugin"); }
}
~LDPlugin(){
diff --git a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp
index cc1136f1..b2ed3d03 100644
--- a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp
+++ b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.cpp
@@ -256,7 +256,7 @@ void PlayerWidget::updateMaxProgress(qint64 val){
}
-AudioPlayerPlugin::AudioPlayerPlugin(QWidget *parent, QString ID) : LDPlugin(parent, ID){
+AudioPlayerPlugin::AudioPlayerPlugin(QWidget *parent, QString ID) : LDPlugin(parent, ID, true){
player = new PlayerWidget(this);
this->setLayout( new QVBoxLayout() );
this->layout()->setContentsMargins(0,0,0,0);
diff --git a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.ui b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.ui
index a27e0643..b1e7ee59 100644
--- a/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.ui
+++ b/lumina-desktop/desktop-plugins/audioplayer/PlayerWidget.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>307</width>
- <height>87</height>
+ <width>346</width>
+ <height>81</height>
</rect>
</property>
<property name="windowTitle">
@@ -18,7 +18,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
- <number>0</number>
+ <number>4</number>
</property>
<property name="leftMargin">
<number>0</number>
@@ -33,161 +33,134 @@
<number>0</number>
</property>
<item>
- <widget class="QFrame" name="frame">
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <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>
- <widget class="QToolButton" name="tool_config">
- <property name="text">
- <string notr="true">Config</string>
- </property>
- <property name="popupMode">
- <enum>QToolButton::InstantPopup</enum>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="tool_add">
- <property name="text">
- <string notr="true">Add</string>
- </property>
- <property name="popupMode">
- <enum>QToolButton::InstantPopup</enum>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QToolButton" name="tool_prev">
- <property name="text">
- <string notr="true">prev</string>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_num">
- <property name="text">
- <string notr="true">1/10</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="tool_next">
- <property name="text">
- <string notr="true">next</string>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QComboBox" name="combo_playlist"/>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QToolButton" name="tool_play">
- <property name="text">
- <string notr="true">Play</string>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="tool_pause">
- <property name="text">
- <string notr="true">Pause</string>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="tool_stop">
- <property name="text">
- <string notr="true">Stop</string>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QProgressBar" name="progressBar">
- <property name="value">
- <number>24</number>
- </property>
- <property name="textVisible">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QToolButton" name="tool_config">
+ <property name="text">
+ <string notr="true">Config</string>
+ </property>
+ <property name="popupMode">
+ <enum>QToolButton::InstantPopup</enum>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_add">
+ <property name="text">
+ <string notr="true">Add</string>
+ </property>
+ <property name="popupMode">
+ <enum>QToolButton::InstantPopup</enum>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_prev">
+ <property name="text">
+ <string notr="true">prev</string>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_num">
+ <property name="text">
+ <string notr="true">1/10</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_next">
+ <property name="text">
+ <string notr="true">next</string>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QComboBox" name="combo_playlist"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QToolButton" name="tool_play">
+ <property name="text">
+ <string notr="true">Play</string>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_pause">
+ <property name="text">
+ <string notr="true">Pause</string>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_stop">
+ <property name="text">
+ <string notr="true">Stop</string>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QProgressBar" name="progressBar">
+ <property name="value">
+ <number>24</number>
+ </property>
+ <property name="textVisible">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
<spacer name="verticalSpacer">
diff --git a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
index af1c78f5..6d4a2b5d 100644
--- a/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
+++ b/lumina-desktop/desktop-plugins/notepad/NotepadPlugin.cpp
@@ -7,7 +7,7 @@
#include <QFileDialog>
#include <QInputDialog>
-NotePadPlugin::NotePadPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID){
+NotePadPlugin::NotePadPlugin(QWidget* parent, QString ID) : LDPlugin(parent, ID, true){
QVBoxLayout *vlay = new QVBoxLayout();
this->setLayout( new QVBoxLayout() );
this->layout()->setContentsMargins(0,0,0,0);
bgstack15