PyAUI hint dock rectangle under Linux

Hi Andrea,

I tried the latest version of PyAUI under Linux. When I tear out a pane
and move it back so that I see the hint dock rectangle, that rectangle
is not all closed.

I uploaded a screen shot under:

  http://graf-danno.de/pyaui/pyaui.png

You see that on the left lower corner there is no hint dock rectangle.

Another issue is, that if I tear out the tree pane for example then tear
out the text pane and dock that text pane again, the floating tree pane
also jumps back and is docked next to the tree pane.

Cheers,

Guenter

Hello Gunter,

I tried the latest version of PyAUI under Linux. When I tear out a pane
and move it back so that I see the hint dock rectangle, that rectangle
is not all closed.

I uploaded a screen shot under:

http://graf-danno.de/pyaui/pyaui.png

Yeah, I tried the same thing with my ubuntu virtual machine and I get
the same result. There are a couple of wrong instructions around line
3970, which read:

            recta = pane.frame.GetRect()
                if wx.Platform == "__WXGTK__":
                    # wxGTK returns the client size, not the whole frame size
                    recta.width = rect.width + 15
                    recta.height = rect.height + 35
                    recta.Inflate(5, 5)

The correct instructions are:

             recta = pane.frame.GetRect()
                 if wx.Platform == "__WXGTK__":
                    # wxGTK returns the client size, not the whole frame size
                    recta.width = recta.width + 15
                    recta.height = recta.height + 25
                    recta.Inflate(5, 5)
                    #endif

I am not sure about the exact values of the two constants "15" and
"25"... they are derived from the fact that GTK returns the client
size and not the whole frame size. They seem to me accurate enough,
but you can change them if you want.

Another issue is, that if I tear out the tree pane for example then tear
out the text pane and dock that text pane again, the floating tree pane
also jumps back and is docked next to the tree pane.

Uhm... I have seen also this behaviour, and I have no idea why it's
working like that... the problem is, it happened also with the older
versions of PyAUI (meaning the original 0.9.2). I am quite stuck on
that because what I know about GTK tends to minus infinity. If someone
more skilled than me on GTK things could take a look at this issue I
am sure it will be quite easy to solve...

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

Andrea Gavana wrote:

Hello Gunter,

I tried the latest version of PyAUI under Linux. When I tear out a pane
and move it back so that I see the hint dock rectangle, that rectangle
is not all closed.

I uploaded a screen shot under:

http://graf-danno.de/pyaui/pyaui.png

Yeah, I tried the same thing with my ubuntu virtual machine and I get
the same result. There are a couple of wrong instructions around line
3970, which read:

           recta = pane.frame.GetRect()
               if wx.Platform == "__WXGTK__":
                   # wxGTK returns the client size, not the whole frame size
                   recta.width = rect.width + 15
                   recta.height = rect.height + 35
                   recta.Inflate(5, 5)

The correct instructions are:

            recta = pane.frame.GetRect()
                if wx.Platform == "__WXGTK__":
                   # wxGTK returns the client size, not the whole frame size
                   recta.width = recta.width + 15
                   recta.height = recta.height + 25
                   recta.Inflate(5, 5)
                   #endif

The height of the caption and thickness of the borders can vary greatly depending on the current theme and window style settings. (In fact it may interest you to know that the window decorations don't even belong to your app, but to the window manager, and are implemented as separate X-Windows.) You would probably be better off to calculate these values, based on the difference between the frame position and the screen coordinates of its client area. For example:

  >>> import wx
  >>> f = wx.Frame(None)
  >>> p = wx.Panel(f)
  >>> f.Show()
  True
  >>> f.GetPosition()
  wx.Point(769, 39)
  >>> f.ClientToScreen((0,0))
  wx.Point(773, 66)
  >>> f.ClientToScreen((0,0)) - f.GetPosition()
  wx.Point(4, 27)

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!