You've already forked lazarus-ccr
tvplanit: Rename DrawingStyle dsNone to dsNoBorder. Fix dsBorder for all event views.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4900 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -25,9 +25,9 @@ object MainForm: TMainForm
|
|||||||
Height = 532
|
Height = 532
|
||||||
Top = 48
|
Top = 48
|
||||||
Width = 780
|
Width = 780
|
||||||
ActivePage = TabSettings
|
ActivePage = TabEvents
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabIndex = 4
|
TabIndex = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object TabEvents: TTabSheet
|
object TabEvents: TTabSheet
|
||||||
Caption = 'Events'
|
Caption = 'Events'
|
||||||
@ -52,6 +52,8 @@ object MainForm: TMainForm
|
|||||||
DataStore = VpBufDSDataStore1
|
DataStore = VpBufDSDataStore1
|
||||||
ControlLink = VpControlLink1
|
ControlLink = VpControlLink1
|
||||||
Color = clWindow
|
Color = clWindow
|
||||||
|
Font.Height = -12
|
||||||
|
ParentFont = False
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
TabStop = True
|
TabStop = True
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -60,8 +62,10 @@ object MainForm: TMainForm
|
|||||||
DayHeadAttributes.Color = clBtnFace
|
DayHeadAttributes.Color = clBtnFace
|
||||||
DayHeadAttributes.Font.Height = -13
|
DayHeadAttributes.Font.Height = -13
|
||||||
DayNameStyle = dsShort
|
DayNameStyle = dsShort
|
||||||
|
DayNumberFont.Height = -12
|
||||||
DrawingStyle = dsFlat
|
DrawingStyle = dsFlat
|
||||||
EventDayStyle = [fsItalic]
|
EventDayStyle = [fsItalic]
|
||||||
|
EventFont.Height = -12
|
||||||
LineColor = clGray
|
LineColor = clGray
|
||||||
TimeFormat = tf12Hour
|
TimeFormat = tf12Hour
|
||||||
OffDayColor = clSilver
|
OffDayColor = clSilver
|
||||||
@ -87,6 +91,8 @@ object MainForm: TMainForm
|
|||||||
DataStore = VpBufDSDataStore1
|
DataStore = VpBufDSDataStore1
|
||||||
ControlLink = VpControlLink1
|
ControlLink = VpControlLink1
|
||||||
Color = clWindow
|
Color = clWindow
|
||||||
|
Font.Height = -12
|
||||||
|
ParentFont = False
|
||||||
ParentShowHint = False
|
ParentShowHint = False
|
||||||
Align = alClient
|
Align = alClient
|
||||||
ReadOnly = False
|
ReadOnly = False
|
||||||
@ -95,6 +101,7 @@ object MainForm: TMainForm
|
|||||||
AllDayEventAttributes.BackgroundColor = clBtnShadow
|
AllDayEventAttributes.BackgroundColor = clBtnShadow
|
||||||
AllDayEventAttributes.EventBorderColor = cl3DDkShadow
|
AllDayEventAttributes.EventBorderColor = cl3DDkShadow
|
||||||
AllDayEventAttributes.EventBackgroundColor = clBtnFace
|
AllDayEventAttributes.EventBackgroundColor = clBtnFace
|
||||||
|
AllDayEventAttributes.Font.Height = -12
|
||||||
ShowEventTimes = False
|
ShowEventTimes = False
|
||||||
DrawingStyle = dsFlat
|
DrawingStyle = dsFlat
|
||||||
TimeSlotColors.Active = clWhite
|
TimeSlotColors.Active = clWhite
|
||||||
@ -238,15 +245,20 @@ object MainForm: TMainForm
|
|||||||
DataStore = VpBufDSDataStore1
|
DataStore = VpBufDSDataStore1
|
||||||
ControlLink = VpControlLink1
|
ControlLink = VpControlLink1
|
||||||
Color = clWindow
|
Color = clWindow
|
||||||
|
Font.Height = -12
|
||||||
|
ParentFont = False
|
||||||
AllDayEventAttributes.BackgroundColor = clWindow
|
AllDayEventAttributes.BackgroundColor = clWindow
|
||||||
AllDayEventAttributes.EventBorderColor = clGray
|
AllDayEventAttributes.EventBorderColor = clGray
|
||||||
AllDayEventAttributes.EventBackgroundColor = clBtnFace
|
AllDayEventAttributes.EventBackgroundColor = clBtnFace
|
||||||
|
AllDayEventAttributes.Font.Height = -12
|
||||||
DateLabelFormat = 'dddd, mmmm dd, yyyy'
|
DateLabelFormat = 'dddd, mmmm dd, yyyy'
|
||||||
DayHeadAttributes.Color = clBtnFace
|
DayHeadAttributes.Color = clBtnFace
|
||||||
DayHeadAttributes.DateFormat = 'dddd mmmm, dd'
|
DayHeadAttributes.DateFormat = 'dddd mmmm, dd'
|
||||||
DayHeadAttributes.Font.Height = -13
|
DayHeadAttributes.Font.Height = -13
|
||||||
DayHeadAttributes.Bordered = True
|
DayHeadAttributes.Bordered = True
|
||||||
DrawingStyle = dsFlat
|
DrawingStyle = dsFlat
|
||||||
|
EventFont.Height = -12
|
||||||
|
HeadAttributes.Font.Height = -12
|
||||||
HeadAttributes.Color = clBtnFace
|
HeadAttributes.Color = clBtnFace
|
||||||
LineColor = clGray
|
LineColor = clGray
|
||||||
TimeFormat = tf12Hour
|
TimeFormat = tf12Hour
|
||||||
|
@ -76,7 +76,7 @@ type
|
|||||||
DOMString = WideString;
|
DOMString = WideString;
|
||||||
|
|
||||||
{ miscellaneous stuff }
|
{ miscellaneous stuff }
|
||||||
TVpDrawingStyle = (dsFlat, ds3d, dsNone);
|
TVpDrawingStyle = (dsFlat, ds3d, dsNoBorder); // wp: rename dsNone --> dsNoBorder
|
||||||
|
|
||||||
{ event method types }
|
{ event method types }
|
||||||
TVpMouseWheelEvent = procedure(Sender: TObject; Shift: TShiftState;
|
TVpMouseWheelEvent = procedure(Sender: TObject; Shift: TShiftState;
|
||||||
|
@ -116,7 +116,7 @@ begin
|
|||||||
begin { Draw a 3d bevel }
|
begin { Draw a 3d bevel }
|
||||||
DrawBevelRect(RenderCanvas, R, BevelShadow, BevelHighlight);
|
DrawBevelRect(RenderCanvas, R, BevelShadow, BevelHighlight);
|
||||||
InflateRect(R, -1, -1);
|
InflateRect(R, -1, -1);
|
||||||
drawBevelRect(RenderCanvas, R, BevelDarkShadow, BevelFace);
|
DrawBevelRect(RenderCanvas, R, BevelDarkShadow, BevelFace);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -1143,7 +1143,7 @@ begin
|
|||||||
BevelShadow
|
BevelShadow
|
||||||
)
|
)
|
||||||
end else
|
end else
|
||||||
begin
|
if FDayView.DrawingStyle = dsFlat then begin
|
||||||
RenderCanvas.Pen.Color := BevelShadow;
|
RenderCanvas.Pen.Color := BevelShadow;
|
||||||
TPSMoveTo(RenderCanvas, Angle, RenderIn, R.Right - 6, R.Bottom- 1);
|
TPSMoveTo(RenderCanvas, Angle, RenderIn, R.Right - 6, R.Bottom- 1);
|
||||||
TPSLineTo(RenderCanvas, Angle, RenderIn, R.Left + 3, R.Bottom - 1);
|
TPSLineTo(RenderCanvas, Angle, RenderIn, R.Left + 3, R.Bottom - 1);
|
||||||
@ -1368,7 +1368,7 @@ begin
|
|||||||
RealLeft + 2 + RealRowHeadWidth,
|
RealLeft + 2 + RealRowHeadWidth,
|
||||||
RealBottom
|
RealBottom
|
||||||
);
|
);
|
||||||
if FDayView.DrawingStyle = dsFlat then
|
if FDayView.DrawingStyle <> ds3d then
|
||||||
inc(ARect.Left);
|
inc(ARect.Left);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1616,7 +1616,7 @@ begin
|
|||||||
{ Draw borders }
|
{ Draw borders }
|
||||||
tmpRect := Rect(RealLeft, RealTop, RealRight-1, RealBottom-1);
|
tmpRect := Rect(RealLeft, RealTop, RealRight-1, RealBottom-1);
|
||||||
if FDayView.DrawingStyle = dsFlat then begin
|
if FDayView.DrawingStyle = dsFlat then begin
|
||||||
{ Draw an outer and inner bevel - NO: no 3d effects in flat style! }
|
{ Draw a simple border }
|
||||||
DrawBevelRect(RenderCanvas, TPSRotateRectangle(Angle, RenderIn, tmpRect), BevelShadow, BevelShadow);
|
DrawBevelRect(RenderCanvas, TPSRotateRectangle(Angle, RenderIn, tmpRect), BevelShadow, BevelShadow);
|
||||||
end else
|
end else
|
||||||
if FDayView.DrawingStyle = ds3d then begin
|
if FDayView.DrawingStyle = ds3d then begin
|
||||||
|
@ -71,7 +71,7 @@ var
|
|||||||
begin
|
begin
|
||||||
R := Rect(RealLeft, RealTop, RealRight - 1, RealBottom - 1);
|
R := Rect(RealLeft, RealTop, RealRight - 1, RealBottom - 1);
|
||||||
if FMonthView.DrawingStyle = dsFlat then begin
|
if FMonthView.DrawingStyle = dsFlat then begin
|
||||||
{ draw an outer and inner bevel }
|
{ draw a simple rectangular border }
|
||||||
DrawBevelRect(
|
DrawBevelRect(
|
||||||
RenderCanvas,
|
RenderCanvas,
|
||||||
TPSRotateRectangle(Angle, RenderIn, R),
|
TPSRotateRectangle(Angle, RenderIn, R),
|
||||||
@ -110,15 +110,20 @@ begin
|
|||||||
RenderCanvas.Brush.Color := DayHeadAttrColor;
|
RenderCanvas.Brush.Color := DayHeadAttrColor;
|
||||||
|
|
||||||
{ build rect }
|
{ build rect }
|
||||||
if FMonthView.DrawingStyle = ds3D then begin
|
dhRect.Left := RealLeft;
|
||||||
dhRect.Left := RealLeft + 2;
|
dhRect.Top := RealTop + TVpMonthViewOpener(FMonthView).mvDayHeadHeight;
|
||||||
dhRect.Top := RealTop + TVpMonthViewOpener(FMonthView).mvDayHeadHeight + 3;
|
dhRect.Right := RealRight;
|
||||||
dhRect.Right := RealRight - 3;
|
dhRect.Bottom := dhRect.Top + TVpMonthViewOpener(FMonthView).mvDayHeadHeight;
|
||||||
|
if FMonthView.DrawingStyle = ds3d then begin
|
||||||
|
inc(dhRect.Left, 2);
|
||||||
|
inc(dhRect.Top, 3);
|
||||||
|
dec(dhRect.Right, 3);
|
||||||
dhRect.Bottom := dhRect.Top + TVpMonthViewOpener(FMonthView).mvDayHeadHeight;
|
dhRect.Bottom := dhRect.Top + TVpMonthViewOpener(FMonthView).mvDayHeadHeight;
|
||||||
TPSFillRect(RenderCanvas, Angle, RenderIn, dhRect);
|
TPSFillRect(RenderCanvas, Angle, RenderIn, dhRect);
|
||||||
R := TPSRotateRectangle(Angle, RenderIn, dhRect);
|
R := TPSRotateRectangle(Angle, RenderIn, dhRect);
|
||||||
DrawBevelRect(RenderCanvas, R, BevelHighlight, BevelDarkShadow);
|
DrawBevelRect(RenderCanvas, R, BevelHighlight, BevelDarkShadow);
|
||||||
end else begin
|
end else
|
||||||
|
if FMonthView.DrawingStyle = dsFlat then begin
|
||||||
dhRect.Left := RealLeft;
|
dhRect.Left := RealLeft;
|
||||||
dhRect.Top := RealTop + TVpMonthViewOpener(FMonthView).mvDayHeadHeight;
|
dhRect.Top := RealTop + TVpMonthViewOpener(FMonthView).mvDayHeadHeight;
|
||||||
dhRect.Right := RealRight;
|
dhRect.Right := RealRight;
|
||||||
@ -126,6 +131,10 @@ begin
|
|||||||
TPSFillRect(RenderCanvas, Angle, RenderIn, dhRect);
|
TPSFillRect(RenderCanvas, Angle, RenderIn, dhRect);
|
||||||
R := TPSRotateRectangle(Angle, RenderIn, dhRect);
|
R := TPSRotateRectangle(Angle, RenderIn, dhRect);
|
||||||
DrawBevelRect(RenderCanvas, R, BevelShadow, BevelShadow);
|
DrawBevelRect(RenderCanvas, R, BevelShadow, BevelShadow);
|
||||||
|
end else
|
||||||
|
begin
|
||||||
|
dhRect.Left := RealLeft;
|
||||||
|
TPSFillRect(RenderCanvas, Angle, RenderIn, dhRect);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
DayTag := Ord(FMonthView.WeekStartsOn);
|
DayTag := Ord(FMonthView.WeekStartsOn);
|
||||||
@ -727,7 +736,8 @@ begin
|
|||||||
TPSFillRect(RenderCanvas, Angle, RenderIn, HeadRect);
|
TPSFillRect(RenderCanvas, Angle, RenderIn, HeadRect);
|
||||||
R := TPSRotateRectangle(Angle, RenderIn, HeadRect);
|
R := TPSRotateRectangle(Angle, RenderIn, HeadRect);
|
||||||
DrawBevelRect(RenderCanvas, R, BevelHighlight, BevelDarkShadow);
|
DrawBevelRect(RenderCanvas, R, BevelHighlight, BevelDarkShadow);
|
||||||
end;
|
end else
|
||||||
|
TPSFillRect(RenderCanvas, Angle, RenderIn, HeadRect);
|
||||||
|
|
||||||
{ Position the spinner }
|
{ Position the spinner }
|
||||||
with TVpMonthViewOpener(FMonthView) do begin
|
with TVpMonthViewOpener(FMonthView) do begin
|
||||||
@ -739,9 +749,9 @@ begin
|
|||||||
|
|
||||||
{ Acquire startdate and end date }
|
{ Acquire startdate and end date }
|
||||||
HeadStr := FormatDateTime(FMonthView.DateLabelFormat, DisplayDate);
|
HeadStr := FormatDateTime(FMonthView.DateLabelFormat, DisplayDate);
|
||||||
{$IF FPC_FULLVERSION < 30000}
|
{$IFDEF FPC}{$IF FPC_FULLVERSION < 30000}
|
||||||
HeadStr := SysToUTF8(HeadStr);
|
HeadStr := SysToUTF8(HeadStr);
|
||||||
{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
|
|
||||||
{ Calculate the text rectangle }
|
{ Calculate the text rectangle }
|
||||||
RenderCanvas.Font.Assign(FMonthView.DayHeadAttributes.Font);
|
RenderCanvas.Font.Assign(FMonthView.DayHeadAttributes.Font);
|
||||||
|
@ -286,7 +286,7 @@ begin
|
|||||||
RenderCanvas.Font.Assign(FWeekView.DayHeadAttributes.Font);
|
RenderCanvas.Font.Assign(FWeekView.DayHeadAttributes.Font);
|
||||||
RenderCanvas.Brush.Color := RealDayHeadAttrColor;
|
RenderCanvas.Brush.Color := RealDayHeadAttrColor;
|
||||||
TPSFillRect(RenderCanvas, Angle, RenderIn, tmpRect);
|
TPSFillRect(RenderCanvas, Angle, RenderIn, tmpRect);
|
||||||
if FWeekView.DayHeadAttributes.Bordered then
|
if FWeekView.DayHeadAttributes.Bordered and (FWeekView.DrawingStyle <> dsNoBorder) then
|
||||||
TPSRectangle(RenderCanvas, Angle, RenderIn, tmpRect);
|
TPSRectangle(RenderCanvas, Angle, RenderIn, tmpRect);
|
||||||
|
|
||||||
{ Fix Header String }
|
{ Fix Header String }
|
||||||
@ -569,6 +569,7 @@ begin
|
|||||||
HeadRect.Top
|
HeadRect.Top
|
||||||
);
|
);
|
||||||
HeadTextRect.BottomRight := HeadRect.BottomRight;
|
HeadTextRect.BottomRight := HeadRect.BottomRight;
|
||||||
|
|
||||||
{ Fix Header String }
|
{ Fix Header String }
|
||||||
HeadStrLen := RenderCanvas.TextWidth(HeadStr);
|
HeadStrLen := RenderCanvas.TextWidth(HeadStr);
|
||||||
if HeadStrLen > HeadTextRect.Right - HeadTextRect.Left - TextMargin then
|
if HeadStrLen > HeadTextRect.Right - HeadTextRect.Left - TextMargin then
|
||||||
@ -576,6 +577,7 @@ begin
|
|||||||
HeadStr := GetDisplayString(RenderCanvas, HeadStr, 0,
|
HeadStr := GetDisplayString(RenderCanvas, HeadStr, 0,
|
||||||
HeadTextRect.Right - HeadTextRect.Left - TextMargin );
|
HeadTextRect.Right - HeadTextRect.Left - TextMargin );
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ position the spinner }
|
{ position the spinner }
|
||||||
with TVpWeekViewOpener(FWeekView) do begin
|
with TVpWeekViewOpener(FWeekView) do begin
|
||||||
wvSpinButtons.Height := Trunc(wvHeaderHeight * 0.8);
|
wvSpinButtons.Height := Trunc(wvHeaderHeight * 0.8);
|
||||||
|
Reference in New Issue
Block a user