mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-07 15:32:13 +00:00
Removed old Dark Theme, and replace it with the "Dark Grey" (#549)
* Remove old dark theme, and replace it with the "Dark Grey" * Fixed comments
This commit is contained in:
parent
35b948bf19
commit
bd8243f24f
@ -35,7 +35,7 @@ void GeneralOptionsWidget::updateThemeFromConfig()
|
|||||||
// Disconnect currentIndexChanged because clearing the comboxBox and refiling it causes its index to change.
|
// Disconnect currentIndexChanged because clearing the comboxBox and refiling it causes its index to change.
|
||||||
disconnect(ui->colorComboBox, SIGNAL(currentIndexChanged(int)), this,
|
disconnect(ui->colorComboBox, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(on_colorComboBox_currentIndexChanged(int)));
|
SLOT(on_colorComboBox_currentIndexChanged(int)));
|
||||||
ui->themeComboBox->setCurrentIndex(Config()->getDarkTheme());
|
ui->themeComboBox->setCurrentIndex(Config()->getTheme());
|
||||||
|
|
||||||
QList<QString> themes = Core()->getColorThemes();
|
QList<QString> themes = Core()->getColorThemes();
|
||||||
ui->colorComboBox->clear();
|
ui->colorComboBox->clear();
|
||||||
@ -71,7 +71,7 @@ void GeneralOptionsWidget::on_fontSelectionButton_clicked()
|
|||||||
void GeneralOptionsWidget::on_themeComboBox_currentIndexChanged(int index)
|
void GeneralOptionsWidget::on_themeComboBox_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
//disconnect(Config(), SIGNAL(colorsUpdated()), this, SLOT(updateThemeFromConfig()));
|
//disconnect(Config(), SIGNAL(colorsUpdated()), this, SLOT(updateThemeFromConfig()));
|
||||||
Config()->setDarkTheme(index);
|
Config()->setTheme(index);
|
||||||
//connect(Config(), SIGNAL(colorsUpdated()), this, SLOT(updateThemeFromConfig()));
|
//connect(Config(), SIGNAL(colorsUpdated()), this, SLOT(updateThemeFromConfig()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,17 +81,12 @@
|
|||||||
<string>Dark</string>
|
<string>Dark</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Dark Grey</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="colorLabel">
|
<widget class="QLabel" name="colorLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Color theme</string>
|
<string>Color Theme</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -53,7 +53,7 @@ Configuration *Configuration::instance()
|
|||||||
|
|
||||||
void Configuration::loadInitial()
|
void Configuration::loadInitial()
|
||||||
{
|
{
|
||||||
setDarkTheme(getDarkTheme());
|
setTheme(getTheme());
|
||||||
setColorTheme(getCurrentTheme());
|
setColorTheme(getCurrentTheme());
|
||||||
applySavedAsmOptions();
|
applySavedAsmOptions();
|
||||||
}
|
}
|
||||||
@ -157,21 +157,6 @@ void Configuration::loadBaseDark()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Configuration::loadDarkTheme()
|
void Configuration::loadDarkTheme()
|
||||||
{
|
|
||||||
loadBaseDark();
|
|
||||||
setColor("gui.border", QColor(255, 255, 255));
|
|
||||||
// Windows background
|
|
||||||
setColor("gui.background", QColor(36, 66, 79));
|
|
||||||
// Disassembly nodes background
|
|
||||||
setColor("gui.alt_background", QColor(58, 100, 128));
|
|
||||||
// Disassembly nodes background when selected
|
|
||||||
setColor("gui.disass_selected", QColor(36, 66, 79));
|
|
||||||
// Disassembly line selected
|
|
||||||
setColor("highlight", QColor(64, 115, 115));
|
|
||||||
setColor("highlightWord", QColor(64, 115, 115));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Configuration::loadDarkGreyTheme()
|
|
||||||
{
|
{
|
||||||
loadBaseDark();
|
loadBaseDark();
|
||||||
setColor("gui.border", QColor(100, 100, 100));
|
setColor("gui.border", QColor(100, 100, 100));
|
||||||
@ -198,16 +183,16 @@ void Configuration::setFont(const QFont &font)
|
|||||||
emit fontsUpdated();
|
emit fontsUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Configuration::setDarkTheme(int theme)
|
void Configuration::setTheme(int theme)
|
||||||
{
|
{
|
||||||
s.setValue("dark", theme);
|
s.setValue("ColorPalette", theme);
|
||||||
switch(theme){
|
switch(theme){
|
||||||
|
case 0:
|
||||||
|
loadDefaultTheme();
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
loadDarkTheme();
|
loadDarkTheme();
|
||||||
break;
|
break;
|
||||||
case 2:
|
|
||||||
loadDarkGreyTheme();
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
loadDefaultTheme();
|
loadDefaultTheme();
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ private:
|
|||||||
void loadBaseDark();
|
void loadBaseDark();
|
||||||
void loadDefaultTheme();
|
void loadDefaultTheme();
|
||||||
void loadDarkTheme();
|
void loadDarkTheme();
|
||||||
void loadDarkGreyTheme();
|
|
||||||
void setColor(const QString &name, const QColor &color);
|
void setColor(const QString &name, const QColor &color);
|
||||||
|
|
||||||
// Images
|
// Images
|
||||||
@ -43,10 +42,10 @@ public:
|
|||||||
|
|
||||||
// Colors
|
// Colors
|
||||||
const QColor getColor(const QString &name) const;
|
const QColor getColor(const QString &name) const;
|
||||||
void setDarkTheme(int theme);
|
void setTheme(int theme);
|
||||||
int getDarkTheme()
|
int getTheme()
|
||||||
{
|
{
|
||||||
return s.value("dark").toInt();
|
return s.value("ColorPalette").toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString getDirProjects();
|
QString getDirProjects();
|
||||||
|
Loading…
Reference in New Issue
Block a user