Ticket #14710 (closed defect: fixed)

Opened 8 months ago

Last modified 7 months ago

Bad wxAuiNotebook child position (theming problem ?)

Reported by: EmilienKia Owned by:
Priority: normal Milestone: 2.9.5
Component: wxAui Version: 2.9-svn
Keywords: wxAuiNotebook regression Cc: jens, mmacleod@…
Blocked By: Patch: yes
Blocking:

Description

Hi all,

This is a little problem of theming with wxAuiNotebook on Linux (wxAuiGtkTabArt): child windows are not well placed relative to theme. They use all available width without letting space to border theme.

The problem is visible on screenshots (AUI sample versus Pluma/Gedit).

Best regards,

Emilien

Attachments

wxAUI Sample Application.png download (78.0 KB) - added by EmilienKia 8 months ago.
Pluma.png download (25.5 KB) - added by EmilienKia 8 months ago.
wxAuiNotebook_native_paneborder.patch download (10.1 KB) - added by jens 8 months ago.
updated patch, fix Gdk-CRITICAL
r72641-refresh-glitch-win7.png download (22.3 KB) - added by LukasK 7 months ago.
fix_for_regression_introduced_in_72641.patch download (4.8 KB) - added by jens 7 months ago.
Fix for regression introduced in 72641.

Change History

Changed 8 months ago by EmilienKia

Changed 8 months ago by EmilienKia

follow-up: ↓ 2   Changed 8 months ago by vadz

  • cc jens added

Just adding jens to the cc in the hope he might be able to look at this.

in reply to: ↑ 1   Changed 8 months ago by jens

Replying to vadz:

Just adding jens to the cc in the hope he might be able to look at this.

I will look into it.

  Changed 8 months ago by jens

Just for the record:
It's not a tabart(gtk) problem.
The tabart-classes draw the tab-control, but not the part that contains the pane assigend to the tab.

Changes have to be done in the dockart, floatpane and framemanager sources.
I think it should be possible to add something like dockartgtk.

But this will (most likely) take a little longer, than just fixing existing drawing code in tabartgtk.

Nevertheless: I start working on it.

  Changed 8 months ago by jens

  • patch set

I attach a patch, that fixes the described issue.
The patch let the notebooks render the pan-border themselves, instead of doing this in dockart.cpp.
The size of the tab's content-window will be decreased accordingly.

  Changed 8 months ago by vadz

  • cc mmacleod@… added
  • milestone set to 2.9.5

Looks fine to me, thanks!

Malcolm, OK to apply or would you prefer to wait for your merge/include this in it?

  Changed 8 months ago by mmacleod

Think you can go ahead on this one, thanks.

  Changed 8 months ago by vadz

  • milestone deleted

Unfortunately applying the patch results in the following when running aui sample under Linux:

(auidemo:12421): Gdk-CRITICAL **: gdk_drawable_get_depth: assertion `GDK_IS_DRAWABLE (drawable)' failed

(auidemo:12421): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed

(auidemo:12421): Gdk-CRITICAL **: gdk_drawable_get_depth: assertion `GDK_IS_DRAWABLE (drawable)' failed

(auidemo:12421): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed

(auidemo:12421): Gdk-CRITICAL **: gdk_drawable_get_depth: assertion `GDK_IS_DRAWABLE (drawable)' failed

(auidemo:12421): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed

(auidemo:12421): Gdk-CRITICAL **: gdk_drawable_get_depth: assertion `GDK_IS_DRAWABLE (drawable)' failed

(auidemo:12421): Gtk-CRITICAL **: gtk_paint_box: assertion `style->depth == gdk_drawable_get_depth (window)' failed

Could you please look into this Jens? TIA!

Changed 8 months ago by jens

updated patch, fix Gdk-CRITICAL

  Changed 8 months ago by jens

The updated patch should fix this issue.

Sorry for the inconvenience.

Jens

  Changed 8 months ago by VZ

  • status changed from new to closed
  • resolution set to fixed

(In [72641]) Improve wxAuiNotebook appearance when using some GTK themes.

Let wxAuiNotebook render the border itself, instead of doing it in dock art
class. This allows the notebook to do it correctly for the current theme.

Closes #14710.

Changed 7 months ago by LukasK

  Changed 7 months ago by LukasK

Attached a screenshot of an error occuring in my application on Windows 7 after r72641.

  Changed 7 months ago by LukasK

  • status changed from closed to reopened
  • resolution deleted

  Changed 7 months ago by vadz

  • keywords regression added
  • status changed from reopened to confirmed
  • milestone set to 2.9.5

I don't see this immediately on sample startup but I do see it if I reduce and increase back the main window height in the aui sample.

  Changed 7 months ago by jens

I can look into it this evening.

  Changed 7 months ago by jens

A little later, but this patch fixes the issue.

Changed 7 months ago by jens

Fix for regression introduced in 72641.

  Changed 7 months ago by LukasK

The patch (fix_for_regression_introduced_in_72641.patch) removed the refresh problem in my application.
Thanks!

follow-up: ↓ 18   Changed 7 months ago by vadz

Thanks Jens!

Should this be also applied to the dynamic notebook branch?

  Changed 7 months ago by VZ

  • status changed from confirmed to closed
  • resolution set to fixed

(In [72720]) Fix border size computation in wxAuiTabArt.

Space was reserved for the borders even when it wasn't filled, resulting in
visual artefacts. Fix this by virtualizing the function returning the
additional space needed for the borders and only overriding it to return non
zero in wxAuiGtkTabArt.

Closes #14710.

in reply to: ↑ 16   Changed 7 months ago by jens

Replying to vadz:

Thanks Jens!

Should this be also applied to the dynamic notebook branch?

No, it is not included in the branch and needs to be reimplemented.

Note: See TracTickets for help on using tickets.