mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +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(ui->colorComboBox, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(on_colorComboBox_currentIndexChanged(int)));
|
||||
ui->themeComboBox->setCurrentIndex(Config()->getDarkTheme());
|
||||
ui->themeComboBox->setCurrentIndex(Config()->getTheme());
|
||||
|
||||
QList<QString> themes = Core()->getColorThemes();
|
||||
ui->colorComboBox->clear();
|
||||
@ -71,7 +71,7 @@ void GeneralOptionsWidget::on_fontSelectionButton_clicked()
|
||||
void GeneralOptionsWidget::on_themeComboBox_currentIndexChanged(int index)
|
||||
{
|
||||
//disconnect(Config(), SIGNAL(colorsUpdated()), this, SLOT(updateThemeFromConfig()));
|
||||
Config()->setDarkTheme(index);
|
||||
Config()->setTheme(index);
|
||||
//connect(Config(), SIGNAL(colorsUpdated()), this, SLOT(updateThemeFromConfig()));
|
||||
}
|
||||
|
||||
|
@ -81,17 +81,12 @@
|
||||
<string>Dark</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dark Grey</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="colorLabel">
|
||||
<property name="text">
|
||||
<string>Color theme</string>
|
||||
<string>Color Theme</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -53,7 +53,7 @@ Configuration *Configuration::instance()
|
||||
|
||||
void Configuration::loadInitial()
|
||||
{
|
||||
setDarkTheme(getDarkTheme());
|
||||
setTheme(getTheme());
|
||||
setColorTheme(getCurrentTheme());
|
||||
applySavedAsmOptions();
|
||||
}
|
||||
@ -159,22 +159,7 @@ void Configuration::loadBaseDark()
|
||||
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();
|
||||
setColor("gui.border", QColor(100,100,100));
|
||||
setColor("gui.border", QColor(100, 100, 100));
|
||||
// Windows background
|
||||
setColor("gui.background", QColor(37, 40, 43));
|
||||
// Disassembly nodes background
|
||||
@ -198,16 +183,16 @@ void Configuration::setFont(const QFont &font)
|
||||
emit fontsUpdated();
|
||||
}
|
||||
|
||||
void Configuration::setDarkTheme(int theme)
|
||||
void Configuration::setTheme(int theme)
|
||||
{
|
||||
s.setValue("dark", theme);
|
||||
s.setValue("ColorPalette", theme);
|
||||
switch(theme){
|
||||
case 0:
|
||||
loadDefaultTheme();
|
||||
break;
|
||||
case 1:
|
||||
loadDarkTheme();
|
||||
break;
|
||||
case 2:
|
||||
loadDarkGreyTheme();
|
||||
break;
|
||||
default:
|
||||
loadDefaultTheme();
|
||||
}
|
||||
|
@ -21,7 +21,6 @@ private:
|
||||
void loadBaseDark();
|
||||
void loadDefaultTheme();
|
||||
void loadDarkTheme();
|
||||
void loadDarkGreyTheme();
|
||||
void setColor(const QString &name, const QColor &color);
|
||||
|
||||
// Images
|
||||
@ -43,10 +42,10 @@ public:
|
||||
|
||||
// Colors
|
||||
const QColor getColor(const QString &name) const;
|
||||
void setDarkTheme(int theme);
|
||||
int getDarkTheme()
|
||||
void setTheme(int theme);
|
||||
int getTheme()
|
||||
{
|
||||
return s.value("dark").toInt();
|
||||
return s.value("ColorPalette").toInt();
|
||||
}
|
||||
|
||||
QString getDirProjects();
|
||||
|
Loading…
Reference in New Issue
Block a user