mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-19 02:48:49 +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()
|
||||
{
|
||||
// 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);
|
||||
|
||||
QList<QString> themes = Core()->getColorThemes();
|
||||
@ -42,6 +44,7 @@ void GeneralOptionsWidget::updateThemeFromConfig()
|
||||
QString curTheme = Config()->getCurrentTheme();
|
||||
int index = themes.indexOf(curTheme) + 1;
|
||||
ui->colorComboBox->setCurrentIndex(index);
|
||||
connect(ui->colorComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(on_colorComboBox_currentIndexChanged(int)));
|
||||
}
|
||||
|
||||
void GeneralOptionsWidget::on_fontSelectionButton_clicked()
|
||||
|
@ -23,6 +23,11 @@ Configuration* Configuration::instance()
|
||||
void Configuration::loadInitial()
|
||||
{
|
||||
setDarkTheme(getDarkTheme());
|
||||
QString theme = s.value("theme").toString();
|
||||
if (theme != "default")
|
||||
{
|
||||
Core()->cmd(QString("eco %1").arg(theme));
|
||||
}
|
||||
}
|
||||
|
||||
void Configuration::resetAll()
|
||||
|
Loading…
Reference in New Issue
Block a user