Missing windowsvista style plugin for Windows #22132

issue jarolrod openend this issue on June 2, 2021
  1. jarolrod commented at 5:57 pm on June 2, 2021: member

    Here’s a comparison of the Bitcoin Core GUI cross-compiled from linux to Windows between master and 0.21:

    Master 0.21
    master-cross 021-cross

    Yep, there’s something wrong here. We can gain some insight into what’s going on with the style by leveraging the logging of static plugins introduced in 957895c715f86feaa26c806e5fa8ebb77430a926. The master branch already includes this commit. I cherry-picked it on top of the 0.21 branch here. Now if we take a look at the debug.log for each, we’ll see the following

    0.21 Branch:

    02021-06-02T07:23:59Z Qt 5.9.8 (static), plugin=windows (static)
    12021-06-02T07:23:59Z Static plugins:
    22021-06-02T07:23:59Z  QWindowsIntegrationPlugin, version 329992
    32021-06-02T07:23:59Z Style: windowsvista / QWindowsVistaStyle
    

    Master Branch:

    02021-06-02T04:16:06Z Qt 5.12.10 (static), plugin=windows (static)
    12021-06-02T04:16:06Z Static plugins:
    22021-06-02T04:16:06Z  QWindowsIntegrationPlugin, version 330752
    32021-06-02T04:16:06Z Style: windows / QWindowsStyle
    

    We notice that the master branch’s style is set to windows while the 0.21 branch is set to windowsvista style. Looking at the Qt Widgets Gallery, you can observe that windows style looks like Windows 95 while windowsvista is the “sleeker”/“modern” QStyle for the Windows platform.

    This is what has changed between master and 0.21 and what is causing the GUI to look straight out of the 90’s (maybe this is a retro release? 🕺).

    Now, what is causing this change? Well, I’m not completely sure. Otherwise I’d open up a PR. I do have some findings:

    Different available QStyle Keys between Qt 5.9.8 and Qt 5.12 at runtime:

    Looking at the Qt Widgets section of the depends Qt configuration output, we can see the following styles are available:

    0.21 Branch:

    0Qt Widgets:
    1  GTK+ ................................... no
    2  Styles ................................. Fusion Windows WindowsXP WindowsVista
    

    Master Branch:

    0Qt Widgets:
    1  GTK+ ................................... no
    2  Styles ................................. Fusion Windows WindowsVista
    

    So while it seems that in regards to how Qt is configured, WindowsVista style is available in both cases, If we apply the patch below to see the available QStyle Keys at runtime, we don’t see windowsvista as an available key on master:

    0qInfo() << QStyleFactory::keys().join(",");
    

    0.21 Branch:

    02021-06-02T17:43:35Z GUI: "Windows,WindowsXP,WindowsVista,Fusion"
    

    Master Branch:

    02021-06-02T17:03:11Z GUI: "Windows,Fusion"
    

    This means that we can’t use the line below to fix the issue, and so a fix would involve changes to our build system:

    0QApplication::setStyle("windowsvista");
    

    Windows Vista Style moved to a Plugin in Qt 5.10:

    This is based off what I found while looking for this issue online:

    Source A

    I have also ran into this issue with Qt 5.11.1. Qt’s Windows Vista style has been moved out to a separate DLL, which is styles\qwindowsvistastyle.dll. If you add this to the package, standard windows will get back their modern look.

    Source B

    I found a problem. After Qt5.10.1 the “windowsvista” style becomes a plugin. So in the final deploy file windowsvistastyle.dll schould exists. I add a folder “/styles” with this .dll and a problem is gone.

    Source C

    Ship style plugins, since native styles were moved into plugins as of Qt 5.10. This includes Windows Vista style on Windows and Adwaita on Linux.

    If we figure out what needs to be done on the build side to link to this plugin, then we can use a similar patch as vlc to fix this and so the following is a solution:

    0 Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin)
    
  2. jarolrod added the label GUI on Jun 2, 2021
  3. jarolrod commented at 5:57 pm on June 2, 2021: member
  4. ghost commented at 6:13 pm on June 2, 2021: none

    you can observe that windows style looks like Windows 95

    I had noticed this few days back while testing something. It was intermittent, don’t even remember if it was master or 0.21 or other branch and I ignored it assuming something wrong with my system itself (Windows can behave weird at times and most of the issues are fixed with restart)

    Thanks for doing the research. Hope it is resolved soon.

  5. hebasto commented at 6:31 pm on June 2, 2021: member
    Fixed in #22133.
  6. fanquake closed this on Jun 3, 2021

  7. DeckerSU referenced this in commit 7eecef841c on Nov 15, 2021
  8. TheComputerGenie referenced this in commit b329ee9825 on Jan 5, 2022
  9. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-06-29 07:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me