Opened 19 months ago

Closed 18 months ago

Last modified 18 months ago

#14710 closed defect (fixed)

Bad wxAuiNotebook child position (theming problem ?)

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

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 (5)

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

Download all attachments as: .zip

Change History (23)

Changed 19 months ago by EmilienKia

Changed 19 months ago by EmilienKia

comment:1 follow-up: Changed 19 months ago by vadz

  • Cc jens added

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

comment:2 in reply to: ↑ 1 Changed 19 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.

comment:3 Changed 19 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.

comment:4 Changed 19 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.

comment:5 Changed 19 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?

comment:6 Changed 19 months ago by mmacleod

Think you can go ahead on this one, thanks.

comment:7 Changed 19 months ago by vadz

  • Milestone 2.9.5 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 19 months ago by jens

updated patch, fix Gdk-CRITICAL

comment:8 Changed 19 months ago by jens

The updated patch should fix this issue.

Sorry for the inconvenience.

Jens

comment:9 Changed 19 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(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 18 months ago by LukasK

comment:10 Changed 18 months ago by LukasK

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

comment:11 Changed 18 months ago by LukasK

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:12 Changed 18 months ago by vadz

  • Keywords regression added
  • Milestone set to 2.9.5
  • Status changed from reopened to confirmed

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.

comment:13 Changed 18 months ago by jens

I can look into it this evening.

comment:14 Changed 18 months ago by jens

A little later, but this patch fixes the issue.

Changed 18 months ago by jens

Fix for regression introduced in 72641.

comment:15 Changed 18 months ago by LukasK

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

comment:16 follow-up: Changed 18 months ago by vadz

Thanks Jens!

Should this be also applied to the dynamic notebook branch?

comment:17 Changed 18 months ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(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.

comment:18 in reply to: ↑ 16 Changed 18 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.