From 49d7b64794cb5c645f0093d18a207ea1c9fe2121 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 14 Sep 2017 12:22:31 -0400 Subject: Turn off the custom theme engine for the 1.x desktop itself, and use the lthemeengine styles for everything now. Also commit a few simple fixes for the lthemeengine styles page and a couple other random tweaks. --- src-qt5/core/libLumina/RootSubWindow.cpp | 8 +++- .../defaults/desktop/screensaver.conf | 4 +- src-qt5/core/lumina-desktop/LDesktop.cpp | 10 ++--- src-qt5/core/lumina-desktop/main.cpp | 8 ++-- .../src/lthemeengine/qsspage.cpp | 10 ++++- .../src/lthemeengine/qsspage.ui | 48 ++++++++++++++++++++-- 6 files changed, 69 insertions(+), 19 deletions(-) (limited to 'src-qt5') diff --git a/src-qt5/core/libLumina/RootSubWindow.cpp b/src-qt5/core/libLumina/RootSubWindow.cpp index 9eb62ff5..886d7a17 100644 --- a/src-qt5/core/libLumina/RootSubWindow.cpp +++ b/src-qt5/core/libLumina/RootSubWindow.cpp @@ -315,7 +315,7 @@ void RootSubWindow::toggleMaximize(){ //Not maximized yet - go ahead and make it so lastMaxGeom = this->geometry(); //save this for later; } - qDebug() << "Toggle Maximize:" << this->geometry() << rect; + //qDebug() << "Toggle Maximize:" << this->geometry() << rect; QString anim_type = DesktopSettings::instance()->value(DesktopSettings::Animation, "window/move", "random").toString(); loadAnimation(anim_type, NativeWindow::Size, rect); } @@ -384,6 +384,10 @@ void RootSubWindow::propertiesChanged(QList props, QList else{ otherB->setIcon(vals[i].value()); } break; case NativeWindow::GlobalPos: + if(vals[i].toPoint()!=QPoint(0,0)){ + WinWidget->resyncWindow(); + } + break; case NativeWindow::Size: //qDebug() << " - SIZE CHANGE"; if(WIN->property(NativeWindow::FrameExtents).isNull() && (i props, QList props << props.takeAt(i); vals << vals.takeAt(i); i--; - }else if(!WinWidget->isPaused() && !this->isVisible() && activeState==Normal){ + }else if(!WinWidget->isPaused() && activeState==Normal){ if(WIN->property(NativeWindow::Size).toSize() != WinWidget->size()){ qDebug() << "Got Direct Geometry Change:" << WIN->geometry(); this->setGeometry(WIN->geometry()); diff --git a/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf b/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf index b4bfec59..89f4e488 100644 --- a/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf +++ b/src-qt5/core/lumina-desktop-unified/defaults/desktop/screensaver.conf @@ -1,3 +1,3 @@ [General] -default_plugin="random" -plugin_VGA-0="random" +default_plugin="fireflies" +plugin_VGA-0="fireflies" diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index 37bc7ffa..f9ea1534 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -88,7 +88,7 @@ QRect LDesktop::availableScreenGeom(){ return globalWorkRect; //saved from previous calculations }else{ return LSession::handle()->screenGeom( Screen() ); - } + } } void LDesktop::UpdateGeometry(){ @@ -150,7 +150,7 @@ void LDesktop::checkResolution(){ }else if(scrn.width()==oldWidth && scrn.height()==oldHeight){ //nothing to do - same as before }else{ - //Calculate the scale factor between the old/new sizes in each dimension + //Calculate the scale factor between the old/new sizes in each dimension // and forward that on to all the interface elements double xscale = scrn.width()/((double) oldWidth); double yscale = scrn.height()/((double) oldHeight); @@ -194,7 +194,7 @@ void LDesktop::checkResolution(){ } } DP->sync(); //make sure it gets saved to disk right away - + } issyncing = false; } @@ -238,7 +238,7 @@ void LDesktop::InitDesktop(){ bgWindow->setWindowOpacity(0.0); connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu()) );*/ if(DEBUG){ qDebug() << "Create bgDesktop"; } - bgDesktop = new LDesktopPluginSpace(); + bgDesktop = new LDesktopPluginSpace(); int grid = settings->value(DPREFIX+"GridSize",-1).toInt(); if(grid<0 && LSession::desktop()->screenGeometry(Screen()).height() > 2000){ grid = 200; } else if(grid<0){ grid = 100; } @@ -266,7 +266,7 @@ void LDesktop::InitDesktop(){ } void LDesktop::SettingsChanged(){ - if(issyncing){ return; } //don't refresh for internal modifications to the + if(issyncing){ return; } //don't refresh for internal modifications to the issyncing = true; qDebug() << "Found Settings Change:" << screenID; settings->sync(); //make sure to sync with external settings changes diff --git a/src-qt5/core/lumina-desktop/main.cpp b/src-qt5/core/lumina-desktop/main.cpp index 6017cad7..b2bfa9be 100644 --- a/src-qt5/core/lumina-desktop/main.cpp +++ b/src-qt5/core/lumina-desktop/main.cpp @@ -93,14 +93,14 @@ int main(int argc, char ** argv) if(DEBUG){ timer = new QTime(); timer->start(); } //Setup Log File //qInstallMessageHandler(MessageOutput); - if(DEBUG){ qDebug() << "Theme Init:" << timer->elapsed(); } - LuminaThemeEngine theme(&a); - QObject::connect(&theme, SIGNAL(updateIcons()), &a, SLOT(reloadIconTheme()) ); + //if(DEBUG){ qDebug() << "Theme Init:" << timer->elapsed(); } + //LuminaThemeEngine theme(&a); + //QObject::connect(&theme, SIGNAL(updateIcons()), &a, SLOT(reloadIconTheme()) ); //if(DEBUG){ qDebug() << "Load Locale:" << timer->elapsed(); } //LUtils::LoadTranslation(&a, "lumina-desktop"); if(DEBUG){ qDebug() << "Session Setup:" << timer->elapsed(); } a.setupSession(); - theme.refresh(); + //theme.refresh(); if(DEBUG){ qDebug() << "Exec Time:" << timer->elapsed(); delete timer;} int retCode = a.exec(); //qDebug() << "Stopping the window manager"; diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp index ae5350ab..cd88fb56 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp @@ -29,6 +29,8 @@ QSSPage::QSSPage(QWidget *parent, bool desktop) : TabPage(parent), m_ui(new Ui:: m_ui->createButton->setIcon(QIcon::fromTheme("document-new")); m_ui->editButton->setIcon(QIcon::fromTheme("accessories-text-editor")); m_ui->removeButton->setIcon(QIcon::fromTheme("edit-delete")); + m_ui->tool_enable->setEnabled(false); + m_ui->tool_disable->setEnabled(false); } QSSPage::~QSSPage(){ @@ -50,8 +52,10 @@ void QSSPage::on_qssListWidget_currentItemChanged(QListWidgetItem *current, QLis if(current!=0){ m_ui->list_disabled->clearSelection(); //clear any current selection on the other widget m_ui->list_disabled->setCurrentRow(-1); + m_ui->tool_enable->setEnabled(false); } //qDebug() << "Got Current Item Changed"; + m_ui->tool_disable->setEnabled(current!=0); if(current){ m_ui->editButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); m_ui->removeButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); @@ -68,8 +72,10 @@ void QSSPage::on_list_disabled_currentItemChanged(QListWidgetItem *current, QLis if(current!=0){ m_ui->qssListWidget->clearSelection(); //clear any current selection on the other widget m_ui->qssListWidget->setCurrentRow(-1); + m_ui->tool_disable->setEnabled(false); } //qDebug() << "Got Current Item Changed"; + m_ui->tool_enable->setEnabled(current!=0); if(current){ m_ui->editButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); m_ui->removeButton->setEnabled(current->data(QSS_WRITABLE_ROLE).toBool()); @@ -105,11 +111,11 @@ void QSSPage::on_createButton_clicked(){ file.close(); //creating item QFileInfo info(filePath); - QListWidgetItem *item = new QListWidgetItem(info.fileName(), m_ui->qssListWidget); + QListWidgetItem *item = new QListWidgetItem(info.fileName(), m_ui->list_disabled); item->setToolTip(info.filePath()); item->setData(QSS_FULL_PATH_ROLE, info.filePath()); item->setData(QSS_WRITABLE_ROLE, info.isWritable()); - m_ui->qssListWidget->setCurrentRow(m_ui->qssListWidget->count()-1); + m_ui->list_disabled->setCurrentRow(m_ui->list_disabled->count()-1); QTimer::singleShot(10, this, SLOT(on_editButton_clicked()) ); } diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui index 108bbbf9..f9a980f3 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.ui @@ -22,6 +22,12 @@ + + + 0 + 0 + + Increase Priority @@ -29,12 +35,19 @@ - + + .. + + + 0 + 0 + + Decrease priority of style @@ -42,12 +55,19 @@ - + + .. + + + 0 + 0 + + Qt::Horizontal @@ -61,6 +81,12 @@ + + + 0 + 0 + + Disable Style @@ -68,7 +94,8 @@ Disable - + + .. Qt::ToolButtonTextBesideIcon @@ -120,11 +147,18 @@ + + + 0 + 0 + + Enable - + + .. Qt::ToolButtonTextBesideIcon @@ -133,6 +167,12 @@ + + + 0 + 0 + + Qt::Horizontal -- cgit