Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer looks broken with dark theme #84

Closed
500-internal-server-error opened this issue Aug 6, 2024 · 6 comments · Fixed by #89
Closed

Installer looks broken with dark theme #84

500-internal-server-error opened this issue Aug 6, 2024 · 6 comments · Fixed by #89

Comments

@500-internal-server-error

Installer 2024-07-27 looks broken with Windows' dark theme:

image

The previous installer 2024-05-07 looks fine, if a bit janky:

image

Seems like the dark theme is only half-applied for some reason.

@hgdagon
Copy link

hgdagon commented Aug 7, 2024

Same for me, but looks slightly different. Win11 with Dark Mode.
colorsmsys2

@lazka
Copy link
Member

lazka commented Oct 3, 2024

Weird. We are not doing anything special here I think, just using the qtinstallerframework defaults.

Maybe we can force a theme do avoid it handling dark mode (?)

lazka added a commit to lazka/msys2-installer that referenced this issue Dec 7, 2024
The later seems to be the default for some reason but does not
support dark mode (or breaks when dark mode is enabled).
Use the "Modern" style instead, and also set a smaller default
width while at it.

Note that the style is a QWizard concept and not QTIFW specific.

The only related upstream issue I found was
https://bugreports.qt.io/browse/QTBUG-123853

Fixes msys2#84
@lazka lazka closed this as completed in #89 Dec 7, 2024
lazka added a commit that referenced this issue Dec 7, 2024
The later seems to be the default for some reason but does not
support dark mode (or breaks when dark mode is enabled).
Use the "Modern" style instead, and also set a smaller default
width while at it.

Note that the style is a QWizard concept and not QTIFW specific.

The only related upstream issue I found was
https://bugreports.qt.io/browse/QTBUG-123853

Fixes #84
@brunvonlope
Copy link

With the fix by #89 the installer looks nice on Dark mode but regressed to Windows XP style in Light mode 🤢

@lazka
Copy link
Member

lazka commented Dec 8, 2024

Screenshot 2024-12-08 at 14-26-06 Mastodon Flock

@brunvonlope
Copy link

brunvonlope commented Dec 8, 2024

@lazka Gray background, regardless what you choose to compare for sake of sarcarsm, is not used by the latest Win32 guidelines. Not all Win32 apps were updated by MS but all of the Vista-era up today don't use a grey background:

image

Just a minor detail, anyway. Guard down.

@lazka
Copy link
Member

lazka commented Dec 8, 2024

Sure, I agree, but it looks like it's broken in Qt (see https://bugreports.qt.io/browse/QTBUG-123853) and I'm not motivated to look into fixing it there.

If anyone wants to, feel free. Here is a minimal LLM generated example which shows the problem:

// c++ main.cpp $(pkg-config --cflags --libs Qt6Widgets)
// ./main.exe

#include <QApplication>
#include <QWizard>
#include <QWizardPage>
#include <QLabel>
#include <QVBoxLayout>

class SimplePage : public QWizardPage {
public:
    SimplePage(const QString& title, const QString& text, QWidget* parent = nullptr) 
        : QWizardPage(parent) 
    {
        setTitle(title);
        QLabel* label = new QLabel(text);
        QVBoxLayout* layout = new QVBoxLayout;
        layout->addWidget(label);
        setLayout(layout);
    }
};

int main(int argc, char *argv[]) {
    QApplication app(argc, argv);

    QWizard wizard;
    wizard.setWizardStyle(QWizard::AeroStyle);
    wizard.setWindowTitle("Simple Wizard Example");

    // Add pages to the wizard
    wizard.addPage(new SimplePage("Page 1", "This is the first page."));
    wizard.addPage(new SimplePage("Page 2", "This is the second page."));
    wizard.addPage(new SimplePage("Page 3", "This is the final page."));

    // Set some basic properties
    wizard.setOption(QWizard::HaveHelpButton, true);
    wizard.setMinimumSize(500, 300);

    wizard.show();
    return app.exec();
}

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants