You've already forked lazarus-ccr
tvplanit: trying to resolve the issue of growing day names in the calendar view in OSX (see forum http://forum.lazarus.freepascal.org/index.php/topic,33189.msg214639.html#msg214639).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4881 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -5,6 +5,7 @@
|
|||||||
<Type Value="RunAndDesignTime"/>
|
<Type Value="RunAndDesignTime"/>
|
||||||
<AddToProjectUsesSection Value="True"/>
|
<AddToProjectUsesSection Value="True"/>
|
||||||
<Author Value="Original author: TurboPower Software"/>
|
<Author Value="Original author: TurboPower Software"/>
|
||||||
|
<AutoUpdate Value="OnRebuildingAll"/>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="11"/>
|
<Version Value="11"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
|
@ -208,7 +208,11 @@ var
|
|||||||
I: Integer;
|
I: Integer;
|
||||||
S: string;
|
S: string;
|
||||||
DrawRect: TRect;
|
DrawRect: TRect;
|
||||||
|
fontsize: Integer;
|
||||||
begin
|
begin
|
||||||
|
{Store the font size}
|
||||||
|
fontsize := RenderCanvas.Font.Size;
|
||||||
|
|
||||||
{draw the day name column labels}
|
{draw the day name column labels}
|
||||||
RenderCanvas.Font.Color := DayNameColor;
|
RenderCanvas.Font.Color := DayNameColor;
|
||||||
I := 0;
|
I := 0;
|
||||||
@ -236,16 +240,13 @@ begin
|
|||||||
S := SysToUTF8(S);
|
S := SysToUTF8(S);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{restore the font size - this is not needed normally, but may solve the
|
||||||
|
issue with growing fonts along this row in MacOSX }
|
||||||
|
RenderCanvas.Font.Size := fontsize;
|
||||||
|
|
||||||
{draw the day name above each column}
|
{draw the day name above each column}
|
||||||
DrawRect := TVpCalendarOpener(FCalendar).clRowCol[1, I];
|
DrawRect := TVpCalendarOpener(FCalendar).clRowCol[1, I];
|
||||||
OffsetRect(DrawRect, RealLeft, Realtop);
|
OffsetRect(DrawRect, RealLeft, Realtop);
|
||||||
{
|
|
||||||
DrawRect := Rect(
|
|
||||||
clRowCol[1, I].Left + RealLeft,
|
|
||||||
clRowCol[1, I].Top + RealTop,
|
|
||||||
clRowCol[1, I].Right + RealLeft,
|
|
||||||
clRowCol[1, I].Bottom + RealTop);
|
|
||||||
}
|
|
||||||
TPSCenteredTextOut(RenderCanvas, Angle, RenderIn, DrawRect, S);
|
TPSCenteredTextOut(RenderCanvas, Angle, RenderIn, DrawRect, S);
|
||||||
Inc(I);
|
Inc(I);
|
||||||
if DOW < High(DOW) then
|
if DOW < High(DOW) then
|
||||||
|
@ -752,8 +752,7 @@ begin
|
|||||||
case FCanvas.Font.Pitch of
|
case FCanvas.Font.Pitch of
|
||||||
fpVariable : LF.lfPitchAndFamily := VARIABLE_PITCH or FF_DONTCARE;
|
fpVariable : LF.lfPitchAndFamily := VARIABLE_PITCH or FF_DONTCARE;
|
||||||
fpFixed : LF.lfPitchAndFamily := FIXED_PITCH or FF_DONTCARE;
|
fpFixed : LF.lfPitchAndFamily := FIXED_PITCH or FF_DONTCARE;
|
||||||
else
|
else LF.lfPitchAndFamily := DEFAULT_PITCH;
|
||||||
LF.lfPitchAndFamily := DEFAULT_PITCH;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Create new font to use
|
// Create new font to use
|
||||||
|
Reference in New Issue
Block a user