More agw.aui testing

Hello (Andrea),

Did some more in depth testing on all three platforms and here are some more issues that I noticed.

All (GTK/OSX/MSW):

1) Split a notebook vertically by dragging one of the tabs from the main notebook down to the lower half. Then drag the sash upwards so that the bottom one takes up 75% or so of the area. Then take the tab from the lower one and try to drag it over the top notebook. The docking hint rectangle will sometimes overlap the toolbar.

2) The Firefox 2 style tabs don't look quite as nice as they do in the Flatnotebook. In the flat notebook they have a nice lighted gradient on them when they are selected, in the aui they are just a flat panel colour.

3) The Chrome style tabs look really out of place on all platforms with their default colour. That color works in Chrome because its using that colour in the rest of the interface and with its custom ui but when its with other native widgets (in a wx app) I think it would be better to use system colors by default.

···

----

Windows: (XP)

1) Dragging a floating pane over the window causes lots of background erase (ghosting) issues. If you enable the transparent drag option all the ghost images from dragging the pane go away.

2) When dragging an undocked toolbar it sometimes only draws the border around it and you can see through to the window behind.

3) The default inactive colour of the docked panes titlebars look strange with that blue colour. The regular aui has the grayish colour, which is similar to visual studio.

----

OSX:

1) Floating panes cannot be resized.

2) Docking a floating pane to make a notebook causes a wxDebug dialog to be shown with the following error:

CGBitmapContextCreate: invalid data bytes/row: should be at least 4 for 8 integer bits/component, 3 components, kCGImageAlphaNoneSkipFirst.
18:11:04: Debug: /BUILD/wxPython-src-2.8.9.2/src/mac/carbon/bitmap.cpp(242): assert "m_hBitmap" failed in Create(): Unable to create CGBitmapContext context

I tried debugging this some but haven't quite found what call is causing it. It happens just as the pane is dropped and right before the docked panel refreshes to show the new tab in it.

3 ) Dragging sash from bottom can be dragged past the toolbar area. (only checked on osx/gtk but guessing all are affected).

----

GTK:

1) When dragging a sash this happened (only happened once and wasn't able to find how to reproduce)

Traceback (most recent call last):
   File "/home/cody/agw/agw/aui/framemanager.py", line 8112, in OnMotion
     self.OnMotion_Resize(event)
   File "/home/cody/agw/agw/aui/framemanager.py", line 8287, in OnMotion_Resize
     self._currentDragItem = self._uiparts.index(self._action_part)
ValueError: list.index(x): x not in list

2) Initially undocking a window will place it ((0,0) + dock position) screen position away from the mouse position where it was undocked from.

3) The mouse capture seems to not be released when the mouse button is let up sometimes resulting in things being dragged after they where let go.

4) When a toolbar is undocked the area it was in is not refreshed until the left mouse button is released on the floating panel. Also causes drawing and refresh issues of the areas near where the toolbar was.

5) Fly out panes roll up and cut off half the close button and text in the panes titlebar. They also don't fold back out when moused over.

6) The VC8 style tabs draw lines where the tabs intersect can be seen through the tab in front of them.

Thanks,

Cody

Hi Cody and All,

    thank you for the deep testing you have made, it has been very
useful to me! I have answers to some of your questions, for others I
will need some suggestions or some more testing.

All (GTK/OSX/MSW):

1) Split a notebook vertically by dragging one of the tabs from the main
notebook down to the lower half. Then drag the sash upwards so that the
bottom one takes up 75% or so of the area. Then take the tab from the lower
one and try to drag it over the top notebook. The docking hint rectangle
will sometimes overlap the toolbar.

You will notice that also wx.aui has the same behaviour: you can see
it from the AuiNotebook demo in the wxPython demo. Anyway, I believe I
have fixed it, it seems to work correctly, at least on Windows XP. The
only case in which it doesn't is when you have an inactive tab in the
top notebook, as in that case wx.FindWindowAtPoint(pt) returns
AuiNotebook instead of the real window where the mouse is (a panel, in
the AUI demo). I believe it might be a bug/feature of
wx.FindWindowAtPoint.

2) The Firefox 2 style tabs don't look quite as nice as they do in the
Flatnotebook. In the flat notebook they have a nice lighted gradient on them
when they are selected, in the aui they are just a flat panel colour.

