Widgets #2367
Replies: 7 comments 5 replies
-
I think this satisfies many simple layout scenarios, but it may not be sufficient for more complicated cases (unless you want to fiddle with manually setting up an absolute layout). Just think of a pair of two small widgets (e.g. + and - buttons for zooming), which should be placed next to each other in one corner of the map. One thing that I have done to overcome such limitations with my custom widgets is to introduce a
The group sets up the positions of the child widgets, but they take care of drawing themselves at this position. In this setup I also needed a
The size is already included in your proposal (width & height), but the position is missing. You will need that for the absolute layout as well, I guess? If there is interest in it, I could possibly contribute the implementation of the above classes (they're not very complicated). I already had that in mind, but didn't find the time to upstream it yet ... |
Beta Was this translation helpful? Give feedback.
-
I think another popular case would be button-like widgets that don't have a text, but show a simple icon and can be clicked to trigger a particular action. There is already a |
Beta Was this translation helpful? Give feedback.
-
Refactoring in #2370 |
Beta Was this translation helpful? Give feedback.
-
I now made a new refactoring in #2377. That separate @janusw I think, the The most difficult part is the layout. What do you do, if the |
Beta Was this translation helpful? Give feedback.
-
Do you think, that it would be better to have |
Beta Was this translation helpful? Give feedback.
-
I now change PositionX and PositionY to a MPoint Position. MarginX and MarginY changed to a MRect Marging with left, top, right and bottom. The same with PaddingX and PaddingY which also move to a MRect Padding. |
Beta Was this translation helpful? Give feedback.
-
@janusw I saw today, that we have also a |
Beta Was this translation helpful? Give feedback.
-
I'm started a rework of the widgets, but need some input.
I made some assumptions about widgets. If they aren't ok, then complain about them.
Any further suggestions?
Beta Was this translation helpful? Give feedback.
All reactions