gtk: Ensure text color, use LineInfo.GetLineInfo for TraceGdiCalls

git-svn-id: trunk@10169 -
This commit is contained in:
jesus 2006-11-03 21:20:20 +00:00
parent f4f8d20afd
commit 0adbb16922
3 changed files with 4 additions and 2 deletions

View File

@ -43,7 +43,7 @@ uses
{$ifdef TraceGdiCalls} {$ifdef TraceGdiCalls}
const const
MaxTraces = 5; MaxTraces = 5;
MaxCallBacks = 7; MaxCallBacks = 11;
type type
TCallBacksArray = array[0..MaxCallBacks] of Pointer; TCallBacksArray = array[0..MaxCallBacks] of Pointer;
PCallBacksArray = ^TCallBacksArray; PCallBacksArray = ^TCallBacksArray;

View File

@ -311,7 +311,7 @@ var
i: integer; i: integer;
begin begin
for i:=0 to MaxCallBacks do begin for i:=0 to MaxCallBacks do begin
GetLineInfo(longWord(BackTrace[i]), Func, source, line); LineInfo.GetLineInfo(longWord(BackTrace[i]), Func, source, line);
DebugLn('$', Hexstr(LongInt(BackTrace[i]),8),' ', Func, ', line ', DebugLn('$', Hexstr(LongInt(BackTrace[i]),8),' ', Func, ', line ',
dbgs(line),' of ',Source); dbgs(line),' of ',Source);
end; end;

View File

@ -9070,6 +9070,8 @@ begin
begin begin
Result := CurrentTextColor.ColorRef; Result := CurrentTextColor.ColorRef;
SetGDIColorRef(CurrentTextColor,Color); SetGDIColorRef(CurrentTextColor,Color);
if Result<>Color then
SelectedColors := dcscCustom; // force SelectGDKTextProps to ensure text color
end; end;
end; end;
Assert(False, Format('trace:< [TGtkWidgetSet.SetTextColor] DC: 0x%x Color: %8x --> %8x', [Integer(DC), Color, Result])); Assert(False, Format('trace:< [TGtkWidgetSet.SetTextColor] DC: 0x%x Color: %8x --> %8x', [Integer(DC), Color, Result]));