mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-19 10:58:51 +00:00
Remember color scheme on exit
This commit is contained in:
parent
427f3797e8
commit
3843864ff9
@ -32,6 +32,8 @@ void GeneralOptionsWidget::updateFontFromConfig()
|
|||||||
|
|
||||||
void GeneralOptionsWidget::updateThemeFromConfig()
|
void GeneralOptionsWidget::updateThemeFromConfig()
|
||||||
{
|
{
|
||||||
|
// Disconnect currentIndexChanged because clearing the comboxBox and refiling it causes its index to change.
|
||||||
|
disconnect(ui->colorComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(on_colorComboBox_currentIndexChanged(int)));
|
||||||
ui->themeComboBox->setCurrentIndex(Config()->getDarkTheme() ? 1 : 0);
|
ui->themeComboBox->setCurrentIndex(Config()->getDarkTheme() ? 1 : 0);
|
||||||
|
|
||||||
QList<QString> themes = Core()->getColorThemes();
|
QList<QString> themes = Core()->getColorThemes();
|
||||||
@ -42,6 +44,7 @@ void GeneralOptionsWidget::updateThemeFromConfig()
|
|||||||
QString curTheme = Config()->getCurrentTheme();
|
QString curTheme = Config()->getCurrentTheme();
|
||||||
int index = themes.indexOf(curTheme) + 1;
|
int index = themes.indexOf(curTheme) + 1;
|
||||||
ui->colorComboBox->setCurrentIndex(index);
|
ui->colorComboBox->setCurrentIndex(index);
|
||||||
|
connect(ui->colorComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(on_colorComboBox_currentIndexChanged(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralOptionsWidget::on_fontSelectionButton_clicked()
|
void GeneralOptionsWidget::on_fontSelectionButton_clicked()
|
||||||
|
@ -23,6 +23,11 @@ Configuration* Configuration::instance()
|
|||||||
void Configuration::loadInitial()
|
void Configuration::loadInitial()
|
||||||
{
|
{
|
||||||
setDarkTheme(getDarkTheme());
|
setDarkTheme(getDarkTheme());
|
||||||
|
QString theme = s.value("theme").toString();
|
||||||
|
if (theme != "default")
|
||||||
|
{
|
||||||
|
Core()->cmd(QString("eco %1").arg(theme));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Configuration::resetAll()
|
void Configuration::resetAll()
|
||||||
|
Loading…
Reference in New Issue
Block a user