From 3f56e69dc611aafa718aefc66031ea643d395ef3 Mon Sep 17 00:00:00 2001 From: ondrej Date: Sun, 14 May 2017 08:43:35 +0000 Subject: [PATCH] lcl: combobox, listbox: assign Font.PixelsPerInch to Canvas for custom draw events. git-svn-id: trunk@54914 - --- lcl/include/customcombobox.inc | 3 +++ lcl/include/customlistbox.inc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lcl/include/customcombobox.inc b/lcl/include/customcombobox.inc index 2567dd6180..c8bf8d33f3 100644 --- a/lcl/include/customcombobox.inc +++ b/lcl/include/customcombobox.inc @@ -1015,7 +1015,10 @@ begin begin FCanvas.Handle := DC; if Font<>nil then + begin FCanvas.Font := Font; + FCanvas.Font.PixelsPerInch := Font.PixelsPerInch; + end; if Brush<>nil then FCanvas.Brush := Brush; if (ItemID <> UINT(-1)) and (odSelected in ItemState) then diff --git a/lcl/include/customlistbox.inc b/lcl/include/customlistbox.inc index 3eb4a58f24..f8a64e7f41 100644 --- a/lcl/include/customlistbox.inc +++ b/lcl/include/customlistbox.inc @@ -271,7 +271,10 @@ begin begin FCanvas.Handle := DC; if Assigned(Font) then + begin FCanvas.Font := Font; + FCanvas.Font.PixelsPerInch := Font.PixelsPerInch; + end; if Assigned(Brush) then FCanvas.Brush := Brush; if (ItemID <> UINT(-1)) and (odSelected in ItemState) then