Re: A plea for some fore thought.... (was Re: calendar questions)



You can get the screen res with GDK with the following functions:
  gint gdk_screen_width  (void);
  gint gdk_screen_height (void);

And if the X server has been set up correctly, you should be able to get
the real world size of the screen with the following two:
  gint gdk_screen_width_mm  (void);
  gint gdk_screen_height_mm (void);

With these it would be possible to work out a suitable size for the apps.
Part of the problem would be the size of the widgets on such a small
screen.  Maybe having a `tiny theme' for GTK, which would have reduced
size widgets and fonts would help.

So it is possible to take screen size into account, but I am not sure how
easy it would be to actually make the apps resize.

James Henstridge.

--
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/


On Tue, 23 Mar 1999, Havoc Pennington wrote:

> 
> On Tue, 23 Mar 1999, Jim Gettys wrote:
> > 
> > I second the complaint...  Or rather, this is a polite request for people
> > to start thinking about how things can be made to work on small displays;
> > in particular, I'm thinking along the lines of PDA displays...
> >
> 
> Jim, you should know the answer to this question: how does one even find
> out how big the display is? Does X provide a way? 
>  
> Unfortunately the hooks we would need in Gtk to adapt to screen size
> aren't there I don't think. Probably Gtk should pick its default font size
> based on screen size, allowing gtkrc to override; but the real problem is
> that there's no way to know how large one's app window is going to be. If
> you did know, you could gtk_window_set_default_size() in the case where it
> was too large. Alternatively, a gtk_window_max_size() could be added which 
> automatically clamped the default size to some maximum. Other than that,
> there's little to do; add scrollbars perhaps, reduce padding between
> widgets a little...
> 
> > Time to start rethinking GUI work; nice as Gnome is, I'd also like
> > some of the applications, at least, to be usable on such devices. I'm
> 
> For PalmPilot-size computing I think it actually makes little sense to use
> a smaller version of Gnome. PalmPilot applications are very different from
> the usual windows/mouse applications and that's why people like the
> device. However the "very small laptop" category could benefit.
> 
> For the PalmPilot sort of devices, I would say the correct route is to
> emphasize portability and toolkit independence in the application code.
> A nice example is AbiWord - they have 90% shared code across Gtk and
> Windows. So assuming you want a word processor on a PalmPilot,
> it's only a 10% job to write a new frontend. Actually more like 5% I'd
> guess - the "hard parts" and design work are in the backend.
> 
> For GnomeCal for example, all the file-format code, networking code,
> time-computation code, and data structure code could be shared. However
> you'd want to do the screen display differently or it would suck big time
> on one of those little handhelds... vice versa is true as well, I don't
> want some cramped touchpad interface on my 21-inch monitor.
> 
> This is the right way to write nontrivial applications anyway, since
> toolkits change and people change their mind about how they want the UI to
> work.
> 
> Havoc
> 
> 
> -- 
>         FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
>          To unsubscribe: mail gnome-list-request@gnome.org with 
>                        "unsubscribe" as the Subject.
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]