[Sugar-devel] [PATCH sugar v2] Add Control Panel for proxy settings
Sascha Silbe
silbe at activitycentral.com
Mon Jan 30 08:32:02 EST 2012
Excerpts from Simon Schampijer's message of 2012-01-30 12:56:57 +0100:
> Following the recommendations in [1] I have been applying a workaround
> in GTK2 to get a better wrapping for the labels *.
I was about to ask whether we really need that complicated approach as
we don't change the layout dynamically. However, after some experiments,
it turns out there's no easier way, though I consider that a bug.
Namely, once you enable line wrapping using label.set_line_wrap(True),
the label no longer fills the entire horizontal space allocated to the
label by its parent with text (though it does _align_ within this space,
respecting label.set_alignment()). If you don't enable line wrapping,
the label will use all the allocated horizontal space to display the
text, but cut it off (as expected).
For the proxy settings this worked well enough because the text size
matched the fixed default size of the label reasonably well on all of
the systems I tested with.
> This leads to the following control panel [2] (much better than [3]).
> So adding the option will show the 'main'-section on an XO without
> scrolling, reducing the 'we need an extra section because of
> scrolling' argument to a minimum, scrolling should only be needed when
> there is a non-None proxy [4].
While configuring the proxy still requires scrolling, at least one would
be able to see that there's something to configure, i.e. the
discoverability concern would be addressed. It's by a rather tight
margin, though. On what systems did you test? I'm worried it might just
"fall off" the screen on tighter setups (smaller screen or larger font
size). Especially if the scrolled area is barely larger than the screen,
the scrollbar blends into the surroundings a bit too well.
Sascha
> [1] http://www.16software.com/blog/dynamic-label-wrapping-in-gtk
> [2] https://dev.laptop.org/~erikos/designs/proxy_none_2.png
> [3] https://dev.laptop.org/~erikos/designs/proxy_none.png
> [4] https://dev.laptop.org/~erikos/designs/proxy_automatic_2.png
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120130/2df4f573/attachment.pgp>
More information about the Sugar-devel
mailing list