Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005174 [JEDI VCL] 00 JVCL Components tweak always 2010-02-20 09:57 2011-06-10 16:09
Reporter tetardd View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.39
Summary 0005174: JvArrowButton: arrwo draw one pixel too much on the right
Description In themed app in Windows XP (not tried on other config.), the arrow is drawn one pixel too much on the right.

Reproduce:
Place JvArrowButton on form.
Make sure it's themed.
Set ArrwoWidth to 15 or 16.
Do a screen capture and zoom arrow part of control.

The arrow touched the button border on the left but is 2 pixels away from right border. Should have 1 pixel gap on both side.

Proposed fix: Add +1 to the drawline's coordinated:

procedure TJvArrowButton.Paint;
...
{ Draw arrow }
  while PaintRect.Left < PaintRect.Right + 1 do
  begin
    DrawLine(Canvas, PaintRect.Left + 1, PaintRect.Bottom, PaintRect.Right + 1, PaintRect.Bottom);
    InflateRect(PaintRect, -1, 1);
  end;
Additional Information
Tags No tags attached.
Attached Files ? file icon jvArrowButton.bmp [^] (188,054 bytes) 2010-03-13 13:56
? file icon jvArrowButton (Zoomed).bmp [^] (167,670 bytes) 2010-03-13 13:58

- Relationships

-  Notes
(0017272)
obones (administrator)
2010-03-09 11:05

Please provide the zipped sources of a sample application showing this.
Your proposed fix does not take into account the presence or absence of themes
(0017293)
tetardd (reporter)
2010-03-09 13:52

I will but you can try for yourself in double quick time.
Create a VCL form, add a JvArrowButton button and look at the screen.
Switch Theming on.

Note: if it's theme dependant, have a test for theme being enabled for the control and draw as you currently do without theming and as I suggest when themed.
(0017301)
tetardd (reporter)
2010-03-13 14:01

Attached are two screen captures (one zoomed for clarity).
From top to bottom:

1- Current jvArrowButton (themed) showing the arrow being drawn one pixel too much to the left.
2- My proposed fix (themed) showing the arrow now being perfectly centered.
3- My porposed fix (not themed) showing that my fix works from non-themed controls too.
(0017305)
AHUser (developer)
2010-03-16 22:16

Fixed in SVN.

- Issue History
Date Modified Username Field Change
2010-02-20 09:57 tetardd New Issue
2010-03-09 11:05 obones Note Added: 0017272
2010-03-09 11:05 obones Status new => feedback
2010-03-09 13:52 tetardd Note Added: 0017293
2010-03-13 13:56 tetardd File Added: jvArrowButton.bmp
2010-03-13 13:58 tetardd File Added: jvArrowButton (Zoomed).bmp
2010-03-13 14:01 tetardd Note Added: 0017301
2010-03-16 22:16 AHUser Note Added: 0017305
2010-03-16 22:16 AHUser Status feedback => resolved
2010-03-16 22:16 AHUser Fixed in Version => Daily / SVN
2010-03-16 22:16 AHUser Resolution open => fixed
2010-03-16 22:16 AHUser Assigned To => AHUser
2011-06-10 16:09 obones Fixed in Version Daily / SVN => 3.40


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker