Opened 4 years ago

Last modified 4 years ago

#11479 infoneeded_new enhancement

Fixed accel alignment problem on owner-drawn menu

Reported by: malcompl Owned by:
Priority: normal Milestone: 2.9.1
Component: wxMSW Version: stable-latest
Keywords: wxMenu, wxOwnerDrawn Cc:
Blocked By: Blocking:
Patch: no

Description

Correction accel alignment on owner-drawn menu for more native look.

Attachments (1)

alignaccel.patch download (8.9 KB) - added by malcompl 4 years ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by malcompl

comment:1 Changed 4 years ago by VZ

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

(In [62712]) Correct alignment of menu accelerator strings in owner-drawn menus.

Draw them right-aligned as the native menus do.

Closes #11479.

comment:2 Changed 4 years ago by VZ

(In [63224]) Correct alignment of menu accelerator strings in owner-drawn menus.

Draw them right-aligned as the native menus do.

Closes #11479.

comment:3 Changed 4 years ago by rk

  • Patch unset
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version set to 2.9-svn

I don't see the accelerators being right-aligned in my application. The menu sample shows them left-aligned aswell when opening the "File/Standard items demo" menu.
I am on WinXP and have wxUSE_OWNER_DRAWN enabled. Maybe I am doing something wrong?

comment:4 Changed 4 years ago by vadz

  • Milestone set to 2.9.1
  • Status changed from reopened to confirmed

This bug can also be seen only under XP (and older systems, presumably). The accelerators are drawn correctly under Win7 but I do see the bug in the menu sample under XP.

comment:5 Changed 4 years ago by malcompl

This is not a bug, is a native behavior emulation, Windows without themes accelerators aligns to the left, with themes to right. See native menu in sample.

comment:6 Changed 4 years ago by rk

  • Status changed from confirmed to infoneeded_new

You are right. I realized that after investigating the problem described in #11657.
Although, this raises the question: Shouldn't it be possible to force a menu to be owner-drawn other than having to set an image or changing the color of one of its items. The problem is that if I have a menu bar I want all menus to look the same even if I don't use icons/colors in one of them. Maybe we should add a new style flag (wxMENU_OWNERDRAWN) to wxMenu to support that. This should probably become a new ticket.

Note: See TracTickets for help on using tickets.