Open coretl opened 3 months ago
Are you expecting that with this change we can enable grid snapping and then drag a widget out of the generated position and then back again and the position is the same? That doesn't seem to be the case for grid size 5 and text size 15. The position changes slightly:
- </widget>
- <widget type="label" version="2.0.0">
- <name>Label</name>
- <text>Image File Tmot</text>
- <x>0</x>
- <y>48</y>
- <width>120</width>
- <height>20</height>
- <tooltip>$(text)</tooltip>
- </widget>
- <widget type="textentry" version="3.0.0">
- <name>TextEntry</name>
- <pv_name>$(P)$(R)ImageFileTmot</pv_name>
- <x>124</x>
- <y>48</y>
- <width>124</width>
- <height>20</height>
- <horizontal_alignment>1</horizontal_alignment>
...
+ <widget type="label" version="2.0.0">
+ <name>Label</name>
+ <text>Image File Tmot</text>
+ <x>1</x>
+ <y>50</y>
+ <width>120</width>
+ <tooltip>$(text)</tooltip>
+ </widget>
+ <widget type="textentry" version="3.0.0">
+ <name>TextEntry</name>
+ <pv_name>$(P)$(R)ImageFileTmot</pv_name>
+ <x>126</x>
+ <y>50</y>
+ <width>124</width>
Are you expecting that with this change we can enable grid snapping and then drag a widget out of the generated position and then back again and the position is the same? That doesn't seem to be the case for grid size 5 and text size 15. The position changes slightly:
Oh dear, that is not expected. @diamondRC is this working for you with size 15 font? Please could you demo to Gary if so?
Grid snapping in the phoebus editor is to the global co-ordinates. If you make a group box it applies a local offset to this that is proportional to the font size, but snapping continues on the global co-ordinates. The current offset with size 14 font is 18 pixels, which is not a multiple of 5 which is our widget spacing distance. If we increase the group box font to 15, then it is 20 pixels which is.
I suggest we add this to widget group box:
and set the top level display grid to 5 pixels to match:
Acceptance Criteria