From: James T. <ja...@fl...> - 2022-09-02 11:03:19
|
> On 2 Sep 2022, at 10:35, Andreas Mueller <alp...@gm...> wrote: > > What is "the existing widget rendering from Thomas"? I only had a short look at the soure code but I couldn't find anything. Can you give me a pointer, where I have to look? It’s split between Simgear (see classes with widget / layout in the name) and in FGData. (Eg widgets/Button.nas) To be able to use the existing dialog XML files un-modified (which is a design goal), I am extending the widget types with many additional ones (eg PUI has slider, dial, combo-box, checkbox, all of which need to be created - this is about 30% done and is the bit I’m very slow at). Thomas’s widgets have a very good separation of API + state from appearance, so all styling is in its own file, and I am being very strict about maintaining this separation, so we also retain the re-styling feature of the PUI UI, which many people also rely on. This does make the process of adding new widgets more complex, however. The other thing is to preserve all the layouting : I’ve added a grid layout to Simgear, since that is supported by the existing PUI code (even though the layouts are not actually part of PUI itself). The problem is getting the sizing / hinting of all the widgets to match the PUI values, so that dialogs look approximately the same under the new UI as they did with PUI; again this a design goal so that all existing dialogs in aircraft and add-ons, which we can’t update, continue to work and be usable. Debugging that is also proving quite tricky, since there’s all kinds of hard-coded assumptions built into PUI widgets about pixels, font-sizes etc which are not true in the new system. Kind regards, James |