Mattias Gaertner wrote:
> Thanks. Applied.
Thanks.
I have noticed that the html hints (at least on GTK2) look quite ugly:
They have a white background and absolutely no border.
The following is a hack to make them look like they should at least on
GTK2 (I have *not* tested this on windows and or any other widgetset). I
don't even know whether this (or a similar) hack can fit into the bigger
concept of the hint provider thing, but it fixes the display problems
for me. (on GTK2)
Index: ide/helpmanager.pas
===================================================================
--- ide/helpmanager.pas (Revision 26906)
+++ ide/helpmanager.pas (Arbeitskopie)
@@ -1255,6 +1255,17 @@
function TIDEHelpManager.CreateHint(aHintWindow: THintWindow; ScreenPos: TPoint;
const BaseURL: string; var TheHint: string; out HintWinRect: TRect): boolean;
+
+ function ColorToHex(Color : TColor) : string;
+ var RGB : LongInt;
+ begin
+ RGB := ColorToRGB(color);
+ Result := '#' +
+ IntToHex(GetRValue(RGB), 2) +
+ IntToHex(GetGValue(RGB), 2) +
+ IntToHex(GetBValue(RGB), 2) ;
+ end;
+
var
IsHTML: Boolean;
Provider: TAbstractIDEHTMLProvider;
@@ -1268,9 +1279,13 @@
aHintWindow.Controls[0].Free;
end;
if IsHTML then begin
+ TheHint := StringReplace(TheHint, '<BODY>',
+ '<BODY BGCOLOR="' + ColorToHex(clInfoBk) + '">', []);
Provider:=nil;
HTMLControl:=CreateIDEHTMLControl(aHintWindow,Provider);
Provider.BaseURL:=BaseURL;
+ aHintWindow.BorderStyle:=bsSingle;
+ aHintWindow.BorderWidth:=4;
HTMLControl.Parent:=aHintWindow;
HTMLControl.Align:=alClient;
ms:=TMemoryStream.Create;
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus