vcl-styles-utils
vcl-styles-utils copied to clipboard
TTaskDialog not drawing text correctly in dark themes when hyperlinks are used
Hello,
I am using Delphi 12 and the latest versio of VCL Styles Utils.
Using the code below, if I am using a dark theme such as "Charcoal Dark Slate" (but really any dark theme), then the text in the dialog is painted black on a dark gray background so it is difficult to see. If the hyperlink is excluded, then the text is drawn with theme colors.
Thank you
uses
Vcl.Styles.UXTheme
...
...
with TTaskDialog.Create(self) do
try
Caption := 'test';
Title := 'test';
CommonButtons := [tcbClose];
Text := 'blah blah this is very long test. It goes on and on and on ' +
'about nothing really. IfThereIsLongTextAndAHyperLinkThenItWillWrapAroundInsteadOfBeCutOffWithAnEllipsis.' +
#13#10#13#10'<a href="https://www.google.com/">https://www.google.com/</a>';
Flags := [tfAllowDialogCancellation, tfEnableHyperlinks];
CustomMainIcon := Application.Icon;
Execute;
finally
Free;
end;
I have the same issue - reported in https://github.com/HeidiSQL/HeidiSQL/issues/2036
If I remove Vcl.Styles.Utils.Forms
from the uses
clause, the dialogs have white background (where the black text is not an issue, but then again it's the wrong background PLUS wrong foreground):