Opened 3 years ago

Closed 18 months ago

#12754 closed defect (fixed)

[wxOSX-Cocoa] wxNotebook doesn't display icons

Reported by: jdiogo Owned by: csomor
Priority: normal Milestone:
Component: wxOSX-Cocoa Version: stable-latest
Keywords: wxNotebook, images, cocoa Cc: jndiogo@…
Blocked By: Blocking:
Patch: yes

Description

Images added to a wxNotebook with AssignImageList are not being displayed.
The attached image shows a previous carbon build where images are displayed and a current cocoa build where they don't.

Attachments (2)

no-icons-notebook.png download (12.4 KB) - added by jdiogo 3 years ago.
osx_cocoa_notebook_tabimages.patch download (3.3 KB) - added by mmacleod 2 years ago.
Patch to implement image support for osx cocoa notebook tabs

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by jdiogo

comment:1 Changed 3 years ago by vadz

  • Milestone 2.9.2 deleted

I guess this can be seen in the notebook sample too?

comment:2 Changed 3 years ago by jdiogo

Exactly - the notebook sample is also not displaying images for each tab.

comment:3 Changed 3 years ago by jdiogo

  • Cc jndiogo@… added

comment:4 Changed 2 years ago by mmacleod

  • Patch set

Attaching a patch I have used to implement notebook icon support on cocoa, most of the code is copied straight from the old cocoa port, and appears to work unchanged.

I know very little about objc or the cocoa APIs but from my limited understanding everything seems to be okay - I don't know if there is some better way to implement this, but seeing as this has been broken for over a year now with no interest from anyone I think it would be pragmatic to do it this way for now and implement a more ideal way (if there is one) later.

Changed 2 years ago by mmacleod

Patch to implement image support for osx cocoa notebook tabs

comment:5 Changed 2 years ago by csomor

  • Owner set to csomor
  • Status changed from new to accepted

comment:6 Changed 18 months ago by vadz

This doesn't work for the left/right tab orientation but it looks like it ought to be relatively simple to fix (just pass the orientation somehow to WXCTabViewImageItem and then take it into account in sizeOfLabel and drawLabel), and this is already much better than nothing so I'll apply this soon, thanks!

comment:7 Changed 18 months ago by VZ

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

(In [72807]) Implement image support for wxNotebook pages in wxOSX/Cocoa.

This currently doesn't work correctly for left/right orientations but at least
it does work for the default top (and also bottom) one.

Closes #12754.

Note: See TracTickets for help on using tickets.