Discussion:
[Bitpim-devel] Screen positioning code
Roger Binns
2004-09-02 04:32:46 UTC
Permalink
Does anyone want to have a crack at updating the screen positioning
code? It is nicely self contained and has very visible effects.

There main function that needs looking at is guiwidgets.set_size

wxPython 2.4 only knew about one screen so the values that get
returned only correspond to that one screen.

I think the code should do the following:

- cater for multiple screens (the initial size can be
based on the default screen)
- ensure the entire window is on the display initially
by moving it, and if too large then resizing it

I probably have the worst case setup for this.

wx.Display.GetCount() = 2

wx.Display(0).GetGeometry() = wx.Rect(1600, 88, 1280, 1024)

wx.Display(1).GetGeometry() = wx.Rect(0, 0, 1600, 1200)

And wx.Display(1) is actually my primary screen.

Fortunately wx.Display.GetPoint() can be used to determine
if a particular coordinate is on any screen.

Roger

Loading...