[Angstrom-devel] [oe] [RFC] Smallscreen mod for GtkFileChooser

Paul Sokolovsky pmiscml at gmail.com
Thu Jan 10 18:11:33 CET 2008


Hello Stanislav,

Thursday, January 10, 2008, 5:09:04 PM, you wrote:

> Koen Kooi wrote:

>> Florian Boor schreef:
>> >It would be better if the screen size is checked at runtime.
>> 
>> Screensize and DPI, otherwise you'll run into troubles with devices like
>> the neo where you have enough pixels, but not enough physical space and
>> at the other end of the spectrum video-walls where you have copious
>> amount of physical space, but not enough pixels.

> Looking at original Paul's patch:

> gdk_screen_width_mm() + gdk_screen_height_mm() <
> MAGIC_CONSTANT_SUM_OF_SCREEN_EDGES_AROUND_150

> or ration of screen size in pixels to default font size in pixels:

> 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

> (both are untested)

  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, and pretty sure that answer to the second is "no". So,
someone needs to test this first...


> From blog:

> Your magic constant is 490 pixels of screen width.So in 480x640 it
> will open reduced file chooser but in 640x480 it will use standard
> file chooser.Upstream gtk+ will require a lot of work to become
> really PDA friendly. File chooser is only one small step.

  So, I don't know about DPI stuff, but I know about pixel stuff - I
tested it in practice. As I should have had written in blog, I found that
standard dialog shows too little of filename size in VGA portrait
mode, but being pretty ok for landscape mode. That's why 480 + something
was chosen as a threshold. I fully understood that it leads to "paradox" ;-)
that rotating VGA screen would lead to the need of dialog relayout from
vertical to horizontal and vice-versa. I had 3 choices:

1. Make cutoff below 480. Results: too short of filename length shown.
2. Make cutoff above 640. Results: as I mentioned in blog, fullscreen
dialogs on big screens look unnatural.
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.


-- 
Best regards,
 Paul                            mailto:pmiscml at gmail.com




More information about the Angstrom-distro-devel mailing list