diff options
Diffstat (limited to 'src-qt5/core-utils')
-rw-r--r-- | src-qt5/core-utils/lumina-config/pages/page_compton.cpp | 6 | ||||
-rw-r--r-- | src-qt5/core-utils/lumina-config/pages/page_compton.ui | 7 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/page_compton.cpp b/src-qt5/core-utils/lumina-config/pages/page_compton.cpp index fcbd3e41..0003c9c8 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_compton.cpp +++ b/src-qt5/core-utils/lumina-config/pages/page_compton.cpp @@ -14,6 +14,7 @@ page_compton::page_compton(QWidget *parent) : PageWidget(parent), ui(new Ui::page_compton()){ ui->setupUi(this); connect(ui->text_file, SIGNAL(textChanged()), this, SLOT(settingChanged()) ); + connect(ui->check_disablecompton, SIGNAL(toggled(bool)), this, SLOT(settingChanged()) ); updateIcons(); } @@ -25,8 +26,9 @@ page_compton::~page_compton(){ // PUBLIC SLOTS //================ void page_compton::SaveSettings(){ - emit HasPendingChanges(false); + QSettings settings("lumina-desktop","sessionsettings"); + settings.setValue("enableCompositing", !ui->check_disablecompton->isChecked()); QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf"; LUtils::writeFile(set, ui->text_file->toPlainText().split("\n"),true); } @@ -34,6 +36,8 @@ void page_compton::SaveSettings(){ void page_compton::LoadSettings(int){ emit HasPendingChanges(false); emit ChangePageTitle( tr("Compositor Settings") ); + QSettings settings("lumina-desktop","sessionsettings"); + ui->check_disablecompton->setChecked( !settings.value("enableCompositing", true).toBool() ); QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf"; qDebug() << "Load Compton settings:" << set; ui->text_file->setPlainText( LUtils::readFile(set).join("\n") ); diff --git a/src-qt5/core-utils/lumina-config/pages/page_compton.ui b/src-qt5/core-utils/lumina-config/pages/page_compton.ui index 32c153f7..9083a2fb 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_compton.ui +++ b/src-qt5/core-utils/lumina-config/pages/page_compton.ui @@ -27,6 +27,13 @@ <number>6</number> </property> <item> + <widget class="QCheckBox" name="check_disablecompton"> + <property name="text"> + <string>Disable Compositing Manager (session restart required)</string> + </property> + </widget> + </item> + <item> <widget class="QPlainTextEdit" name="text_file"/> </item> </layout> |