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
0001699 [JEDI VCL] 00 JVCL Components minor always 2004-04-26 02:27 2004-04-30 07:45
Reporter Dierk View Status public  
Assigned To user72
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0001699: JVLabel now again Bug 0001455
Description Since version 1.30, Thu Apr 15 08:33:52 2004 UTC,
JVLabel has same Bug reported in 0001455

Regards

Dierk
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0004077)
user72
2004-04-26 05:29

This is probably caused by 0001656. Try adding the following to the end of procedure TJvCustomLabel.Paint:

...
    if Angle = 0.0 then
      AdjustBounds;
  end;
end;

Please test using different values of Angle, WordWrap, Layout and Alignment both at design and run time and with and without images assigned.
(0004093)
Dierk (reporter)
2004-04-27 07:08

Peter,
I´ve tested the following lines at the end of paint routine.
===========================
    if Angle = 0.0 then
      AdjustBounds;
===========================
Now it works fine to me, too. I also tested several values of properties like angle, wordwrap.... ect. in design and runtime.

Btw. There is an additional tweak: Set Angle >0 and Autosize = false, you can´t see anything from label. (... but I don´t need this)
(0004094)
user72
2004-04-27 10:28

OK, thanks for reporting this. I will look into the Angle/AutoSize issue
(0004119)
user72
2004-04-28 14:31

The Angle/AUtosize problem is caused by Rect not being set in Paint, so change .Paint like this (changes in bold):

...
Rect := ClientRect;
    if Angle <> 0 then
      DrawAngleText(Rect, DT_EXPANDTABS or DT_WORDBREAK or Alignments[Alignment])
    else
    begin
// Rect := ClientRect;
      Inc(Rect.Left, FLeftMargin);
      Dec(Rect.Right, FRightMargin);
(0004121)
Dierk (reporter)
2004-04-29 03:50

Yep, now it works, too.

But another tweak is when autosize is set to true and then the angle is changing, there have to be an additional adjustbounds like in VisualCLX.

procedure TJvCustomLabel.SetAngle(Value: TJvLabelRotateAngle);
begin
  if FAngle <> Value then
  begin
    FAngle := Value;
    {*$IFDEF VisualCLX}
    FNeedsResize := Autosize;
    AdjustBounds;
    {*$ENDIF VisualCLX}
    Invalidate;
  end;
end;

BTW: ....and if angle is set, no shadowtext is drawn... (... but I don´t need this)
(0004124)
user72
2004-04-29 04:23

SetAngle issue committed to CVS. Looking at ShadowText...
(0004125)
user72
2004-04-29 05:09

OK, think I've got a solution for angled shadow as well. Committing to CVS
(0004131)
Dierk (reporter)
2004-04-29 12:27

Nice... but one little additional bug is there now... :)

But inc and dec by shadowsize instead of 1

      case ShadowPos of
        spLeftTop:
        begin
          Dec(ShadowX, ShadowSize);
          Dec(ShadowY, ShadowSize);
        end;
        spRightBottom:
        begin
          Inc(ShadowX, ShadowSize);
          Inc(ShadowY, ShadowSize);
        end;
        spLeftBottom:
        begin
          Dec(ShadowX, ShadowSize);
          Inc(ShadowY, ShadowSize);
        end;
        spRightTop:
        begin
          Inc(ShadowX, ShadowSize);
          Dec(ShadowY, ShadowSize);
        end;
      end;
(0004132)
user72
2004-04-29 13:57

Duh! Stupid mistake. Fixed
(0004140)
user72
2004-04-30 04:26

So, are we happy yet? Can I close this issue?
(0004142)
anonymous (viewer)
2004-04-30 05:18

Oh, Peter I´m really happy :)

Wonderful weather and wonderful JVLabel.
Now you can close this issue.
(0004143)
user72
2004-04-30 07:45

Nice weather here too, but a bit windy. Closing up (to the next time<g>).

- Issue History
Date Modified Username Field Change
2004-04-26 02:27 Dierk New Issue
2004-04-26 05:29 user72 Note Added: 0004077
2004-04-26 05:29 user72 Status new => feedback
2004-04-27 07:08 Dierk Note Added: 0004093
2004-04-27 10:28 user72 Note Added: 0004094
2004-04-28 14:31 user72 Note Added: 0004119
2004-04-29 03:50 Dierk Note Added: 0004121
2004-04-29 04:23 user72 Note Added: 0004124
2004-04-29 05:09 user72 Note Added: 0004125
2004-04-29 12:27 Dierk Note Added: 0004131
2004-04-29 13:57 user72 Note Added: 0004132
2004-04-30 04:26 user72 Note Added: 0004140
2004-04-30 05:18 anonymous Note Added: 0004142
2004-04-30 07:45 user72 Status feedback => resolved
2004-04-30 07:45 user72 Resolution open => fixed
2004-04-30 07:45 user72 Assigned To => user72
2004-04-30 07:45 user72 Note Added: 0004143


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