Skip to content

Commit ee3e97d

Browse files
committed
main: Review style and palette handling
Re-apply the original palette after setting our proxy style. Stop enforcing fusion style for xcb. Resolves GH-1284.
1 parent ec83b2d commit ee3e97d

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/main.cpp

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -161,19 +161,9 @@ int main(int argc, char** argv)
161161
// Initialize static things like the file format registry.
162162
doStaticInitializations();
163163

164-
QStyle* base_style = nullptr;
165-
#if !defined(Q_OS_WIN) && !defined(Q_OS_MACOS)
166-
if (QApplication::platformName() == QLatin1String("xcb"))
167-
{
168-
// Use the modern 'fusion' style instead of the
169-
// default "windows" style on X11.
170-
base_style = QStyleFactory::create(QString::fromLatin1("fusion"));
171-
}
172-
#endif
173-
QApplication::setStyle(new MapperProxyStyle(base_style));
174-
#if !defined(Q_OS_MACOS)
175-
QApplication::setPalette(QApplication::style()->standardPalette());
176-
#endif
164+
auto const palette = QApplication::palette();
165+
QApplication::setStyle(new MapperProxyStyle());
166+
QApplication::setPalette(palette);
177167

178168
// Create first main window
179169
auto first_window = new MainWindow();

0 commit comments

Comments
 (0)