Opened 7 years ago

Closed 7 years ago

#15702 closed enhancement (invalid)

AUI Toolbar Gripper Rendering Incorrectly

Reported by: RobertBColton Owned by:
Priority: normal Milestone: 3.0.1
Component: wxAui Version: 3.0.0
Keywords: toolbar art provider gripper Cc:
Blocked By: Blocking:
Patch: no

Description

The bullet points on the wxAuiToolBar are rendering each little pixel separately instead of just two colored rectangles as proper Windows Forms grippers should do. The fix is easy and just needs the code entered into wxAuiDefaultToolBarArt::DrawGripper

Inside src/aui/auibar.cpp this code should be changed...

        dc.SetPen(m_gripperPen1);
        dc.DrawPoint(x, y);
        dc.SetPen(m_gripperPen2);
        dc.DrawPoint(x, y+1);
        dc.DrawPoint(x+1, y);
        dc.SetPen(m_gripperPen3);
        dc.DrawPoint(x+2, y+1);
        dc.DrawPoint(x+2, y+2);
        dc.DrawPoint(x+1, y+2);

To the following...

	dc.SetPen(m_gripper_pen3);
        dc.DrawRectangle(x+1, y+1, 2, 2);
        dc.SetPen(m_gripper_pen1);
	dc.DrawRectangle(x, y, 2, 2);
        dc.SetPen(m_gripper_pen2);

Attachments (1)

auibar.cpp download (79.6 KB) - added by RobertBColton 7 years ago.
Source file with the patch to the gripper rendering method applied.

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by RobertBColton

Source file with the patch to the gripper rendering method applied.

comment:1 Changed 7 years ago by RobertBColton

Actually, ...
m_gripper_pen1
should be...
m_gripperPen1

I got mixed up between an old SVN >:

comment:2 in reply to: ↑ description Changed 7 years ago by RobertBColton

Replying to RobertBColton:

The bullet points on the wxAuiToolBar are rendering each little pixel separately instead of just two colored rectangles as proper Windows Forms grippers should do. The fix is easy and just needs the code entered into wxAuiDefaultToolBarArt::DrawGripper

Inside src/aui/auibar.cpp this code should be changed...

        dc.SetPen(m_gripperPen1);
        dc.DrawPoint(x, y);
        dc.SetPen(m_gripperPen2);
        dc.DrawPoint(x, y+1);
        dc.DrawPoint(x+1, y);
        dc.SetPen(m_gripperPen3);
        dc.DrawPoint(x+2, y+1);
        dc.DrawPoint(x+2, y+2);
        dc.DrawPoint(x+1, y+2);

To the following...

	dc.SetPen(m_gripperPen3);
        dc.DrawRectangle(x+1, y+1, 2, 2);
        dc.SetPen(m_gripperPen1);
	dc.DrawRectangle(x, y, 2, 2);
        dc.SetPen(m_gripper_pen2);

comment:3 in reply to: ↑ description Changed 7 years ago by RobertBColton

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

Replying to RobertBColton:

The bullet points on the wxAuiToolBar are rendering each little pixel separately instead of just two colored rectangles as proper Windows Forms grippers should do. The fix is easy and just needs the code entered into wxAuiDefaultToolBarArt::DrawGripper

Inside src/aui/auibar.cpp this code should be changed...

        dc.SetPen(m_gripperPen1);
        dc.DrawPoint(x, y);
        dc.SetPen(m_gripperPen2);
        dc.DrawPoint(x, y+1);
        dc.DrawPoint(x+1, y);
        dc.SetPen(m_gripperPen3);
        dc.DrawPoint(x+2, y+1);
        dc.DrawPoint(x+2, y+2);
        dc.DrawPoint(x+1, y+2);

To the following...

	dc.SetPen(m_gripper_pen3);
        dc.DrawRectangle(x+1, y+1, 2, 2);
        dc.SetPen(m_gripper_pen1);
	dc.DrawRectangle(x, y, 2, 2);
        dc.SetPen(m_gripper_pen2);
Note: See TracTickets for help on using tickets.