View Issue Details

IDProjectCategoryView StatusLast Update
0003788JEDI VCL00 JVCL Componentspublic2007-12-24 06:38
ReporterbungleheadAssigned Toobones 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.34 
Summary0003788: VSNET Docking cosmetic
DescriptionTo make VSNET pagecontrol caption more NET-like I'd like to change close butoon a bit: draw it with Width = 2.
Additional InformationFrom JvDockVSNETStyle.pas:

procedure TJvDockVSNETTree.DrawCloseButton(Canvas: TCanvas;
  Zone: TJvDockZone; Left, Top: Integer);
var
  DrawRect: TRect;
  AZone: TJvDockVSNETZone;
  ColorArr: array [1..2] of TColor;
  ADockClient: TJvDockClient;
  AForm: TCustomForm;
  OldWidth: Integer;
begin
  if Zone <> nil then
  begin
    ADockClient := FindDockClient(Zone.ChildControl);
    if (ADockClient <> nil) and not ADockClient.EnableCloseButton then
      Exit;
    if Zone.ChildControl is TJvDockTabHostForm then
    begin
      AForm := TJvDockTabHostForm(Zone.ChildControl).GetActiveDockForm;
      if AForm <> nil then
      begin
        ADockClient := FindDockClient(AForm);
        if (ADockClient <> nil) and not ADockClient.EnableCloseButton then
          Exit;
      end;
    end;
    AZone := TJvDockVSNETZone(Zone);

    DrawRect.Left := Left + 6;
    DrawRect.Right := DrawRect.Left + 7;
    DrawRect.Top := Top + 3;
    DrawRect.Bottom := DrawRect.Top + 7;

    if AZone.CloseBtnState <> bsNormal then
    begin
      if AZone.CloseBtnState = bsUp then
      begin
        ColorArr[1] := clBlack;
        if GetActiveControl = AZone.ChildControl then
          ColorArr[2] := clBtnFace
        else
          ColorArr[2] := clWhite;
      end
      else
      if AZone.CloseBtnState = bsDown then
      begin
        ColorArr[1] := clBtnFace;
        ColorArr[2] := clBlack;
      end;
      Canvas.Pen.Color := ColorArr[1];
      Canvas.MoveTo(Left, Top + ButtonHeight);
      Canvas.LineTo(Left + ButtonWidth, Top + ButtonHeight);
      Canvas.LineTo(Left + ButtonWidth, Top);
      Canvas.Pen.Color := ColorArr[2];
      Canvas.LineTo(Left, Top);
      Canvas.LineTo(Left, Top + ButtonHeight);
    end;

    if AZone.CloseBtnState = bsDown then
      OffsetRect(DrawRect, 1, 1);

    if AZone.ChildControl = GetActiveControl then
      Canvas.Pen.Color := clWhite
    else
      Canvas.Pen.Color := clBlack;
    OldWidth := Canvas.Pen.Width;
    try
      Canvas.Pen.Width := 2;
      Dec(DrawRect.Left);
      Dec(DrawRect.Right);
      //bounds are adjusted a bit to keep button position
      Canvas.MoveTo(DrawRect.Left , DrawRect.Top);
      Canvas.LineTo(DrawRect.Right, DrawRect.Bottom);
      Canvas.MoveTo(DrawRect.Right, DrawRect.Top);
      Canvas.LineTo(DrawRect.Left, DrawRect.Bottom);
    finally
      Canvas.Pen.Width := OldWidth;
    end;
  end;
end;
TagsNo tags attached.

Activities

obones

2006-08-30 07:50

administrator   ~0010047

Please provide screen captures to show the diffrences you want to fix with this.

obones

2007-01-03 12:55

administrator   ~0010502

No news, this is closed until further notice

bunglehead

2007-03-07 12:50

reporter   ~0011295

Sorry for keep you waiting..a lot of work.
My only suggestion was to draw close button cross with 2 pixel width

2007-03-07 12:53

 

vsnetdock.bmp (178,142 bytes)
vsnetdock.bmp (178,142 bytes)

obones

2007-06-19 08:35

administrator   ~0013463

So what are the changes required and what does it look like now?

obones

2007-10-12 04:25

administrator   ~0013900

Can you answer my previous question ?

AHUser

2007-12-24 06:38

developer   ~0014094

Fixed in SVN

Issue History

Date Modified Username Field Change
2006-06-29 23:11 bunglehead New Issue
2006-08-30 07:50 obones Note Added: 0010047
2006-08-30 07:50 obones Status new => feedback
2007-01-03 12:55 obones Status feedback => resolved
2007-01-03 12:55 obones Resolution open => won't fix
2007-01-03 12:55 obones Assigned To => obones
2007-01-03 12:55 obones Note Added: 0010502
2007-03-07 12:50 bunglehead Status resolved => feedback
2007-03-07 12:50 bunglehead Resolution won't fix => reopened
2007-03-07 12:50 bunglehead Note Added: 0011295
2007-03-07 12:53 bunglehead File Added: vsnetdock.bmp
2007-06-19 08:35 obones Note Added: 0013463
2007-10-12 04:25 obones Note Added: 0013900
2007-12-24 06:38 AHUser Status feedback => resolved
2007-12-24 06:38 AHUser Fixed in Version => Daily / SVN
2007-12-24 06:38 AHUser Resolution reopened => fixed
2007-12-24 06:38 AHUser Note Added: 0014094