[Angstrom-devel] [oe] [RFC] Smallscreen mod for GtkFileChooser
Stanislav Brabec
utx at penguin.cz
Thu Jan 10 18:57:59 CET 2008
Paul Sokolovsky wrote:
> > gdk_screen_width_mm() + gdk_screen_height_mm() <
> > MAGIC_CONSTANT_SUM_OF_SCREEN_EDGES_AROUND_150
> Before using this, one should know how gdk_screen_width_mm() gets
> its values and does it work for our (OE) devices. I don't know now the
> first answer,
Looking at the gtk+ source, it is in the platform specific part and
reads value directly from the backend (X) using WidthMMOfScreen and
HeightMMOfScreen.
> and pretty sure that answer to the second is "no". So,
> someone needs to test this first...
I think that kdrive supports it, because it accepts -dpi argument. For
example my Zaurus calls Xfbdev with -dpi 200.
> > or ration of screen size in pixels to default font size in pixels:
This second approach is DPI independent. It uses default font size as a
reference value instead:
> > gdk_screen_width() + gdk_screen_height() -
> > MAGIC_CONSTANT_VASTED_PIXELS_AROUND_84) /
> > pango_font_description_get_size (GTK_WIDGET
> > (impl)->style->font_desc) < MAGIC_CONSTANT_NUM_OF_CHARS_AROUND_70
> 3. Make cutoff inbetween and accept relayout implications.
>
> I've chosen 3rd. Have better ideas? Ok, let's just test it in practise on
> real devices a bit first, before calling for more changes. I'm sure they will
> be needed - after all, it's just the first iteration on that.
You can still use gdk_screen_width() + gdk_screen_height() as a trigger
to suppress some implications (rotation dependency).
You can use 1000 as a trigger value or a value a bit bigger - triggers
above 1120 will include 640x480 as well.
--
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus
More information about the Angstrom-distro-devel
mailing list