octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Matlab incompatibility: uiXXX color choices taken from environment rathe


From: Rik
Subject: Matlab incompatibility: uiXXX color choices taken from environment rather than root object
Date: Tue, 8 May 2018 10:13:35 -0700

5/7/18

While trying to resolve bug #53805 (https://savannah.gnu.org/bugs/?53805),
Mike and I came across an incompatible behavior.  In Matlab, graphic
property defaults may be set on the root object.  Because all other objects
are descended from the root object, they inherit the defaults that the user
has specified on the root object.

However, the QtHandles code which became the basis for the qt toolkit, is
getting the default uiXXX colors from the current windowing color scheme. 
The code for this is in __init_qt__.cc which leads to divergent behaviors
based on whether a plot has yet been made in an Octave session.  For example,

run-octave --gui
>> get (0, 'defaultuicontrolbackgroundcolor')
ans =

   1   1   1

>> h = plot (1:10);
>> get (0, 'defaultuicontrolbackgroundcolor')
ans =

   0.28627   0.30588   0.34510

On the one hand, it is kind of nice to have uiXXX objects automatically
adopt the user's current theme.  But, it is also Matlab-incompatible.  If a
user wants default values for graphics objects then they are supposed to be
initialized by configuring the defaults on the root object.  Is there any
objection to removing the code from __init_qt__.cc and reverting to
Matlab-compatible behavior?

--Rik







reply via email to

[Prev in Thread] Current Thread [Next in Thread]