diff options
Diffstat (limited to 'lumina-desktop')
-rw-r--r-- | lumina-desktop/LDesktop.cpp | 1 | ||||
-rw-r--r-- | lumina-desktop/LSession.cpp | 26 | ||||
-rw-r--r-- | lumina-desktop/LSession.h | 5 | ||||
-rw-r--r-- | lumina-desktop/main.cpp | 2 | ||||
-rw-r--r-- | lumina-desktop/panel-plugins/userbutton/UserWidget.cpp | 8 |
5 files changed, 14 insertions, 28 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp index b230d375..81d57cb8 100644 --- a/lumina-desktop/LDesktop.cpp +++ b/lumina-desktop/LDesktop.cpp @@ -48,6 +48,7 @@ LDesktop::LDesktop(int deskNum) : QObject(){ bgDesktop = new QMdiArea(bgWindow); //Make sure the desktop area is transparent to show the background bgDesktop->setBackground( QBrush(Qt::NoBrush) ); + bgDesktop->setStyleSheet( "QMdiArea{ border: none; background: transparent;}" ); //Start the update processes QTimer::singleShot(1,this, SLOT(UpdateMenu()) ); diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index 95272954..876db93a 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -29,14 +29,14 @@ static QSettings *sessionsettings; LSession::LSession(int &argc, char ** argv) : QApplication(argc, argv){ this->setApplicationName("Lumina Desktop Environment"); - this->setApplicationVersion("0.6.3"); + this->setApplicationVersion("0.7.0"); this->setOrganizationName("LuminaDesktopEnvironment"); this->setQuitOnLastWindowClosed(false); //since the LDesktop's are not necessarily "window"s //Enabled a few of the simple effects by default this->setEffectEnabled( Qt::UI_AnimateMenu, true); this->setEffectEnabled( Qt::UI_AnimateCombo, true); this->setEffectEnabled( Qt::UI_AnimateTooltip, true); - this->setStyle( new MenuProxyStyle); //QMenu icon size override + //this->setStyle( new MenuProxyStyle); //QMenu icon size override //LuminaSessionTrayID = 0; } @@ -55,8 +55,6 @@ LSession::~LSession(){ void LSession::setupSession(){ qDebug() << "Initializing Session"; - //Load the stylesheet - loadStyleSheet(); //Setup the QSettings default paths QSettings::setPath(QSettings::NativeFormat, QSettings::UserScope, QDir::homePath()+"/.lumina"); sessionsettings = new QSettings("LuminaDE", "sessionsettings"); @@ -159,8 +157,7 @@ void LSession::launchStartupApps(){ void LSession::watcherChange(QString changed){ qDebug() << "Session Watcher Change:" << changed; - if(changed.endsWith("stylesheet.qss")){ loadStyleSheet(); } - else if(changed.endsWith("fluxbox-init") || changed.endsWith("fluxbox-keys")){ refreshWindowManager(); } + if(changed.endsWith("fluxbox-init") || changed.endsWith("fluxbox-keys")){ refreshWindowManager(); } else{ emit DesktopConfigChanged(); } } @@ -199,6 +196,7 @@ void LSession::checkUserFiles(){ else if(!QFile::exists(dset+"fluxbox-keys")){fluxcopy=true; } else if(oldversion < 60){ fluxcopy=true; qDebug() << "Current fluxbox settings obsolete: Re-implementing defaults"; } if(fluxcopy){ + qDebug() << "Copying default fluxbox configuration files"; if(QFile::exists(dset+"fluxbox-init")){ QFile::remove(dset+"fluxbox-init"); } if(QFile::exists(dset+"fluxbox-keys")){ QFile::remove(dset+"fluxbox-keys"); } QFile::copy(":/fluxboxconf/fluxbox-init-rc", dset+"fluxbox-init"); @@ -217,22 +215,6 @@ void LSession::checkUserFiles(){ sessionsettings->setValue("DesktopVersion", this->applicationVersion()); } -void LSession::loadStyleSheet(){ - QString ss = QDir::homePath()+"/.lumina/stylesheet.qss"; - if(!QFile::exists(ss)){ ss = LOS::LuminaShare()+"stylesheet.qss"; } - if(!QFile::exists(ss)){ return; } //no default stylesheet on the system - //Now read/apply the custom stylesheet - QFile file(ss); - if( file.open(QIODevice::ReadOnly | QIODevice::Text) ){ - QTextStream in(&file); - QString sheet = in.readAll(); - file.close(); - //Now fix/apply the sheet - sheet.replace("\n"," "); //make sure there are no newlines - this->setStyleSheet(sheet); - } -} - void LSession::refreshWindowManager(){ WM->updateWM(); } diff --git a/lumina-desktop/LSession.h b/lumina-desktop/LSession.h index 3f3d31f9..cdf0cbd8 100644 --- a/lumina-desktop/LSession.h +++ b/lumina-desktop/LSession.h @@ -34,13 +34,13 @@ //#define SYSTEM_TRAY_BEGIN_MESSAGE 1 //#define SYSTEM_TRAY_CANCEL_MESSAGE 2 -class MenuProxyStyle : public QProxyStyle{ +/*class MenuProxyStyle : public QProxyStyle{ public: int pixelMetric(PixelMetric metric, const QStyleOption *option=0, const QWidget *widget=0) const{ if(metric==PM_SmallIconSize){ return 22; } //override QMenu icon size (make it larger) else{ return QProxyStyle::pixelMetric(metric, option, widget); } //use the current style for everything else } -}; +};*/ class LSession : public QApplication{ Q_OBJECT @@ -79,7 +79,6 @@ private slots: //Internal simplification functions void checkUserFiles(); - void loadStyleSheet(); void refreshWindowManager(); void updateDesktops(); diff --git a/lumina-desktop/main.cpp b/lumina-desktop/main.cpp index 690ae80d..fa23680b 100644 --- a/lumina-desktop/main.cpp +++ b/lumina-desktop/main.cpp @@ -20,6 +20,7 @@ #include "Globals.h" #include <LuminaXDG.h> //from libLuminaUtils +#include <LuminaThemes.h> QFile logfile(QDir::homePath()+"/.lumina/logs/runtime.log"); void MessageOutput(QtMsgType type, const char *msg){ @@ -62,6 +63,7 @@ int main(int argc, char ** argv) logfile.open(QIODevice::WriteOnly | QIODevice::Append); //Startup the Application LSession a(argc, argv); + LuminaThemeEngine theme(&a); //Setup Log File qInstallMsgHandler(MessageOutput); a.setupSession(); diff --git a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp index e581e1c2..ef5f271c 100644 --- a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp +++ b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp @@ -278,9 +278,11 @@ void UserWidget::slotOpenDir(){ void UserWidget::mouseMoveEvent( QMouseEvent *event){ QTabBar *wid = tabBar(); - qDebug() << "Mouse Move Event:"; - if(wid && wid->tabAt(event->pos()) != -1){ + if(wid==0){ return; } //invalid widget found + QPoint relpos = wid->mapFromGlobal( this->mapToGlobal(event->pos()) ); + //qDebug() << "Mouse Move Event: " << event->pos().x() << event->pos().y() << relpos.x() << relpos.y() << wid->width() << wid->height(); + if(wid && wid->tabAt(relpos) != -1){ qDebug() << " - Mouse over tab"; - this->setCurrentIndex( wid->tabAt(event->pos()) ); + this->setCurrentIndex( wid->tabAt(relpos) ); } }
\ No newline at end of file |