areaDetector / ADSimDetector

A simulation driver for the EPICS areaDetector software. It contains the example driver and an example IOC directory.
https://areadetector.github.io/areaDetector/ADSimDetector/simDetector.html
Other
2 stars 16 forks source link

text alignment problems with caQtDM #2

Closed prjemian closed 7 years ago

prjemian commented 7 years ago

some labels overlap text entry widgets in both simDetector and simDetectorSetup screens

This is a common problem in screens converted from MEDM's .adl files. The enclosing box for the text in the MEDM must be re-positioned, then the screens re-converted.

screenshot at 2017-11-12 21-55-52

screenshot at 2017-11-12 21-56-09

prjemian commented 7 years ago

These are the revised screens in caQtDM.

screenshot at 2017-11-12 22-30-48

screenshot at 2017-11-12 22-31-13

prjemian commented 7 years ago

In simDetector.ui, there is an empty gap between setup and plugins. Looks like an artefact of my editing. Is something missing? I'll need to check with MEDM. Don't merge yet.

prjemian commented 7 years ago

Nothing is missing. ADSetup is included into the top-left box. The height allowed in simDetector.ui for ADSetup is larger than the actual height of the included screen, thus the extra blank space.

prjemian commented 7 years ago

@MarkRivers : do you want me to move the widgets up to tighten up the blank space in the simDetector.adl widget?

MarkRivers commented 7 years ago

There is no gap in the simDetector.adl screen. You appear to be using the wrong version of ADSetup.adl from ADCore. Here is a screen shot of simDetector.adl from the master branch of ADSimDetector and ADCore. image Note that there is no gap above the Plugins section. I also looked at your diffs and I don't understand them. The medm screen for the labels "Exposure time", "Acquire period", etc. is correctly formatted in the master branch. It has correctly set the size of the text widgets to match the size of the text, and has correctly set all of the widgets to be Align=Right. It seems to me that if these do not correctly convert then the bug is in adl2ui and not in the medm screen itself. You have changed these text widgets to all be the same size (i.e. larger than the text for most of them), which is not correct. They should each be the size of the text.

What exactly is it that you need to do to get the conversion to work?

prjemian commented 7 years ago

The formatting problems won't appear in MEDM, only in caQtDM. The difference is the rules are different for displaying text given a rectangle between Motif and Qt.

My newer systems don't have Motif (no packages available) so can't build MEDM. Have to run MEDM on an APS system to edit the .adl files. And there, I don't have AD3.1 compiled yet.

First thing for me is to make sure I'm looking at one version of AD, not some mix of both 2.6 and 3.1. I will look closely to ensure there is not a caInclude screen from some wrong directory.

MarkRivers commented 7 years ago

The difference is the rules are different for displaying text given a rectangle between Motif and Qt.

What do you mean by "given a rectangle"? Which rectangle in the display?

prjemian commented 7 years ago

The bounding box of the widget, height and width, specifically

On Nov 14, 2017 6:41 PM, "Mark Rivers" notifications@github.com wrote:

The difference is the rules are different for displaying text given a rectangle between Motif and Qt.

What do you mean by "given a rectangle"? Which rectangle in the display?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/areaDetector/ADSimDetector/issues/2#issuecomment-344448385, or mute the thread https://github.com/notifications/unsubscribe-auth/ACLKMFIJ6uZa6mZG4B5EmuL4ZC0xR2pGks5s2jM1gaJpZM4QbODf .

MarkRivers commented 7 years ago

The formatting problems won't appear in MEDM, only in caQtDM. The difference is the rules are different for displaying text given a rectangle between Motif and Qt.

The bounding box of the widget, height and width, specifically

If that is true then I don't understand the simDetector.ui image that you show in the first entry in this issue. Note that all of the labels in the Setup section (from ADSetup.adl included file) and in the Readout section (from ADReadout.adl included file) appear fine. Those medm text widgets have exactly the same properties as the ones in the Collect section, i.e. widget size=text size and align=right. Have you altered the ADSetup.adl in ADCore before doing that conversion? Same for ADReadout.adl? If not then why are those displayed OK but the widgets in the Collect section are messed up?

MarkRivers commented 7 years ago

This issue has been resolved. The problem was that the op/ui/autoconvert/*.ui files in ADCore and ADSimDetector were out of date, they were not conversions of the current op/adl files. When the current adl files are converted the ui files look fine. The problem was that in the older files some of the text widgets in medm did not have the widget size = text size (i.e. Size->TextToContents in medm).

The action item is to create a script to automatically convert adl files to edl/autoconvert and ui/autoconvert so that this can easily be done before each release of an AD module. It would be nice to be able to do this by running "make" in the op/ directory.