mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 08:02:03 +02:00
wince: handle clDefault font color (not tested)
git-svn-id: trunk@28309 -
This commit is contained in:
parent
6380ade6ac
commit
6bf5ba8ef9
@ -1299,7 +1299,10 @@ begin
|
||||
begin
|
||||
if ChildWinControl <> nil then
|
||||
begin
|
||||
Windows.SetTextColor(HDC(WParam), Windows.COLORREF(ColorToRGB(ChildWinControl.Font.Color)));
|
||||
WindowColor := ChildWinControl.Font.Color;
|
||||
if WindowColor = clDefault then
|
||||
WindowColor := ChildWinControl.GetDefaultColor(dctFont);
|
||||
Windows.SetTextColor(WindowDC, Windows.COLORREF(ColorToRGB(WindowColor)));
|
||||
WindowColor := ChildWinControl.Brush.Color;
|
||||
if WindowColor = clDefault then
|
||||
WindowColor := ChildWinControl.GetDefaultColor(dctBrush);
|
||||
|
@ -221,7 +221,12 @@ var
|
||||
else if Selected then
|
||||
OldColor := Windows.SetTextColor(Data^._HDC, LCLIntf.GetSysColor(COLOR_HIGHLIGHTTEXT))
|
||||
else
|
||||
OldColor := Windows.SetTextColor(Data^._HDC, ColorToRGB(CheckListBox.Font.Color));
|
||||
begin
|
||||
OldColor := CheckListBox.Font.Color;
|
||||
if OldColor = clDefault then
|
||||
OldColor := CheckListBox.GetDefaultColor(dctFont);
|
||||
OldColor := Windows.SetTextColor(Data^._HDC, ColorToRGB(OldColor));
|
||||
end;
|
||||
|
||||
WideBuffer := UTF8Decode(CheckListBox.Items[Data^.ItemID]);
|
||||
Windows.DrawTextW(Data^._HDC, PWideChar(WideBuffer), -1,
|
||||
|
@ -744,13 +744,17 @@ begin
|
||||
// TODO ???
|
||||
end;
|
||||
|
||||
class procedure TWinCEWSCustomListView.SetFont(const AWinControl: TWinControl;
|
||||
const AFont: TFont);
|
||||
class procedure TWinCEWSCustomListView.SetFont(const AWinControl: TWinControl; const AFont: TFont);
|
||||
var
|
||||
Color: TColor;
|
||||
begin
|
||||
// call inherited SetFont; need to do it this way,
|
||||
// because the compile time ancestor class is TWSCustomListView
|
||||
TWSWinControlClass(ClassParent).SetFont(AWinControl, AFont);
|
||||
Windows.SendMessage(AWinControl.Handle, LVM_SETTEXTCOLOR, 0, ColorToRGB(AFont.Color));
|
||||
Color := AFont.Color;
|
||||
if Color = clDefault then
|
||||
Color := AWinControl.GetDefaultColor(dctFont);
|
||||
Windows.SendMessage(AWinControl.Handle, LVM_SETTEXTCOLOR, 0, ColorToRGB(Color));
|
||||
end;
|
||||
|
||||
//roozbeh not supported!
|
||||
|
Loading…
Reference in New Issue
Block a user