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
