bugGNU Octave - Bugs: bug #48255, Default settings with uicontrols

 
 

bug #48255: Default settings with uicontrols

Submitted by:  Guillaume <gyom>
Submitted on:  Fri 17 Jun 2016 10:31:04 AM UTC  
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  John Donoghue <lostbard>
Originator Name:  Guillaume Open/Closed:  Closed
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)

Fri 14 Oct 2016 10:58:24 AM UTC, comment #7:

I assume the difference in colors between Octave and Matlab is a feature and not a bug, and users can always be explicit for the color, backgroundcolor and foregroundcolor properties to make sure display is identical.
Given you fixed the issue with the value property, this report can be closed as fixed.

Guillaume <gyom>
Thu 13 Oct 2016 07:58:28 PM UTC, comment #6:

The default colors for uicontrols are set in _init_qt_.cc, and pulls the Qt system colors so will change based on whatever colors have been set for the current the theme in QT.

The default figure color doesn't look to be.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Thu 13 Oct 2016 12:05:38 PM UTC, comment #5:

Pushed http://hg.savannah.gnu.org/hgweb/octave/rev/7adc5bbd840a

John Donoghue <lostbard>
Project MemberIn charge of this item.
Thu 13 Oct 2016 09:28:18 AM UTC, comment #4:

The patch works for me, thanks!

The last issue mentioned here relates to the default color values: I guess it's a "won't fix".

Guillaume <gyom>
Wed 12 Oct 2016 07:40:51 PM UTC, comment #3:

This works for me

default value now 0, set explccit set to value to 1 for listbox and popupmenu if a valid value wasn't provided

(file #38714)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Wed 12 Oct 2016 05:12:05 PM UTC, comment #2:

looking at the code, it sets all uicontrols 'value' property to 1.0

Many of the controls don't care on its value for display so don't look wrong

Looking at matlab, using the example below and the running

get(u, 'value'), it looks like most control (except listbox and popupmenu) default to value 0.

So it may make sense to set the default value parameter to 0, and handle the 2 special cases.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Wed 12 Oct 2016 09:49:21 AM UTC, comment #1:

The setting of foreground and background colors has been fixed in bug #49247.
What remains is the default setting for the 'value' property (especially for checkbox and radiobutton).

Guillaume <gyom>
Fri 17 Jun 2016 10:31:04 AM UTC, original submission:

Octave and Matlab differ in default settings for the backgroundcolor, foregroundcolor and value properties of uicontrols. Here is what Matlab does and a file is attached of a screenshot illustrating the differences:

In Octave, backgroundcolor is set to [0.83922 0.82353 0.81569], foregroundcolor is set to [0.13333 0.12157 0.11765] and value is always 1. Default color for a figure is [1 1 1].

My take on this is:

  • while it might not be necessary that Octave and Matlab have the same default values for colors, it would be great if figure's color and uicontrol's backgroundcolor match.
  • default setting for the value property in uicontrols should match Matlab's.
  • there is an issue with checkbox, popupmenu and radiobutton uicontrols where it is impossible to change the backgroundcolor property (try with set(u,'backgroundcolor',[1 0 0]) )
  • there seems to be an issue with a popupmenu uicontrol where it is impossible to change the foregroundcolor property (try with set(u,'foregroundcolor',[0 1 0]) )
Guillaume <gyom>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #38714:  defvalue.patch added by lostbard (2KiB - application/octet-stream)
file #37512:  uicontrols.png added by gyom (32KiB - 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 lostbard (Posted a comment)
  • -email is unavailable- added by gyom (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-14 lostbard StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2016-10-12 lostbard Attached File- => Added defvalue.patch, #38714
        StatusNone => Patch Submitted
        Assigned toNone => lostbard
    2016-06-17 gyom Attached File- => Added uicontrols.png, #37512

    Back to the top


    Powered by Savane 3.4