I would appreciate it if some of the Qt experts would fix the centering
of Opder.pl and Selector.pl -- I'm only fixing the perl-Tk code.

If it's of any value, here's the perl-Tk code I'm using for centering a
window:

  $w = window-to-be-centered;

  $p = $w->parent();
  $w->withdraw if $w->viewable();
  $w->idletasks;
  my $x = int( ($w->screenwidth - $w->reqwidth)/2 );
  my $y = int( ($w->screenheight - $w->reqheight)/2 );
  if( $p ) {
    $x -= int( $p->vrootx/2 ) if $p->vrootx;
    $y -= int( $p->vrooty/2 ) if $p->vrooty;
  }
  $w->geometry( "+$x+$y" );
  $w->deiconify;

I just typed this in by hand, so don't squabble about any typos here,
the actual code works.

-- 
David N. Lombard
 
My comments represent my opinions, not those of Intel Corporation.


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Oscar-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/oscar-devel

Reply via email to