Yes, this was something I have left behind: can you try it now and see
if it is more consistent with FlatNotebook?

3) The Chrome style tabs look really out of place on all platforms with
their default colour. That color works in Chrome because its using that
colour in the rest of the interface and with its custom ui but when its with
other native widgets (in a wx app) I think it would be better to use system
colors by default.

Uhm, so what should I do with the Chrome tab art? Drop it? Modify its
tab bitmaps on the fly to respect the system colours?

----

Windows: (XP)

1) Dragging a floating pane over the window causes lots of background erase
(ghosting) issues. If you enable the transparent drag option all the ghost
images from dragging the pane go away.

I have implemented a very ugly hack for this, it shouldn't happen
anymore. Can you test it too, please?

2) When dragging an undocked toolbar it sometimes only draws the border
around it and you can see through to the window behind.

I think the previous comment applies also in this case... hopefully.

3) The default inactive colour of the docked panes titlebars look strange
with that blue colour. The regular aui has the grayish colour, which is
similar to visual studio.

I reverted back the colours in dockart.py as they are in wx.aui.

----

OSX:

1) Floating panes cannot be resized.

This is a bit strange: I explicitely set a wx.RESIZE_BORDER style to
AuiFloatingFrame if a pane can be resized. Does it mean that wxMAC is
ignoring the style?

2) Docking a floating pane to make a notebook causes a wxDebug dialog to be
shown with the following error:

CGBitmapContextCreate: invalid data bytes/row: should be at least 4 for 8
integer bits/component, 3 components, kCGImageAlphaNoneSkipFirst.
18:11:04: Debug: /BUILD/wxPython-src-2.8.9.2/src/mac/carbon/bitmap.cpp(242):
assert "m_hBitmap" failed in Create(): Unable to create CGBitmapContext
context

I tried debugging this some but haven't quite found what call is causing it.
It happens just as the pane is dropped and right before the docked panel
refreshes to show the new tab in it.

I can't comment on this because I can't test it: the starting point
where to look for a bug is for sure DoDropFloatingPane in
framemanager.py.

3 ) Dragging sash from bottom can be dragged past the toolbar area. (only
checked on osx/gtk but guessing all are affected).

This was a bug on all platforms when the AUI_MGR_LIVE_RESIZE style was
present. It should be fixed now.

----

GTK:

1) When dragging a sash this happened (only happened once and wasn't able to
find how to reproduce)

Traceback (most recent call last):
File "/home/cody/agw/agw/aui/framemanager.py", line 8112, in OnMotion
self.OnMotion_Resize(event)
File "/home/cody/agw/agw/aui/framemanager.py", line 8287, in
OnMotion_Resize
self._currentDragItem = self._uiparts.index(self._action_part)
ValueError: list.index(x): x not in list

I can't duplicate it here, but I'll do some more testing.

2) Initially undocking a window will place it ((0,0) + dock position) screen
position away from the mouse position where it was undocked from.

I think I found a solution, it works on my Virtual Machine here.

3) The mouse capture seems to not be released when the mouse button is let
up sometimes resulting in things being dragged after they where let go.

4) When a toolbar is undocked the area it was in is not refreshed until the
left mouse button is released on the floating panel. Also causes drawing and
refresh issues of the areas near where the toolbar was.

5) Fly out panes roll up and cut off half the close button and text in the
panes titlebar. They also don't fold back out when moused over.

6) The VC8 style tabs draw lines where the tabs intersect can be seen
through the tab in front of them.

These 4 issues are noted, but I don't have an answer at the moment.
For the fly-out panes, the behaviour of GTK and Windows Vista is odd:
I explicitely set the size of the floating frame to be:

min_size = self._mgr.GetArtProvider().GetMetric(AUI_DOCKART_CAPTION_SIZE) + \
                       2*wx.SystemSettings.GetMetric(wx.SYS_EDGE_Y)

Which should account for the caption size *and* the frame edges, but
both platforms sets a frame size which is way too small.
As for the GTK issues, I can't test AUI too much as my Virtual Machine
is terribly slow and frustrates all the attempts I'm making to find
solutions to the bugs you reported.

