bugGNU Octave - Bugs: bug #52800, The icon for dock widgets for...

 
 

bug #52800: The icon for dock widgets for *figure* windows needs improvement

Submitted by:  Dan Sebald <sebald>
Submitted on:  Wed 03 Jan 2018 09:09:38 PM UTC  
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  GNU/Linux

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 23 May 2018 05:02:11 PM UTC, comment #9:

I have tested on KDE with Qt 5.5.1 and the floating dock widgets have the correct icons when selecting "letter" or "graphics" icons in the preferences.

Regarding the figure widget icons, I suggest to have an icon that is derived from the octave logo but which does not change with the preferences for the dock widget icons. Then, the behavior would be consistent with the figure window icons when using other graphics toolkits.

Torsten <ttl>
Project Member
Mon 21 May 2018 10:28:42 PM UTC, comment #8:

I have no idea what is going wrong with the taskbar logos. I've manually entered icon paths for setWindowIcon() and commented out the setWindowIcon() in various places. Nothing seems to make a difference. It's as if the application is using some default application logo for every taskbar icon, unaffected by any use of setWindowIcon(). Maybe it's a Qt bug.

Dan Sebald <sebald>
Mon 21 May 2018 08:39:39 PM UTC, comment #7:

Ah, good point. I don't see "setWindowIcon" in too many locations in the source, so perhaps something is setting the icon back to the base icon.

The location that the "Figure" icon has be set is within the file libgui/graphics/FigureWindow.cc:

Since the FigureWindow is not one of the main gui objects (i.e., octave_dock_widget) that code we've been discussing doesn't apply. That's a bit problematic in the sense that the above could be changed easily to set the logo based on the settings (i.e., LETTER, GRAPHIC or NONE)--no problem. But then if the user changes the icon type in the settings, there needs to be some additional code

that adjusts the icon in all open Figure windows. That might be a bit more challenging because I don't know where to look to in order to determine the figure list. The list might be embedded in core code, not the GUI subdirectory.

Dan Sebald <sebald>
Mon 21 May 2018 08:18:39 PM UTC, comment #6:

This "/actions" path is a virtual one defined in libgui/src/resource.qrc:

There are icons in this path, which are definitely working (e.g. close, (un)dock of dock widgets).

Torsten <ttl>
Project Member
Mon 21 May 2018 07:48:21 PM UTC, comment #5:

I was just about to create a bug report for the non-working icons. Let me know if I should. It seems to me that the icons are missing or are in some path different than expected. The paths/icons that the program are looking for are (printed std::cerr during run-time):

but I don't see an "actions" subdirectory anywhere in either the "run-octave" environment or in the install directory "/usr/local/share/octave/4.5.0+". It seems something has gone wrong with the install process:

Dan Sebald <sebald>
Mon 21 May 2018 07:21:03 PM UTC, comment #4:

Dan, you are right. I have made the same logical mistake twice!

The other icon sets do not work? On Unity, all windows are always grouped under the main icon. I will test under my Vbox with KDE.

Torsten <ttl>
Project Member
Mon 21 May 2018 06:20:17 PM UTC, comment #3:

It's odd, but the graphic and letter icons don't seem to be working at the moment. All I'm seeing is the main icon, regardless of what setting I choose.

Anyway, I understand the reason for having some default. However, my point was that the construct isn't correct. Perhaps writing out the alternative approach that I think is correct will help.

The original is:

Imagine there is some bogus setting in the settings file, i.e., not NONE, not GRAPHIC and not LETTER. In that case immediately after line 1, the state of the button gets set back to false in line 2. Instead, if it were done as

then the general_icon_octave is left in a "true" state, rather than a "false" state.

Dan Sebald <sebald>
Mon 21 May 2018 10:03:37 AM UTC, comment #2:

I can provide an icon for the Qt figure windows but I have no idea where these have to be set. I agree to the idea of having the octave logo with a small superimposed plot. However, this logo should not depend on the preferences for the icon set of the dock widgets.

Torsten <ttl>
Project Member
Mon 21 May 2018 09:59:41 AM UTC, comment #1:

Regarding the mentioned hunk of code:

The documentation for a QButtonGroup says:

"If you create an exclusive button group, you should ensure that one of the buttons in the group is initially checked; otherwise, the group will initially be in a state where no buttons are checked."

Setting the first button to true ensures to have one button initially checked in the case that the settings file contains the settings key "DockWidgets/widget_icon_set", but set to some nonsense string. This would lead to all three buttons left unckecked.

Torsten <ttl>
Project Member
Wed 03 Jan 2018 09:09:38 PM UTC, original submission:

I've noticed that the logo used in the system dock works properly except the fact that plot figure windows have a real inconsistent behavior. Since it is most often a bunch of figure windows that accumulate along the dock in typical use, it would be nice to somehow assign a proper PNG to those, if possible.

In gnuplot graphics toolkit, it is the standard gnuplot figure of a little plot with basic color lines on it. In FLTK toolkit, it looks to be the default system icon which in this case is a black background with red "cross-out", or Ghost Busters :-), logo. In Qt toolkit, it is the standard Octave logo (what would be "NONE" in GUI settings parlance).

In some sense it is the last case, Qt graphics toolkit, that is the most problematic because it mimics the main GUI icon. I like having the main icon unique so that I can quickly find it.

What would be the best icon for a figure? Perhaps just the standard Octave icon with the number of the window superimposed on it. Otherwise, the logo with a small plot.

BTW, I notice this hunk of code:

doesn't set "NONE" as default as the comment says. At least, the logic doesn't seem to do that. It sets general_icon_octave to "true" initially, but then immediately after that sets general_icon_octave again. Let's say widget_icon_set is "HUH?!". Then all three of the above will be false at the end of this hunk. In other words, right now that line that has "// the default (if invalid set)" effectively does nothing.

Dan Sebald <sebald>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by sebald (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.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3