Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#11420 closed enhancement (fixed)

Support for themes on ownerdrawn menu

Reported by: malcompl Owned by: vadz
Priority: normal Milestone:
Component: wxMSW Version: stable-latest
Keywords: wxMenu Cc:
Blocked By: Blocking:
Patch: yes

Description

Patch added support for themes on ownerdrawn menu.
The menu looks like a native, but to ensure full compliance apperance with the native menu still missing a few things:

  • misalignment of accel text
  • draw correct std check/bullet mark if item is check/radio and bitmap is not set

I will be work on this problems in next separate patches.

Attachments (2)

uxmenu.patch download (35.9 KB) - added by malcompl 5 years ago.
calcpos.patch download (3.7 KB) - added by malcompl 5 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 5 years ago by vadz

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

Thanks for the patch, before looking at it: do I understand correctly that it's for the "owerdraw" branch (and not for the trunk)?

comment:2 Changed 5 years ago by malcompl

Yes, it's for the "ownerdraw-refactor" branch.

Changed 5 years ago by malcompl

comment:3 Changed 5 years ago by malcompl

Correct small bug and added support for pseudo menu themes on Windows XP.

comment:4 Changed 5 years ago by vadz

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

Applied with a couple of very minor changes, thanks (and sorry for the delay).

Looking forward to the next patches and to merging the ownerdraw-refactor branch into trunk!

comment:5 Changed 5 years ago by malcompl

  • Resolution fixed deleted
  • Status changed from closed to reopened

Small patch for resolve the 2 problems:

  • The text is one pixel too low in owner-drawn case.
  • The check mark is one pixel too high.

Changed 5 years ago by malcompl

comment:6 Changed 5 years ago by VZ

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

(In [62721]) Fix off by 1 errors in owner-drawn menu drawing code in wxMSW.

The label was offset by 1 pixel vertically and the check marks were 1 pixel
too wide compared to the native ones under XP, correct this.

Closes #11420 (again).

comment:7 Changed 4 years ago by VZ

(In [63223]) Use theme functions for drawing owner-drawn menus.

This makes the menu items with custom attributes or bitmaps look more native,
especially on post-XP systems.

Closes #11420.

comment:8 Changed 4 years ago by VZ

(In [63227]) Fix off by 1 errors in owner-drawn menu drawing code in wxMSW.

The label was offset by 1 pixel vertically and the check marks were 1 pixel
too wide compared to the native ones under XP, correct this.

Closes #11420 (again).

Note: See TracTickets for help on using tickets.