mirror of
https://github.com/huderlem/porymap.git
synced 2026-03-21 17:45:44 -05:00
Fix disabled arrow styling on Default theme
This commit is contained in:
parent
2a7927ae82
commit
77a7acd529
|
|
@ -1,6 +1,7 @@
|
|||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>themes/dark.qss</file>
|
||||
<file>themes/default.qss</file>
|
||||
<file>themes/midnight.qss</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
|||
25
resources/themes/default.qss
Normal file
25
resources/themes/default.qss
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/* DEFAULT theme for porymap */
|
||||
|
||||
/*
|
||||
For newer versions of macOS at least, icons
|
||||
using Qt::ArrowType do not change color when
|
||||
disabled, so we specify the color change ourselves.
|
||||
*/
|
||||
QToolButton {
|
||||
color: black;
|
||||
}
|
||||
QToolButton:disabled {
|
||||
color: gray;
|
||||
}
|
||||
QComboBox {
|
||||
color: black;
|
||||
}
|
||||
QComboBox:disabled {
|
||||
color: gray;
|
||||
}
|
||||
QAbstractSpinBox {
|
||||
color: black;
|
||||
}
|
||||
QAbstractSpinBox:disabled {
|
||||
color: gray;
|
||||
}
|
||||
|
|
@ -669,14 +669,10 @@ void MainWindow::restoreWindowState() {
|
|||
}
|
||||
|
||||
void MainWindow::setTheme(QString theme) {
|
||||
if (theme == "default") {
|
||||
setStyleSheet("");
|
||||
} else {
|
||||
QFile File(QString(":/themes/%1.qss").arg(theme));
|
||||
File.open(QFile::ReadOnly);
|
||||
QString stylesheet = QLatin1String(File.readAll());
|
||||
setStyleSheet(stylesheet);
|
||||
}
|
||||
QFile File(QString(":/themes/%1.qss").arg(theme));
|
||||
File.open(QFile::ReadOnly);
|
||||
QString stylesheet = QLatin1String(File.readAll());
|
||||
setStyleSheet(stylesheet);
|
||||
}
|
||||
|
||||
bool MainWindow::openProject(QString dir, bool initial) {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ void PreferenceEditor::initFields() {
|
|||
QDirIterator it(":/themes", QDirIterator::Subdirectories);
|
||||
while (it.hasNext()) {
|
||||
QString themeName = re.match(it.next()).captured(1);
|
||||
themes.append(themeName);
|
||||
if (!themes.contains(themeName)) {
|
||||
themes.append(themeName);
|
||||
}
|
||||
}
|
||||
themeSelector->addItems(themes);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user