Hi, excuse me, I only want to leave a BTW note here. I thought it would be nice to base GUI layout on something like ALM. See [1], [2]. It is rather general and flexible basis and it's very easy to formulate such things like soft constraints or parent-child relations on top of it. It liberates developers of widgets from writing rearrangement function for each widget.
[1] http://aucklandlayout.sourceforge.net/ [2] http://www.crt.umontreal.ca/~pesant/Constraints/Papers/LutterothSW08.pdf 2013/4/22 Petr Koupý <[email protected]> > Hi, > > I noticed that Martin improved sophistication of grid widget and created > new canvas widget for the purposes of HelenOS logo. While the widgets > works well and provides nice new features, I am little bit worried about > our different comprehension of widget size constraints. > > The way I envisioned it is that widget_t constraints (*_min, *_ideal, > *_max) > are in fact soft constraints hinting the ergonomic range and ergonomic > optimum for that particular widget, i.e. the widget must be able to operate > and draw itself even outside of the ergonomic range when necessary. On the > other hand, arguments passed to widget->rearrange from widget's parent are > hard > constraints that must be satisfied in order to avoid visual artifacts. > The idea behind this is that widget can redistribute only so much space > among its children that was assigned to it from the parent. And the > redistribution logic can be driven by ergonomic size hints from children > as long as the hard constraint from parent is met. > > Currently, both grid and canvas widget do not follow the above policy, so > there are visual artifacts when you decrease the window size below a > certain > limit. Now, I am not saying that the policy I envisioned is necessarily the > best one - maybe it should be somehow prevented by better clipping support > from > drawing library, or maybe I am basing my ideas on wrong assumptions. I am > just > saying that the inconsistency should be removed and it should be decided > what > is the correct policy, so all widgets follow the same rules. > > Petr > > > _______________________________________________ > HelenOS-devel mailing list > [email protected] > http://lists.modry.cz/cgi-bin/listinfo/helenos-devel >
_______________________________________________ HelenOS-devel mailing list [email protected] http://lists.modry.cz/cgi-bin/listinfo/helenos-devel
