From: Peter T. <pe...@us...> - 2004-05-03 11:49:23
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv868/run Modified Files: JvXPBar.pas Log Message: - Mantis #1719 (JvXPBar - border color and HeaderRounding property) Index: JvXPBar.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvXPBar.pas,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** JvXPBar.pas 2 May 2004 12:34:26 -0000 1.43 --- JvXPBar.pas 3 May 2004 11:49:13 -0000 1.44 *************** *** 18,22 **** Contributor(s):dejoy //dejoy 2004-4-20 ! --add groupindex,AutoCheck,checked property in TJvXPBarItem. --add GetItemClass in TJvXPBarItems. --add GetBarItemsClass in TJvXPCustomWinXPBar. --- 18,22 ---- Contributor(s):dejoy //dejoy 2004-4-20 ! --add GroupIndex,AutoCheck,Checked property in TJvXPBarItem. --add GetItemClass in TJvXPBarItems. --add GetBarItemsClass in TJvXPCustomWinXPBar. *************** *** 29,32 **** --- 29,38 ---- -- splitt ItemFrameColor to CheckedFrameColor , FocusedFrameColor in TJvXPBarColors. + Contributors(s):matej golob + //matej 2004-5-3 + --add property BorderColor in TJvXPBarColors. + --add property HeaderRounded + + You may retrieve the latest version of this file at the Project JEDI's JVCL home page, located at http://jvcl.sourceforge.net *************** *** 291,295 **** --- 297,303 ---- FGradientFrom: TColor; FSeparatorColor: TColor; + FBorderColor: TColor; FOnChange: TNotifyEvent; + procedure SetBorderColor(const Value: TColor); procedure SetBodyColor(const Value: TColor); procedure SetGradientFrom(const Value: TColor); *************** *** 305,308 **** --- 313,317 ---- procedure Change; published + property BorderColor: TColor read FBorderColor write SetBorderColor default clWhite; property CheckedColor: TColor read FCheckedColor write SetCheckedColor default dxColor_CheckedColorXP; property FocusedColor: TColor read FFocusedColor write SetFocusedColor default dxColor_FocusedColorXP; *************** *** 328,331 **** --- 337,341 ---- FGradientWidth: Integer; FHeaderFont: TFont; + FHeaderRounded: Boolean; FHitTest: TJvXPBarHitTest; FHotTrack: Boolean; *************** *** 380,383 **** --- 390,394 ---- function GetRollHeight: Integer; function GetRollWidth: Integer; + procedure SetHeaderRounded(const Value: Boolean); protected {$IFDEF VCL} *************** *** 413,416 **** --- 424,428 ---- property HeaderFont: TFont read FHeaderFont write SetHeaderFont stored IsFontStored; property HeaderHeight: Integer read FHeaderHeight write SetHeaderHeight default 28; + property HeaderRounded: Boolean read FHeaderRounded write SetHeaderRounded default True; property HotTrack: Boolean read FHotTrack write SetHotTrack default True; property HotTrackColor: TColor read FHotTrackColor write SetHotTrackColor default $00FF7C35; *************** *** 467,470 **** --- 479,483 ---- property HeaderFont; property HeaderHeight; + property HeaderRounded; property HotTrack; property HotTrackColor; *************** *** 847,851 **** begin Brush.Color := lBar.Colors.FocusedColor; ! if lBar.RoundedItemFrame>0 then RoundedFrame(ACanvas, Rect, lBar.Colors.FocusedFrameColor, lBar.RoundedItemFrame) else --- 860,864 ---- begin Brush.Color := lBar.Colors.FocusedColor; ! if lBar.RoundedItemFrame > 0 then RoundedFrame(ACanvas, Rect, lBar.Colors.FocusedFrameColor, lBar.RoundedItemFrame) else *************** *** 1326,1329 **** --- 1339,1343 ---- inherited Create; FBodyColor := $00F7DFD6; + FBorderColor := clWhite; FGradientFrom := clWhite; FGradientTo := $00F7D7C6; *************** *** 1423,1426 **** --- 1437,1449 ---- end; + procedure TJvXPBarColors.SetBorderColor(const Value: TColor); + begin + if FBorderColor <> Value then + begin + FBorderColor := Value; + Change; + end; + end; + procedure TJvXPBarColors.SetFocusedColor(const Value: TColor); begin *************** *** 1479,1482 **** --- 1502,1506 ---- FGradient := TBitmap.Create; FHeaderHeight := 28; + FHeaderRounded := True; FGradientWidth := 0; FHeaderFont := TFont.Create; *************** *** 2012,2028 **** { draw frame... } ! Brush.Color := clWhite; FrameRect({$IFDEF VisualCLX} Canvas, {$ENDIF} Rect); ! { ...with cutted edges } ! OwnColor := TJvXPWinControl(Parent).Color; ! Pixels[0, Rect.Top] := OwnColor; ! Pixels[0, Rect.Top + 1] := OwnColor; ! Pixels[1, Rect.Top] := OwnColor; ! Pixels[1, Rect.Top + 1] := clWhite; ! Pixels[Width - 1, Rect.Top] := OwnColor; ! Pixels[Width - 2, Rect.Top] := OwnColor; ! Pixels[Width - 1, Rect.Top + 1] := OwnColor; ! Pixels[Width - 2, Rect.Top + 1] := clWhite; { draw Button } --- 2036,2054 ---- { draw frame... } ! Brush.Color := FColors.fBorderColor; FrameRect({$IFDEF VisualCLX} Canvas, {$ENDIF} Rect); ! if FHeaderRounded then ! begin ! OwnColor := TJvXPWinControl(Parent).Color; ! Pixels[0, Rect.Top] := OwnColor; ! Pixels[0, Rect.Top + 1] := OwnColor; ! Pixels[1, Rect.Top] := OwnColor; ! Pixels[1, Rect.Top + 1] := FColors.fBorderColor; ! Pixels[Width - 1, Rect.Top] := OwnColor; ! Pixels[Width - 2, Rect.Top] := OwnColor; ! Pixels[Width - 1, Rect.Top + 1] := OwnColor; ! Pixels[Width - 2, Rect.Top + 1] := FColors.fBorderColor; ! end; { draw Button } *************** *** 2357,2360 **** --- 2383,2395 ---- end; + procedure TJvXPCustomWinXPBar.SetHeaderRounded(const Value: Boolean); + begin + if FHeaderRounded <> Value then + begin + FHeaderRounded := Value; + InternalRedraw; + end; + end; + end. |