bugGNU Octave - Bugs: bug #66907, helpdlg, msgbox icon...

 
 

bug #66907: helpdlg, msgbox icon spacing/wrapping issues

Submitter:  mspo
Submitted:  Thu 13 Mar 2025 11:17:36 AM UTC
   
 
Category:  GUI Severity:  2 - Minor
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 10.0.90 Release: 
Operating System:  * Microsoft Windows Fixed Release:  10.1.0
Planned Release:  10.1.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 24 Mar 2025 01:47:25 PM UTC, comment #24: 

@mspo: Thanks for digging into this. I have pushed your fix with changeset http://hg.savannah.gnu.org/hgweb/octave/rev/2d6a45209c1b

Torsten Lilge <ttl>
Group Member
Mon 24 Mar 2025 08:56:39 AM UTC, comment #23: 

Aah, I can't get used to this interface, sorry. This is the line:

image ("parent", hax, "cdata", icon.cdata, "cdatamapping", "direct", ...
"xdata", [1 im_sz(2)], "ydata", [-(im_sz(1)-1)/2 (im_sz(1)-1)/2]);


Note the index subtraction in both elements of ydata.

mspo
Mon 24 Mar 2025 08:53:35 AM UTC, comment #22: 

Thank you for working on this. It looks better, I agree. And it's only a minor issue. At the risk of being a nitpicker - the top of the icons still looks a bit strange. With the posted patch I was able to locate the corresponding line in the code and play around a bit. I'm no expert in icon design, but it feels strange that the icon cdata (at least the "information" icon) is not centered - there are a couple of empty rows and columns. I guess that is why there was a correction by 1 pixel in place before. The removal of the correction reduced the problem. However, I feel that this line completely fixes the problem for me:



mspo
Mon 24 Mar 2025 01:19:07 AM UTC, comment #21: 

just grabbed the nightly that i think includes all the changes.

using the zip archive on this machine, after firing up the new version the same icons were showing.  i don't know if the exe installer replaces an existing ini (or i don't remember if that was supposed to happen on the stable patches).  after deleting the graphics ini file, start up of the nightly build shows expected "Octave" icons in the title bars of the main window, figures, and dialogs (like helpdlg). switching to Tango and restarting, icons all still show as expected.  Switching back to System and restarting, the black and white 'system' icons return as expected, and in helpdlg and similar, the icons look fine. no more strange top pixel 'wrapping' like we saw before. see attached.

I'd say this can be closed.


Nicholas Jankowski <nrjank>
Group Member
Sun 23 Mar 2025 11:23:48 PM UTC, comment #20: 

@nrjank: Did the Windows nightly builds show the correct behavior?  Can this bug be closed now?

Rik <rik5>
Group administrator
Sat 22 Mar 2025 12:17:30 PM UTC, comment #19: 

Now the default is set to octave's icon theme with changeset http://hg.savannah.gnu.org/hgweb/octave/rev/0da986940200 .

The remaining changes will be pushes against default after the stable branch was merged to default.

Torsten Lilge <ttl>
Group Member
Fri 21 Mar 2025 02:32:14 PM UTC, comment #18: 

marking as Ready for Test with target release of 10.1.0.  once the nigthly builds catch it we can verify all is good and the windows builds look right.

Nicholas Jankowski <nrjank>
Group Member
Fri 21 Mar 2025 11:56:58 AM UTC, comment #17: 

I habe pushed the patch from comment #13 with cset http://hg.savannah.gnu.org/hgweb/octave/rev/aabb68de245e . It fixes the rendering of the icon in msgbox, heldgl etc..




Torsten Lilge <ttl>
Group Member
Thu 20 Mar 2025 10:00:25 AM UTC, comment #16: 

I haven't followed the discussion closely. But imho, it would be ok to change the (default) icon theme when releasing a new major version if that addresses an issue.
Even if users actively selected a different icon theme (system) in older versions of Octave, they can still switch to that again manually after they updated to Octave 10 if they prefer.

Out of interest: I have several versions of Octave installed in parallel on Windows. (To be able to run some quick "regression" tesing.) Do they share the same GUI settings? Would they switch to the new default again and again when I open old and new versions repeatedly after each other?

Markus Mützel <mmuetzel>
Group administrator
Wed 19 Mar 2025 07:51:11 PM UTC, comment #15: 

Actually, switching from system to octave as the default icon theme might be safe for the stable branch. But the rest of the patch changes the settings file and should therefore be tested before being pushed against stable. This patch is changing the icon theme on windows and mac from system to octave assuming that system is selected since it was the default and most users werde not aware of the possibility to select alternative icon sets.

If we now change the default to octave icons, an active system icon set was probably selected intentionally and should - at least to my opinion - not be changed by octave. But I am fine to push the new default if you think that I am too conservative here.

