[KPhotoAlbum] [PATCH 2/3] SettingsData: Default window geometry calculated

Michael Witten mfwitten at MIT.EDU
Tue Sep 23 15:15:16 BST 2008


On 23 Sep 2008, at 3:16 AM, Henner Zeller wrote:

 > I like that this tries to create a width and height that
 > is appropriate  for the  screen. I'd like  to understand
 > more the implications of the  position on the screen; by
 > default we just returned the top-corner being 0/0 - does
 > that  mean  that  the  X-Window  manager  did  something
 > 'reasonable' (which  could be centered etc.),  while now
 > they're  forced  to center  the  screen  (don't have  my
 > development machine  here right  now to check).  If this
 > is  the  case, then  I'd  probably  suggest to  do  this
 > calculation only  on platforms that don't  have a decent
 > window  manager  (I  always  hate  if  the  applications
 > override   the  decent   placement  my   window  manager
 > suggests).

I  can't   answer  with  authority,  but   from  what  I
understand the X11 window managers take window positions
as hints  and then decide  where to put things  on their
own; so, yes, your window managers are making a decision,
I suppose.

On Mac OS  X, it seems to be more  absolute; using (0,0)
for the  top-left obscures  the window beneath  the menu-
bar  that is  always  visible at  the  top of  Macintosh
screens.

Perhaps we  can use (0,0)  when Q_WS_X11 is  defined (is
that  an official  macro?). However,  does (0,0)  really
provide a window  in a decent location  for X11 systems?
Is that a standard? Wouldn't it be better to give a more
specific hint?

 > Also:  you  have a  wierd  indentation.  Always do  four
 > spaces  per   indentation  level  -  you're   here  even
 > switching indentation within the same level...

Sorry,  I  meant to  use  deeper  indentation under  the
comment text,  but for whatever  reason I reverted  to a
shallower indentation towards the bottom of the function.

I will  make the  indentation shallow throughout  in the
next revision of this patch.





More information about the Kphotoalbum mailing list