+ event to restore/clear action style scheme
This commit is contained in:
@@ -36,8 +36,6 @@
|
||||
#include "MainWindow.h"
|
||||
#include "PrefWidgets.h"
|
||||
#include "Language/Translator.h"
|
||||
#include "Control.h"
|
||||
#include "TaskView/TaskView.h"
|
||||
|
||||
using namespace Gui::Dialog;
|
||||
|
||||
@@ -165,9 +163,8 @@ void DlgGeneralImp::saveSettings()
|
||||
QTextStream str(&f);
|
||||
qApp->setStyleSheet(str.readAll());
|
||||
|
||||
Gui::TaskView::TaskView* taskPanel = Control().taskPanel();
|
||||
if (taskPanel)
|
||||
taskPanel->clearActionStyle();
|
||||
ActionStyleEvent e(ActionStyleEvent::Clear);
|
||||
qApp->sendEvent(getMainWindow(), &e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -175,16 +172,14 @@ void DlgGeneralImp::saveSettings()
|
||||
if (sheet.toString().isEmpty()) {
|
||||
if (this->tiledBackground->isChecked()) {
|
||||
qApp->setStyleSheet(QString());
|
||||
Gui::TaskView::TaskView* taskPanel = Control().taskPanel();
|
||||
if (taskPanel)
|
||||
taskPanel->restoreActionStyle();
|
||||
ActionStyleEvent e(ActionStyleEvent::Restore);
|
||||
qApp->sendEvent(getMainWindow(), &e);
|
||||
mdi->setBackground(QPixmap(QLatin1String(":/icons/background.png")));
|
||||
}
|
||||
else {
|
||||
qApp->setStyleSheet(QString());
|
||||
Gui::TaskView::TaskView* taskPanel = Control().taskPanel();
|
||||
if (taskPanel)
|
||||
taskPanel->restoreActionStyle();
|
||||
ActionStyleEvent e(ActionStyleEvent::Restore);
|
||||
qApp->sendEvent(getMainWindow(), &e);
|
||||
mdi->setBackground(QBrush(QColor(160,160,160)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user