[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48255] Default settings with uicontrols
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #48255] Default settings with uicontrols |
Date: |
Fri, 17 Jun 2016 10:31:07 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 |
URL:
<http://savannah.gnu.org/bugs/?48255>
Summary: Default settings with uicontrols
Project: GNU Octave
Submitted by: gyom
Submitted on: Fri 17 Jun 2016 10:31:04 AM GMT
Category: GUI
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name: Guillaume
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
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:
>> F = figure;
set(0,'defaultuicontrolunits','normalized') ;
u(1) = uicontrol(F,'Style','checkbox', 'String','string', 'Position',[0.3 0.8
0.4 0.09]);
u(2) = uicontrol(F,'Style','edit', 'String','string', 'Position',[0.3 0.7 0.4
0.09]);
u(3) = uicontrol(F,'Style','listbox', 'String','string', 'Position',[0.3 0.6
0.4 0.09]);
u(4) = uicontrol(F,'Style','popupmenu', 'String','string', 'Position',[0.3 0.5
0.4 0.09]);
u(5) = uicontrol(F,'Style','pushbutton', 'String','string', 'Position',[0.3
0.4 0.4 0.09]);
u(6) = uicontrol(F,'Style','radiobutton', 'String','string', 'Position',[0.3
0.3 0.4 0.09]);
u(7) = uicontrol(F,'Style','text', 'String','string', 'Position',[0.3 0.2 0.4
0.09]);
u(8) = uicontrol(F,'Style','togglebutton', 'String','string', 'Position',[0.3
0.1 0.4 0.09]);
>> get(F,'color')
ans =
0.9400 0.9400 0.9400
>> cell2mat(get(u,'backgroundcolor'))
ans =
0.9400 0.9400 0.9400
0.9400 0.9400 0.9400
0.9400 0.9400 0.9400
0.9400 0.9400 0.9400
0.9400 0.9400 0.9400
0.9400 0.9400 0.9400
0.9400 0.9400 0.9400
0.9400 0.9400 0.9400
>> cell2mat(get(u,'foregroundcolor'))
ans =
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
>> cell2mat(get(u,'value'))
ans =
0
0
1
1
0
0
0
0
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]) )
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 17 Jun 2016 10:31:04 AM GMT Name: uicontrols.png Size: 32kB By:
gyom
<http://savannah.gnu.org/bugs/download.php?file_id=37512>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48255>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #48255] Default settings with uicontrols,
Guillaume <=