mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-11-07 00:41:23 +03:00
Dark theme has been added
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user