Again, thank you for your testing, please keep the bug reports coming
and, if you can, provide some more suggestions for improvements (or
possible feature requests).

Andrea.

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

···

On Wed, Apr 8, 2009 at 1:12 AM, Cody Precord wrote:

Hello,

All (GTK/OSX/MSW):

1) Split a notebook vertically by dragging one of the tabs from the main
notebook down to the lower half. Then drag the sash upwards so that the
bottom one takes up 75% or so of the area. Then take the tab from the lower
one and try to drag it over the top notebook. The docking hint rectangle
will sometimes overlap the toolbar.

You will notice that also wx.aui has the same behaviour: you can see
it from the AuiNotebook demo in the wxPython demo. Anyway, I believe I
have fixed it, it seems to work correctly, at least on Windows XP. The
only case in which it doesn't is when you have an inactive tab in the
top notebook, as in that case wx.FindWindowAtPoint(pt) returns
AuiNotebook instead of the real window where the mouse is (a panel, in
the AUI demo). I believe it might be a bug/feature of
wx.FindWindowAtPoint.

Confirmed as fixed. Guess I didn't notice this behavior before because I never use the aui toolbar.

2) The Firefox 2 style tabs don't look quite as nice as they do in the
Flatnotebook. In the flat notebook they have a nice lighted gradient on them
when they are selected, in the aui they are just a flat panel colour.

Yes, this was something I have left behind: can you try it now and see
if it is more consistent with FlatNotebook?

On my mac now when the tab is selected the text is not drawn at all (or is the same color as the tab?).

The disabled tab in the demo has the gradient on it but the rest are flat. Will try to double check on my other systems tomorrow.

3) The Chrome style tabs look really out of place on all platforms with
their default colour. That color works in Chrome because its using that
colour in the rest of the interface and with its custom ui but when its with
other native widgets (in a wx app) I think it would be better to use system
colors by default.

Uhm, so what should I do with the Chrome tab art? Drop it? Modify its
tab bitmaps on the fly to respect the system colours?

No, what I meant is that I think that it would be better to instead of having them be blue by default, paint them with the same default colors as the other tab styles use so that they fit in better in a wx app. Its definitely nice to have them as another choice of tab shapes.

----

Windows: (XP)

1) Dragging a floating pane over the window causes lots of background erase
(ghosting) issues. If you enable the transparent drag option all the ghost
images from dragging the pane go away.

I have implemented a very ugly hack for this, it shouldn't happen
anymore. Can you test it too, please?

Confirmed as fixed.

2) When dragging an undocked toolbar it sometimes only draws the border
around it and you can see through to the window behind.

I think the previous comment applies also in this case... hopefully.

Yes also fixed

3) The default inactive colour of the docked panes titlebars look strange
with that blue colour. The regular aui has the grayish colour, which is
similar to visual studio.

I reverted back the colours in dockart.py as they are in wx.aui.

Looks good, thanks.

----

OSX:

1) Floating panes cannot be resized.

This is a bit strange: I explicitely set a wx.RESIZE_BORDER style to
AuiFloatingFrame if a pane can be resized. Does it mean that wxMAC is
ignoring the style?

It would appear so. If I have time this weekend I will try to take a look at it.

3 ) Dragging sash from bottom can be dragged past the toolbar area. (only
checked on osx/gtk but guessing all are affected).

This was a bug on all platforms when the AUI_MGR_LIVE_RESIZE style was
present. It should be fixed now.

Yes, confirmed as fixed.

2) Initially undocking a window will place it ((0,0) + dock position) screen
position away from the mouse position where it was undocked from.

I think I found a solution, it works on my Virtual Machine here.

Confirmed as fixed.

These 4 issues are noted, but I don't have an answer at the moment.
For the fly-out panes, the behaviour of GTK and Windows Vista is odd:
I explicitely set the size of the floating frame to be:

Not sure if its related but I know that there are some subtle differences in the interpretation of the TextExtent on different platforms, some include the boxing region around the text and others do not so if any of the bounding for the AUI caption metric is using the text extent as a base for measurement it be a cause. Not so sure though because I would think this to be the same from wx's perspective on xp vs. vista. Anyway just an idea.

Thanks,

Cody

···

On Apr 8, 2009, at 11:13 AM, Andrea Gavana wrote: