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

 
 

bug #53174: Octave uses Win98 theme on Windows

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

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 13 Dec 2018 09:30:50 PM UTC, comment #31: 

Closing this report since the Win98 theme issue is fixed with changeset http://hg.savannah.gnu.org/hgweb/octave/rev/2355f66cf91d

The issue with background colors of some ui elements is still present on other platforms than windows and is back again on windows due to the non Win98 style. Therefore bug #49247 was reopened.

Torsten Lilge <ttl>
Group Member
Thu 13 Dec 2018 09:25:13 PM UTC, comment #30: 

I have pushed the patch for selecting the style with changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/2355f66cf91d

Torsten Lilge <ttl>
Group Member
Thu 13 Dec 2018 08:15:50 PM UTC, comment #29: 

I agree to push the style-selection-patch and to reopen bug #49247.

Torsten Lilge <ttl>
Group Member
Thu 13 Dec 2018 08:04:17 PM UTC, comment #28: 

I meant pushing file #45607 here.

For the other bug: This could be to why it doesn't work for the gtk2 style: https://stackoverflow.com/questions/8952679/gtkmm-3-button-background-color-change/53008709#53008709

Markus Mützel <mmuetzel>
Group administrator
Thu 13 Dec 2018 07:54:57 PM UTC, comment #27: 

I slightly modified your patch for using stylesheets for coloring the buttons. This seems to be working now for the windowsvista style (see attaches screenshot).
I don't know whether adding "background:" is necessary. But I left it in from your original patch.

Maybe we can do something similar for the popupmenu.

I'd vote for pushing the patch for this bug and re-opening bug #49247 for a more general fix.
Opinions?

(file #45645,

Markus Mützel <mmuetzel>
Group administrator
Tue 11 Dec 2018 09:30:16 PM UTC, comment #26: 

Markus, thanks for testing. Since the style sheet approach does not help to solve the issue with the background color of some graphic objects, I suggest to push the patch for changing the overall style with the consequence that the issue mentioned above will pop up again on windows and won't be fixed on other platforms for the moment.

Torsten Lilge <ttl>
Group Member
Mon 10 Dec 2018 05:55:11 PM UTC, comment #25: 

@Torsten: Your patch works for me on Windows 10.

Available styles are "windowsvista" (the new default), "windows" (the old default), and "fusion".
Switching between styles updates the GUI immediately. No restart needed.
Thumps up!

Markus Mützel <mmuetzel>
Group administrator
Sat 08 Dec 2018 09:33:32 PM UTC, comment #24: 

And here is the attachment announced but forgotten in comment #23

(file #45607)

Torsten Lilge <ttl>
Group Member
Sat 08 Dec 2018 09:27:53 PM UTC, comment #23: 

The attachment bug53174_style_selection.patch provides the possibility to select the desired style in the "Gerenal" tab of the preferences dialog. Moreover, setting the style at startup to "Windows" on window systems is removed.

The patch is tested on Ubuntu/Gnome. Testing on other platforms is very much appreciated.

Torsten Lilge <ttl>
Group Member
Sat 08 Dec 2018 09:01:58 PM UTC, comment #22: 

Please find attached file bug53174_stylesheets.patch which uses style sheets for coloring pushbuttons for testing. Unfortunately, there is no difference in the behavior on my system.

(file #45606)

Torsten Lilge <ttl>
Group Member
Sat 08 Dec 2018 03:40:46 PM UTC, comment #21: 

Did anyone try to implement the approach that Alexander outlined in comment #19?

If this worked for all styles, that would be a true fix for the the issue in bug #49247.
Even if it doesn't, I'd be inclined to vote in favour of the selection box for styles (and maybe also change the default on Windows to a more modern style). With that feature, a user who needed coloured ui buttons could easily select a different style as a work-around.

Markus Mützel <mmuetzel>
Group administrator
Sat 08 Dec 2018 10:23:46 AM UTC, comment #20: 

The issue fixed in bug #49247 still happens on my system (Ubuntu with Gnome) abd seems to depend on the currently selected style. In fact, the background color for the pushbutton in test_gui_backgroundcolor.m is correctly showing up in every available style except for the default one (gtk2 in my case).

Therefore, I am wondering, whether to drop the restriction to "windows" style on windows systems and make the style selectable in the preferences. Otherwise we would have restrict the style on other platform in order to fix the issue there as well. IMHO, this would not give users the expected and desired look & feel.

Torsten Lilge <ttl>
Group Member
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>
Group administrator
Tue 10 Apr 2018 09:58:05 PM UTC, comment #17: 
Rik <rik5>
Group administrator
Tue 10 Apr 2018 07:22:22 PM UTC, comment #16: 

Unfortunately, it doesn't.

Markus Mützel <mmuetzel>
Group administrator
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: 
Markus Mützel <mmuetzel>
Group administrator
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>
Group administrator
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>
Group 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":

http://hg.savannah.gnu.org/hgweb/octave/file/90bd5649983c/libgui/src/octave-gui.cc#l165

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>
Group administrator
Sat 17 Feb 2018 05:37:12 AM UTC, comment #7: 
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>
Group 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: 

Thanks.

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>
Group 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>
Group 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:
   
   
Comment:
   

Attached Files
file #45645:  bug53174_stylesheets_v2.patch added by mmuetzel (1KiB - application/octet-stream)
file #45607:  bug53174_style_selection.patch added by ttl (20KiB - text/x-patch)
file #45606:  bug53174_stylesheets.patch added by ttl (1KiB - text/x-patch)
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

Digest:
   bug dependencies.

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-13 ttl Dependencies- bugs #49247 is dependent
    2018-12-13 ttl StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2018-12-13 mmuetzel Attached File- Added bug53174_stylesheets_v2.patch, #45645
        Attached File- Added bug53174_stylesheets_windowsvista.png, #45646
    2018-12-08 rik5 Carbon-CopyRemoved 72865 -
    2018-12-08 ttl StatusConfirmed Patch Submitted
    2018-12-08 ttl Attached File- Added bug53174_style_selection.patch, #45607
    2018-12-08 ttl Attached File- Added bug53174_stylesheets.patch, #45606
    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.13-f8d8.
    Corresponding source code