Dark theme has been added

This commit is contained in:
Arin Alexander
2017-12-11 16:48:00 +03:00
parent 13c6386af6
commit 435074064b
14 changed files with 76 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
#include "lrsettingdialog.h"
#include "ui_lrsettingdialog.h"
#include <QFile>
namespace LimeReport{
@@ -8,6 +9,10 @@ SettingDialog::SettingDialog(QWidget *parent) :
ui(new Ui::SettingDialog)
{
ui->setupUi(this);
QFile theme(":/qdarkstyle/style.qss");
if (!theme.exists()){
ui->cbbUseDarkTheme->setVisible(false);
}
}
SettingDialog::~SettingDialog()
@@ -32,6 +37,11 @@ QFont SettingDialog::defaultFont()
return result;
}
bool SettingDialog::userDarkTheme()
{
return ui->cbbUseDarkTheme->isChecked();
}
bool SettingDialog::suppressAbsentFieldsAndVarsWarnings()
{
return ui->cbSuppressWarnings->isChecked();
@@ -57,4 +67,9 @@ void SettingDialog::setDefaultFont(const QFont &value)
ui->defaultFontSize->setValue(value.pointSize());
}
void SettingDialog::setUseDarkTheme(bool value)
{
ui->cbbUseDarkTheme->setChecked(value);
}
} // namespace LimeReport