Opened 2 years ago

Closed 4 months ago

Last modified 4 months ago

#14881 closed enhancement (fixed)

Use native renderer for drawing checkboxes in wxPopertyGrid

Reported by: eran Owned by: AW
Priority: low Milestone:
Component: wxPropertyGrid Version: 2.9.4
Keywords: wxPropertyGrid Cc:
Blocked By: Blocking:
Patch: yes

Description

Hi,

Attached is a patch that uses wxRendererNative instead of custom checkbox drawing to draw checkbox markers for the wxPropertyGrid class

The current drawing looks very un-professional, with the Renderer code, it is improved significantly

Attachments (2)

pg-editors.patch download (2.5 KB) - added by eran 2 years ago.
a patch that actually works on Windows / GTK
pg-patch3.patch download (3.0 KB) - added by eran 23 months ago.
Path with STATE_BOLD + made from root directory

Download all attachments as: .zip

Change History (7)

Changed 2 years ago by eran

a patch that actually works on Windows / GTK

comment:1 Changed 23 months ago by vadz

  • Milestone 2.9.5 deleted
  • Priority changed from normal to low
  • Status changed from new to confirmed
  • Summary changed from wxPopertyGrid: Patch for better checkbox drawing to Use native renderer for drawing checkboxes in wxPopertyGrid

It looks like we lose support for wxSCB_STATE_BOLD with this patch, is it really not important? Or should we perhaps draw the checkbox twice (offset by a pixel?) to support it?

Also, if you redo the patch, could you please make it from the root of wxWidgets directory or its parent? This makes applying it simpler. TIA!

Changed 23 months ago by eran

Path with STATE_BOLD + made from root directory

comment:2 Changed 4 months ago by AW

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

In 76895:

Use native renderer to draw check boxes in wxPG.

Use wxRendererNative procedure instead of custom check box drawing to get native look and feel of the check boxes in wxPG.

Closes #14881.

comment:3 in reply to: ↑ description Changed 4 months ago by awi

Replying to eran:

Attached is a patch that uses wxRendererNative instead of custom checkbox drawing to draw checkbox markers for the wxPropertyGrid class

Your patch has just been applied.
I made some modifications before applying it:

  • wxSCB_STATE_BOLD is mapped directly to the one of native states instead of using hack with double

drawing.

  • wxSCB_STATE_UNSPECIFIED is also mapped directly to the one of native states to clearly distinguish this state from wxSCB_STATE_UNCHECKED.

comment:4 Changed 4 months ago by awi

@Vadz,
Maybe this fix is significant/interesting enough to put some note about 'eran' and his/her patch in the change log?

comment:5 Changed 4 months ago by vadz

Sure, please feel free to do it depending on your judgement (BTW, @eran is already credited as Eran Ifrah for the other changelog entries).

Note: See TracTickets for help on using tickets.