aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core/lumina-desktop')
-rw-r--r--src-qt5/core/lumina-desktop/AppMenu.cpp2
-rw-r--r--src-qt5/core/lumina-desktop/LPanel.cpp29
-rw-r--r--src-qt5/core/lumina-desktop/LPanel.h2
-rw-r--r--src-qt5/core/lumina-desktop/audiofiles/LICENCE2
-rw-r--r--src-qt5/core/lumina-desktop/defaults/defaultapps.conf1
-rw-r--r--src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpgbin0 -> 4005674 bytes
-rw-r--r--src-qt5/core/lumina-desktop/defaults/desktop-background.pcbsd.jpgbin3237484 -> 0 bytes
-rw-r--r--src-qt5/core/lumina-desktop/defaults/desktopsettings.conf1
-rw-r--r--src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf (renamed from src-qt5/core/lumina-desktop/defaults/luminaDesktop.pcbsd.conf)9
-rw-r--r--src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf2
-rw-r--r--src-qt5/core/lumina-desktop/lumina-desktop.pro18
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/NewPP.h2
-rw-r--r--src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.cpp2
13 files changed, 39 insertions, 31 deletions
diff --git a/src-qt5/core/lumina-desktop/AppMenu.cpp b/src-qt5/core/lumina-desktop/AppMenu.cpp
index 0b8aeace..ad3a2695 100644
--- a/src-qt5/core/lumina-desktop/AppMenu.cpp
+++ b/src-qt5/core/lumina-desktop/AppMenu.cpp
@@ -9,7 +9,7 @@
#include <LuminaOS.h>
AppMenu::AppMenu(QWidget* parent) : QMenu(parent){
- appstorelink = LOS::AppStoreShortcut(); //Default application "store" to display (AppCafe in PC-BSD)
+ appstorelink = LOS::AppStoreShortcut(); //Default application "store" to display (AppCafe in TrueOS)
controlpanellink = LOS::ControlPanelShortcut(); //Default control panel
APPS.clear();
watcher = new QFileSystemWatcher(this);
diff --git a/src-qt5/core/lumina-desktop/LPanel.cpp b/src-qt5/core/lumina-desktop/LPanel.cpp
index 7c0630f5..55ec5469 100644
--- a/src-qt5/core/lumina-desktop/LPanel.cpp
+++ b/src-qt5/core/lumina-desktop/LPanel.cpp
@@ -13,6 +13,7 @@
LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
//Take care of inputs
this->setMouseTracking(true);
+ hascompositer = false; //LUtils::isValidBinary("xcompmgr"); //NOT WORKING YET - xcompmgr issue with special window flags?
if(DEBUG){ qDebug() << " - Creating Panel:" << scr << num; }
bgWindow = parent; //save for later
//Setup the widget overlay for the entire panel to provide transparency effects
@@ -42,7 +43,7 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
this->setWindowTitle("LuminaPanel");
this->setObjectName("LuminaPanelBackgroundWidget");
- this->setStyleSheet("QToolButton::menu-indicator{ image: none; }");
+ this->setStyleSheet("QToolButton::menu-indicator{ image: none; } QWidget#LuminaPanelBackgroundWidget{ background: transparent; }");
panelArea->setObjectName("LuminaPanelColor");
layout = new QBoxLayout(QBoxLayout::LeftToRight);
layout->setContentsMargins(0,0,0,0);
@@ -53,7 +54,11 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){
this->show();
LSession::handle()->XCB->SetAsPanel(this->winId());
LSession::handle()->XCB->SetAsSticky(this->winId());
-
+ if(hascompositer){
+ //qDebug() << "Enable Panel compositing";
+ this->setWindowOpacity(0.0); //fully transparent background for the main widget
+ panelArea->setWindowOpacity(0.0);
+ }
QTimer::singleShot(1,this, SLOT(UpdatePanel()) ); //start this in a new thread
//connect(screen, SIGNAL(resized(int)), this, SLOT(UpdatePanel()) ); //in case the screen resolution changes
}
@@ -309,15 +314,17 @@ void LPanel::checkPanelFocus(){
// PROTECTED
//===========
void LPanel::paintEvent(QPaintEvent *event){
- QPainter *painter = new QPainter(this);
- //qDebug() << "Paint Tray:";
- //Make sure the base background of the event rectangle is the associated rectangle from the BGWindow
- QRect rec = this->geometry(); //start with the global geometry of the panel
- //Need to translate that rectangle to the background image coordinates
- //qDebug() << " - Rec:" << rec << hidden << this->geometry();
- rec.moveTo( rec.x()-LSession::handle()->screenGeom(screennum).x(), rec.y() );
- //qDebug() << " - Adjusted Global Rec:" << rec;
- painter->drawPixmap(QRect(0,0,this->width(), this->height()), bgWindow->grab(rec) );
+ if(!hascompositer){
+ QPainter *painter = new QPainter(this);
+ //qDebug() << "Paint Tray:";
+ //Make sure the base background of the event rectangle is the associated rectangle from the BGWindow
+ QRect rec = this->geometry(); //start with the global geometry of the panel
+ //Need to translate that rectangle to the background image coordinates
+ //qDebug() << " - Rec:" << rec << hidden << this->geometry();
+ rec.moveTo( rec.x()-LSession::handle()->screenGeom(screennum).x(), rec.y() );
+ //qDebug() << " - Adjusted Global Rec:" << rec;
+ painter->drawPixmap(QRect(0,0,this->width(), this->height()), bgWindow->grab(rec) );
+ }
QWidget::paintEvent(event); //now pass the event along to the normal painting event
}
diff --git a/src-qt5/core/lumina-desktop/LPanel.h b/src-qt5/core/lumina-desktop/LPanel.h
index 396ffecc..b3c9ba60 100644
--- a/src-qt5/core/lumina-desktop/LPanel.h
+++ b/src-qt5/core/lumina-desktop/LPanel.h
@@ -36,7 +36,7 @@ private:
QDesktopWidget *screen;
QWidget *bgWindow, *panelArea;
QPoint hidepoint, showpoint; //for hidden panels: locations when hidden/visible
- bool defaultpanel, horizontal, hidden;
+ bool defaultpanel, horizontal, hidden, hascompositer;
int screennum;
int panelnum;
int viswidth;
diff --git a/src-qt5/core/lumina-desktop/audiofiles/LICENCE b/src-qt5/core/lumina-desktop/audiofiles/LICENCE
index 2929216f..898894f6 100644
--- a/src-qt5/core/lumina-desktop/audiofiles/LICENCE
+++ b/src-qt5/core/lumina-desktop/audiofiles/LICENCE
@@ -1 +1 @@
-These audio files are BSD-licensed and were created/owned by the PC-BSD Project
+These audio files are BSD-licensed and were created/owned by the TrueOS Project
diff --git a/src-qt5/core/lumina-desktop/defaults/defaultapps.conf b/src-qt5/core/lumina-desktop/defaults/defaultapps.conf
deleted file mode 100644
index 8b137891..00000000
--- a/src-qt5/core/lumina-desktop/defaults/defaultapps.conf
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg b/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg
new file mode 100644
index 00000000..de11074e
--- /dev/null
+++ b/src-qt5/core/lumina-desktop/defaults/desktop-background-TrueOS.jpg
Binary files differ
diff --git a/src-qt5/core/lumina-desktop/defaults/desktop-background.pcbsd.jpg b/src-qt5/core/lumina-desktop/defaults/desktop-background.pcbsd.jpg
deleted file mode 100644
index 80c3cf02..00000000
--- a/src-qt5/core/lumina-desktop/defaults/desktop-background.pcbsd.jpg
+++ /dev/null
Binary files differ
diff --git a/src-qt5/core/lumina-desktop/defaults/desktopsettings.conf b/src-qt5/core/lumina-desktop/defaults/desktopsettings.conf
deleted file mode 100644
index 8b137891..00000000
--- a/src-qt5/core/lumina-desktop/defaults/desktopsettings.conf
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.pcbsd.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf
index 3d434501..f3f4a7bc 100644
--- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.pcbsd.conf
+++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop-TrueOS.conf
@@ -64,17 +64,10 @@ desktop_generate_icons=true #[true/false] Auto-generate launchers for ~/Desktop
panel1_location=bottom #[top/bottom/left/right] Screen edge the panel should be on
panel1_pixelsize=3.5%H #number of pixels wide/high the panel should be (or <number>%[W/H] for a percentage of the screen width/height)
panel1_autohide=false #[true/false] Have the panel become visible on mouse-over
-panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock #list of plugins for the panel
+panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock, battery #list of plugins for the panel
panel1_pinlocation=center #[left/center/right] Note:[left/right] corresponds to [top/bottom] for vertical panels
panel1_edgepercent=99 #[1->100] percentage of the screen edge to use
-panel2_location=top
-panel2_pixelsize=3%H
-panel2_autohide=true
-panel2_plugins=spacer, desktopbar, spacer
-panel2_pinlocation=center
-panel2_edgepercent=10
-
#MENU SETTINGS (right-click menu)
menu_plugins=terminal, filemanager, applications, line, settings #list of menu plugins to show
diff --git a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
index 68ea1f3c..7f8e363c 100644
--- a/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
+++ b/src-qt5/core/lumina-desktop/defaults/luminaDesktop.conf
@@ -64,7 +64,7 @@ desktop_generate_icons=true #[true/false] Auto-generate launchers for ~/Desktop
panel1_location=bottom #[top/bottom/left/right] Screen edge the panel should be on
panel1_pixelsize=3.5%H #number of pixels wide/high the panel should be (or <number>%[W/H] for a percentage of the screen width/height)
panel1_autohide=false #[true/false] Have the panel become visible on mouse-over
-panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock #list of plugins for the panel
+panel1_plugins=systemstart, taskmanager-nogroups, spacer, systemtray, clock, battery #list of plugins for the panel
panel1_pinlocation=center #[left/center/right] Note:[left/right] corresponds to [top/bottom] for vertical panels
panel1_edgepercent=99 #[1->100] percentage of the screen edge to use
diff --git a/src-qt5/core/lumina-desktop/lumina-desktop.pro b/src-qt5/core/lumina-desktop/lumina-desktop.pro
index 5169476c..4cebf3de 100644
--- a/src-qt5/core/lumina-desktop/lumina-desktop.pro
+++ b/src-qt5/core/lumina-desktop/lumina-desktop.pro
@@ -87,12 +87,22 @@ defaults.path = $${L_SHAREDIR}/lumina-desktop/
conf.path = $${L_ETCDIR}
-#Now do any PC-BSD defaults (if set)
-PCBSD{
- conf.extra = cp defaults/luminaDesktop.pcbsd.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist
- defaults.extra = cp defaults/desktop-background.pcbsd.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg
+#Now do any OS-specific defaults (if available)
+#First see if there is a known OS override first
+!isEmpty(DEFAULT_SETTINGS){
+ message("Installing defaults settings for OS: $${DEFAULT_SETTINGS}")
+ OS=$${DEFAULT_SETTINGS}
+}
+exists("defaults/luminaDesktop-$${OS}.conf"){
+ message(" -- Found OS-specific system config file: $${OS}");
+ conf.extra = cp defaults/luminaDesktop-$${OS}.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist
}else{
conf.extra = cp defaults/luminaDesktop.conf $(INSTALL_ROOT)$${L_ETCDIR}/luminaDesktop.conf.dist
+}
+exists("defaults/desktop-background-$${OS}.jpg"){
+ message(" -- Found OS-specific background image: $${OS}");
+ defaults.extra = cp defaults/desktop-background-$${OS}.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg
+}else{
defaults.extra = cp defaults/desktop-background.jpg $(INSTALL_ROOT)$${L_SHAREDIR}/lumina-desktop/desktop-background.jpg
}
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/NewPP.h b/src-qt5/core/lumina-desktop/panel-plugins/NewPP.h
index 50bf2232..2641ad79 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/NewPP.h
+++ b/src-qt5/core/lumina-desktop/panel-plugins/NewPP.h
@@ -50,7 +50,7 @@ public:
plug = new LSysTray(parent, plugin, horizontal);
}else if(plugin.startsWith("desktopswitcher---")){
plug = new LDesktopSwitcher(parent, plugin, horizontal);
- }else if(plugin.startsWith("battery---")){
+ }else if(plugin.startsWith("battery---") && LOS::hasBattery()){
plug = new LBattery(parent, plugin, horizontal);
}else if(plugin.startsWith("clock---")){
plug = new LClock(parent, plugin, horizontal);
diff --git a/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.cpp b/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.cpp
index 57e84a1d..5d20e3ec 100644
--- a/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.cpp
+++ b/src-qt5/core/lumina-desktop/panel-plugins/appmenu/LAppMenuPlugin.cpp
@@ -36,7 +36,7 @@ LAppMenuPlugin::~LAppMenuPlugin(){
void LAppMenuPlugin::updateButtonVisuals(){
button->setToolTip( tr("Quickly launch applications or open files"));
button->setText( tr("Applications") );
- //Use the PC-BSD icon by default (or the Lumina icon for non-PC-BSD systems)
+ //Use the TrueOS icon by default (or the Lumina icon for non-TrueOS systems)
button->setIcon( LXDG::findIcon("start-here-lumina","Lumina-DE") );
}
bgstack15