diff options
author | Ken Moore <ken@ixsystems.com> | 2017-09-14 12:22:31 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-09-14 12:22:31 -0400 |
commit | 49d7b64794cb5c645f0093d18a207ea1c9fe2121 (patch) | |
tree | f38bec1e5f607d33277f1c240ae9a3916aac0a2b /src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp | |
parent | Cleanup the QSS page quite a bit so that items can now be sorted, ordered by ... (diff) | |
download | lumina-49d7b64794cb5c645f0093d18a207ea1c9fe2121.tar.gz lumina-49d7b64794cb5c645f0093d18a207ea1c9fe2121.tar.bz2 lumina-49d7b64794cb5c645f0093d18a207ea1c9fe2121.zip |
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.
Diffstat (limited to 'src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp')
-rw-r--r-- | src-qt5/core/lumina-theme-engine/src/lthemeengine/qsspage.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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()) ); } |