Opened 14 months ago

Last modified 13 months ago

#15526 confirmed defect

Improve wxRendererGeneric::DrawTreeItemButton() appearance

Reported by: eran Owned by:
Priority: low Milestone:
Component: GUI-generic Version:
Keywords: renderer XP button Cc: eran.ifrah@…
Blocked By: Blocking:
Patch: no

Description

Hi,

When using Windows classic theme (i.e. no aero theme) the renderer used is the generic one. The problem is that the generic renderer draws the + / - buttons improperly

Attached is a screenshot that shows the wxDataView sample with the fix (before and after)
http://codelite.org/images/patch-before-after.png

It would be great if this patch can be applied to head (the patch was made against 295 stable sources)

Attachments (2)

renderg.patch download (1.1 KB) - added by eran 14 months ago.
plus_minus.png download (338 bytes) - added by tm 13 months ago.
Screenshot for problem

Download all attachments as: .zip

Change History (8)

Changed 14 months ago by eran

comment:1 Changed 14 months ago by vadz

  • Status changed from new to confirmed

Thanks, I'll apply it soon but as I had to do it manually because of

% g apply-trac http://trac.wxwidgets.org/raw-attachment/ticket/15526/renderg.patch

<stdin>:6: trailing whitespace.

<stdin>:7: trailing whitespace.
    // Make sure that the rect has an odd width + height
<stdin>:10: trailing whitespace.
    if ( (buttonRect.GetWidth() % 2) == 0 )
<stdin>:12: trailing whitespace.

<stdin>:13: trailing whitespace.
    if ( (buttonRect.GetHeight() % 2) == 0 )
error: patch failed: src\generic\renderg.cpp:468
error: src\generic\renderg.cpp: patch does not apply

please check that I didn't do anything stupid once it's committed. TIA!

comment:2 Changed 14 months ago by VZ

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

(In [74887]) Improve drawing of the tree item buttons in the generic renderer.

Draw the "-" and "+" signs always properly centered.

Closes #15526.

Changed 13 months ago by tm

Screenshot for problem

comment:3 Changed 13 months ago by tm

  • Resolution fixed deleted
  • Status changed from closed to reopened

The changes results in improperly drawn +/- signs when drawing small(standard/default?) size TreeItemButton (see attached screenshot).

comment:4 Changed 13 months ago by vadz

  • Component changed from base to GUI-generic
  • Status changed from reopened to confirmed

Thanks, for testing, this problem is indeed worse than the original one so I'll revert the patch if it can't be fixed in a better way.

comment:5 Changed 13 months ago by VZ

(In [75034]) Revert changes to the drawing of the tree item buttons in the generic renderer.

This reverts r74887 as this created problems when drawing them at standard
size.

See #15526.

comment:6 Changed 13 months ago by vadz

  • Milestone 3.0 deleted
  • Patch unset
  • Priority changed from normal to low
  • Summary changed from PATCH: a fix to wxRendererGeneric::DrawTreeItemButton ( expand / collapse button ) to Improve wxRendererGeneric::DrawTreeItemButton() appearance
Note: See TracTickets for help on using tickets.