LineColor property is missing for the Group widget
Closed this issue · 4 comments
If the Group widget style is set to style_title_bar()
, the foreground_color()
controls both the color of the title bar background and the font, which makes font always invisible. Phoebus controls the color of the font color using Foreground Color
and the color of the frame, including the background of the title bar using Line Color
. It would be useful to have ability to set Line Color using line_color()
method, which is available for other widgets.
It looks like if background is explicitly set using background_color()
method, it also sets the font color for the title bar.
It looks like Line Color was added to the Group widget in Phoebus update 4.7.3 which is what created these bugs. We will be working on fixing this.
Hi @dmgav
This PR and this issue ticket in phoebus introduced the change as @madelinespark noted
ControlSystemStudio/phoebus#2772 and ControlSystemStudio/phoebus#2743
#32 should address this issue ticket and add the line_color
and predefined_line_color
methods to the group widget. There are lots of additions recently and I'd like to get a few more changes into phoebusgen before releasing a new pip package so for now you could clone this repository and run reload_local_pip.sh
to get the latest fix.
We also never looked into the widget versioning and how to support different versions before so we would like to add that support in the next few weeks
Thanks
Tynan
phoebusgen now properly supports widget versioning thanks to @madelinespark
You can upgrade the pip package to 3.0.0 for this to work. An example is below and more info in the README here https://github.com/als-epics/phoebusgen?tab=readme-ov-file#phoebus-version-support
>>> import phoebusgen
>>> phoebusgen.phoebus_version
'4.7.3'
>>> phoebusgen.widget_versions["group"]
'3.0.0'
>>> a = phoebusgen.widget.Group("test", 1,1,1,1)
>>> a
<?xml version="1.0" ?>
<widget type="group" version="3.0.0">
<name>test</name>
<x>1</x>
<y>1</y>
<width>1</width>
<height>1</height>
</widget>
>>> phoebusgen.change_phoebus_version("4.7.2")
Phoebus version manually changed to 4.7.2.
>>> phoebusgen.widget_versions["group"]
'2.0.0'
>>> b = phoebusgen.widget.Group("test2", 2,2,2,2)
>>> b
<?xml version="1.0" ?>
<widget type="group" version="2.0.0">
<name>test2</name>
<x>2</x>
<y>2</y>
<width>2</width>
<height>2</height>
</widget>
>>> a.line_color(255,255,255)
>>> a
<?xml version="1.0" ?>
<widget type="group" version="3.0.0">
<name>test</name>
<x>1</x>
<y>1</y>
<width>1</width>
<height>1</height>
<line_color>
<color red="255" blue="255" green="255" alpha="255"/>
</line_color>
</widget>
>>> b.line_color(255,255,255)
Line color not compatible with group widget version less than 3.0.0.
>>> b
<?xml version="1.0" ?>
<widget type="group" version="2.0.0">
<name>test2</name>
<x>2</x>
<y>2</y>
<width>2</width>
<height>2</height>
</widget>
I'll close this issue ticket but please re-open if you have any issues or questions