bugGNU Octave - Bugs: bug #53174, Octave uses Win98 theme on Windows


bug #53174: Octave uses Win98 theme on Windows

Submitted by:  Alexander Wilms <alexanderw>
Submitted on:  Sat 17 Feb 2018 01:17:37 AM UTC  
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Microsoft Windows

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Wed 11 Apr 2018 08:10:24 AM UTC, comment #19:

Instead of using setPalette, one can apparently use CSS-like style sheets: http://doc.qt.io/qt-5/stylesheet-examples.html and http://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qradiobutton

The stylesheet can be set for specific widgets:

QColor col = QColor::fromRgb(144,238,144);
QString qss = QString("background-color: %1").arg(col.name()); button->setStyleSheet(qss);

cf. https://stackoverflow.com/a/48555125

Alexander Wilms <alexanderw>
Wed 11 Apr 2018 07:41:49 AM UTC, comment #18:

@Rik: I don't see how checking the version would help. As I understand it, the QStyle for the GUI and the figures would need to be different. I don't know Qt well enough to say whether it is possible to mix styles within one application.
But maybe I mis-understood.

Markus Mützel <mmuetzel>
Project Member
Tue 10 Apr 2018 09:58:05 PM UTC, comment #17:

As a last resort, we could resort to checking the version of Windows.

See https://stackoverflow.com/questions/12889180/how-to-accurately-get-windows-os-version-with-c

Also, https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx

Rik <rik5>
Project Administrator
Tue 10 Apr 2018 07:22:22 PM UTC, comment #16:

Unfortunately, it doesn't.

Markus Mützel <mmuetzel>
Project Member
Tue 10 Apr 2018 07:10:46 PM UTC, comment #15:

Does the test_gui_backgroundcolor.m example attached to bug #49247 still work after removing the line?

Alexander Wilms <alexanderw>
Tue 10 Apr 2018 06:52:46 PM UTC, comment #14:

That line was added for bug #49247 with this commit:

Markus Mützel <mmuetzel>
Project Member
Tue 10 Apr 2018 06:50:11 PM UTC, comment #13:

Nice, thanks for testing that.

Alexander Wilms <alexanderw>
Tue 10 Apr 2018 06:47:19 PM UTC, comment #12:

Removing the line from comment #11 entirely gives the GUI a more modern feel on Windows 10.

Markus Mützel <mmuetzel>
Project Member
Mon 09 Apr 2018 06:55:10 PM UTC, comment #11:

That would be nice, but I don't have a Windows machine to test if changing http://hg.savannah.gnu.org/hgweb/octave/file/90bd5649983c/libgui/src/octave-gui.cc#l168 to windowsvista works.

Alexander Wilms <alexanderw>
Mon 09 Apr 2018 05:27:01 PM UTC, comment #10:

Does this bug need to be resolved for the 4.4 release?

Rik <rik5>
Project Administrator
Sat 17 Feb 2018 06:01:32 PM UTC, comment #9:

Does removing that line or changing it to "windowsvista" fix the theme?

I tried building a Windows version, but it fails, since epstool can't be downloaded.

Alexander Wilms <alexanderw>
Sat 17 Feb 2018 07:07:06 AM UTC, comment #8:

It looks like we are already forcing the style to be "Windows":


Maybe this is why QT_STYLE_OVERRIDE has no effect on Windows systems? Looking at the Qt sources, it that environment variable appears to be used on all platforms.

John W. Eaton <jwe>
Project Administrator
Sat 17 Feb 2018 05:37:12 AM UTC, comment #7:

Yes, that might be the best solution.

TeXstudio has a dropdown with all available options in its settings dialog:



Alexander Wilms <alexanderw>
Sat 17 Feb 2018 05:23:06 AM UTC, comment #6:

I think it would be better to have this as an option for all rather than hardwired just for Windows.

John W. Eaton <jwe>
Project Administrator
Sat 17 Feb 2018 05:10:25 AM UTC, comment #5:

QT_STYLE_OVERRIDE doesn't have any effect for 4.2.1 either.

If the patch works, is an additional option necessary? I don't know if Qt falls back to the "windows" style when the user manually sets the win98/win2000 theme for the entire desktop.

Alexander Wilms <alexanderw>
Sat 17 Feb 2018 05:02:44 AM UTC, comment #4:


Maybe we could make this an option for Octave specifically, either through an environment variable or command line option. I can do that (unless somone else does it first).

I tried setting QT_STYLE_OVERRIDE on a Windows system with a build from the current dev sources and it didn't seem to have any effect for me.

John W. Eaton <jwe>
Project Administrator
Sat 17 Feb 2018 04:50:51 AM UTC, comment #3:

I attached a patch.

(file #43339)

Alexander Wilms <alexanderw>
Sat 17 Feb 2018 04:27:19 AM UTC, comment #2:

I wasn't aware there was a problem.

So what are we supposed to do with that "windowsvista" style?

Patch please?

John W. Eaton <jwe>
Project Administrator
Sat 17 Feb 2018 03:38:20 AM UTC, comment #1:

Were older versions of Octave for Windows build using MinGW, which would have made the "windowsvista" style available?

Cf. http://doc.qt.io/qt-5/qstylefactory.html#details

Alexander Wilms <alexanderw>
Sat 17 Feb 2018 01:17:37 AM UTC, original submission:

Not a big issue, but it makes Octave look less polished.

On Windows 10, Octave 4.2.1 uses a blocky, Win98-style theme. This was previously reported in 2016, and seems to have been introduced between 4.0.3 and 4.2.0: http://octave.1599824.n4.nabble.com/Octave-4-2-0-GUI-on-Windows-has-changed-and-looks-ugly-td4680754.html

Maybe using a conditional QApplication::setStyle("windowsvista") fixes this. But https://stackoverflow.com/questions/44784414/qt-gui-theme-looks-old-fashioned suggests patching Qt's configure options.

Alexander Wilms <alexanderw>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #43339:  windowsvista.patch added by alexanderw (746B - text/x-patch)
file #43337:  1fN8T1g.png added by alexanderw (64KiB - image/png)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by alexanderw (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-10 rik5 StatusNone => Confirmed
    2018-04-10 mmuetzel Release4.2.1 => dev
    2018-02-17 alexanderw Attached File- => Added windowsvista.patch, #43339
    2018-02-17 alexanderw Attached File- => Added 1fN8T1g.png, #43337

    Back to the top

    Powered by Savane 3.3