tvplanit: Fix text size growing in successive calls to TVpExCanvas.DrawRotatedText under gtk2.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4888 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-07-01 21:22:34 +00:00
parent d1c3eed2fa
commit 73cdbbf8b1
3 changed files with 6 additions and 6 deletions

View File

@ -58,10 +58,7 @@ object MainForm: TMainForm
KBNavigation = True
DateLabelFormat = 'mmmm yyyy'
DayHeadAttributes.Color = clBtnFace
DayHeadAttributes.Font.Height = -13
DayHeadAttributes.Font.Name = 'Tahoma'
DayNameStyle = dsShort
DayNumberFont.Style = [fsBold]
DrawingStyle = dsFlat
EventDayStyle = [fsItalic]
LineColor = clGray

View File

@ -721,6 +721,7 @@ var
OldFont: TFont;
RealPoint: TPoint;
OldBrushStyle: TBrushStyle;
savedFontHeight: Integer;
begin
if not Assigned(FCanvas) then
raise EVpCanvasError.Create(RSNoCanvas);
@ -758,6 +759,7 @@ begin
// Create new font to use
OldFont := FCanvas.Font;
try
savedFontHeight := FCanvas.Font.Height;
FCanvas.Font.Handle:= CreateFontIndirect(LF);
// Output the text
@ -774,6 +776,7 @@ begin
end;
finally
FCanvas.Font := OldFont;
FCanvas.Font.Height := savedFontHeight;
end;
end;

View File

@ -349,9 +349,9 @@ begin
mvVisibleEvents := 0;
{ set up fonts and colors }
FDayHeadAttributes.Font.Name := 'Tahoma';
FDayHeadAttributes.Font.Size := 10;
FDayHeadAttributes.Font.Style := [];
// FDayHeadAttributes.Font.Name := 'Tahoma'; wp: better use defaults
// FDayHeadAttributes.Font.Size := 10;
// FDayHeadAttributes.Font.Style := [];
FDayHeadAttributes.Color := clBtnFace;
{ Assign default font to DayNumberFont and EventFont }