Torsten Lilge <ttl>
Group Member
Wed 19 Mar 2025 06:23:51 PM UTC, comment #14: 

hmmm... maybe i'm confusing the various conversations about it, but I thought it was determined to be okay to change the default icon selection to be uniform on all platforms for Octave 10? Or is the issue that making a change so that the settings will be different for people who have already installed octave is too intrusive for 10.1?   is there a push separate patches, one simple one to stable just changing the default setting so that anyone newly installing octave will see the Octave icons, and another one to default that will make the more aggressive change for everyone else?

or maybe i'm overthinking this.

Nicholas Jankowski <nrjank>
Group Member
Wed 19 Mar 2025 06:11:58 PM UTC, comment #13: 

It turned out that I was always looking at the wrong code for the badly rendered icon in various dialogs. Please find attach a patch that fixes this issue. Since the patch is not very intrusive, I would vote for pushing it to stable, if it fixes the issue on Windows and Mac as well.

Note that this path patch does not fix the b/w default icons on Windows and Mac. This issue is tackled by the patch in comment #9, which will be pushed to default.



(file #57040)

Torsten Lilge <ttl>
Group Member
Wed 19 Mar 2025 07:16:43 AM UTC, comment #12: 

Another observation: The "helpdlg" and other ui dialogs are generally looking a bit ugly. Also the text has some aliasing effects. The QMessageboxes used in the GUI (like, e.g., when closing a modified editor file) look much nicer. For now, I haven't found anything that might cause this difference.

Torsten Lilge <ttl>
Group Member
Wed 19 Mar 2025 06:11:03 AM UTC, comment #11: 

Thanks for testing. Then the "wire-frame" icons are used by Qt on Mac and Windows (whenever there is no system icon theme available?).

I assume that you tested without the patch from comment #9? With the patch, the default font should be the Octave icon theme and a system icon theme is switched to this Octave icon theme on Mac and Windows.

Torsten Lilge <ttl>
Group Member
Tue 18 Mar 2025 10:36:59 PM UTC, comment #10: 

I see the saame "wire-frame" type icons on macOS. The availble styles are "system", "macos", "Windows", "Fusion" and "Fusion-dark". In the default/macos style icons seem oversized (see attached). Switching to any other theme shrinks icon to more appropriate size, but keep the same "wire-frame" style.
(macos_default.png)
The same applies to "helpdlg" icon.

Dmitri.
--



Dmitri A. Sergatskov <dasergatskov>
Sat 15 Mar 2025 10:06:32 AM UTC, comment #9: 

Please find attached a patch which implements what is described at the end of comment #8 for switching to the Octave icon set as the default one.


(file #57020)

Torsten Lilge <ttl>
Group Member
Sat 15 Mar 2025 05:04:35 AM UTC, comment #8: 

I figured out what changed the icons in Windows: In Qt 6.2, themed icons were not supported on Windows and Mac. The documentation says:

Note: By default, only X11 will support themed icons. In order to use themed icons on Mac and Windows, you will have to bundle a compliant theme in one of your themeSearchPaths() and set the appropriate themeName().

That's why there were no icons in the "System" theme and the fallback icon set (Octave) was selected.

However, the documentation in Qt 6.7 says

If an icon theme has not been explicitly set via setThemeName() a platform defined icon theme will be used.

without any particular hint to Windows and Mac anymore. Obviously, Qt 6.7 now provides a platform defined icon set on Windows and Mac as well. That's why we now see these icons in Windows.

When switching to "Octave" as the default icon set, any existing settings files will still contain the "System" icon set as user preference. In order to fix that we would have to change the name if the settings key, remove the old key if contained in the settings file, and add the new key while replacing any "System" preference to "Octave".

A different issue is the baldy rendered icon in the dialogs for which I do not have an explanation yet.


Torsten Lilge <ttl>
Group Member
Fri 14 Mar 2025 07:56:53 PM UTC, comment #7: 

As far as I remember now, there wasn't a system icon set in window until now and the fallback (octave)  was used. We should definitely use octave as default, at least for windows.

Torsten Lilge <ttl>
Group Member
Fri 14 Mar 2025 07:25:01 PM UTC, comment #6: 

i honestly hadn't realized that option was there. or that it had changed.

Octave 9.1.0, icon style was set to Tango.

for the Octave 10 build, it was set to System. Changing it to Octave or Tango produces expected results. see below.  did we deliberately switch the default to System for octave 10?

Strangely, in octave 9.1.0, you can switch it to Octave, but if you switch it to System it still shows the Octave icons.  Also, I've never seen those System icons in any other program, so where do they pull from?


Nicholas Jankowski <nrjank>
Group Member
Fri 14 Mar 2025 07:02:48 PM UTC, comment #5: 

I guess these black and white icons are not the new Windows icons? What if you change the icons set in the setting?

Torsten Lilge <ttl>
Group Member
Fri 14 Mar 2025 04:04:19 PM UTC, comment #4: 

the windows stable build (10.0.91 hg id: d3776c792fa8) has that style of icons for all toolbars in all windows. the modified file dialog has a 'normal' warning icon, though. so it seems some things are finding the 'right' icons and other arent?

see attached showing main window, editor window, helpdlg and editor modified warning.



Nicholas Jankowski <nrjank>
Group Member
Fri 14 Mar 2025 03:30:29 PM UTC, comment #3: 

For these dialogs, we are using Qt internal icons (dialog.cc):

  if (qsicon == "error")
    eicon = QMessageBox::Critical;
  else if (qsicon == "warn")
    eicon = QMessageBox::Warning;
  else if (qsicon == "help")
    eicon = QMessageBox::Information;
  else if (qsicon == "quest")
    eicon = QMessageBox::Question;

Are other user dialogs, like, e.g. when closing a modified editor file, showing similar ugly icons?

Torsten Lilge <ttl>
Group Member
Thu 13 Mar 2025 06:49:45 PM UTC, comment #2: 

noting that on an Octave 11 build on linux, the icon looks like the blue circle that appears in octave 9 on windows.  so possible the icon change in octave 10 on windows is unintentional?

Nicholas Jankowski <nrjank>
Group Member
Thu 13 Mar 2025 03:51:49 PM UTC, comment #1: 

I believe there were icon changes in Octave 10 that might be responsible.  Attached are images of msgbox from octave 9.1.0 and  10.0.91 (hg id: d3776c792fa8):

notice the change to the (i) icon along with the issue mentioned in the summary where the top pixel appears shifted to the bottom of the image.


Nicholas Jankowski <nrjank>
Group Member
Thu 13 Mar 2025 11:17:36 AM UTC, original submission:  

Since Octave 10.0.90, the status icons of some dialogs have changed and look strange. I'm not sure whether it is only a placeholder or if the icon has not been imported correctly, but it looks as if the top row of pixels is cut off and attached at the bottom - potentially an index problem?

Can be seen using any of these, for example

helpdlg
warndlg
msgbox('test', '', 'help')


My system is Windows 10 Pro (22H2) using the Octave 10.0.90 RC. (Likely independent of issue #66906.)

mspo

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #57058:  untitled.png added by mspo (10KiB - image/png - screenshot of icon raw data)
file #57057:  fixedicons.png added by nrjank (70KiB - image/png - System icons after patch)
file #57040:  msgbox.patch added by ttl (1KiB - text/x-patch)
file #57036:  macos_default.png added by dasergatskov (589KiB - image/png)
file #57020:  bug66907-v01.patch added by ttl (5KiB - text/x-patch)
file #57017:  Picture1.png added by nrjank (2MiB - image/png - comparison of icon sets)
file #57016:  Screenshot@2025-03-14@120231.png added by nrjank (107KiB - image/png - example of current icons in octave 10.0.91 hgid d3776c792fa8 on windows)
file #57010:  Screenshot@2025-03-13@114915.png added by nrjank (17KiB - image/png - image comparing msgbox from v 9.1.0 and 10.0.91)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by dasergatskov (Updated the item)
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by nrjank
  • -email is unavailable- added by nrjank (Updated the item)
  • -email is unavailable- added by mspo (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 19 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-03-28 rik5 Fixed ReleaseNone 10.1.0
    2025-03-28 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2025-03-24 mspo Attached File- Added untitled.png, #57058
    2025-03-24 nrjank Attached File- Added fixedicons.png, #57057
    2025-03-21 nrjank StatusIn Progress Ready For Test
        Planned ReleaseNone 10.1.0
    2025-03-21 ttl StatusConfirmed In Progress
    2025-03-19 ttl Attached File- Added msgbox.patch, #57040
    2025-03-18 dasergatskov Attached File- Added macos_default.png, #57036
    2025-03-15 ttl Attached File- Added bug66907-v01.patch, #57020
    2025-03-14 nrjank Attached File- Added Picture1.png, #57017
    2025-03-14 nrjank Attached File- Added Screenshot@2025-03-14@120231.png, #57016
    2025-03-13 nrjank Carbon-Copy- Added ttl
    2025-03-13 nrjank Severity3 - Normal 2 - Minor
        StatusNone Confirmed
    2025-03-13 nrjank Summaryhelpdlg, msgbox icons look weird helpdlg, msgbox icon spacing/wrapping issues
    2025-03-13 nrjank Attached File- Added Screenshot@2025-03-13@114915.png, #57010
    2025-03-13 mspo Attached File- Added Screenshot@2025-03-13@102546.png, #57009

    Back to the top

    Powered by Savane 3.14-962f.
    Corresponding source code