mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 19:40:20 +02:00
added TColorDialog debugging
git-svn-id: trunk@5064 -
This commit is contained in:
parent
a418b3b9fc
commit
3e62949c08
@ -1841,6 +1841,9 @@ begin
|
||||
colorSel := PGtkColorSelection(PGtkColorSelectionDialog(FPointer)^.colorsel);
|
||||
gtk_color_selection_get_current_color(colorsel, @newColor);
|
||||
TColorDialog(theDialog).Color := TGDKColorToTColor(newcolor);
|
||||
{$IFDEF VerboseColorDialog}
|
||||
writeln('gtkDialogOKclickedCB ',HexStr(Cardinal(TColorDialog(theDialog).Color),8));
|
||||
{$ENDIF}
|
||||
end
|
||||
else if theDialog is TFontDialog then
|
||||
begin
|
||||
@ -3227,6 +3230,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.213 2004/01/14 20:09:49 mattias
|
||||
added TColorDialog debugging
|
||||
|
||||
Revision 1.212 2004/01/13 10:41:40 mattias
|
||||
fixed statusbar updating all panels
|
||||
|
||||
|
@ -6987,7 +6987,13 @@ var
|
||||
SelectionColor: TGDKColor;
|
||||
colorSel : PGTKCOLORSELECTION;
|
||||
begin
|
||||
{$IFDEF VerboseColorDialog}
|
||||
writeln('TgtkObject.SetColorDialogColor Start Color=',HexStr(Cardinal(Color),8));
|
||||
{$ENDIF}
|
||||
Color:=ColorToRGB(Color);
|
||||
{$IFDEF VerboseColorDialog}
|
||||
writeln('TgtkObject.SetColorDialogColor Converted Color=',HexStr(Cardinal(Color),8));
|
||||
{$ENDIF}
|
||||
SelectionColor.Pixel := 0;
|
||||
SelectionColor.Red := Red(Color) shl 8;
|
||||
SelectionColor.Green:= Green(Color) shl 8;
|
||||
@ -8685,6 +8691,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.453 2004/01/14 20:09:50 mattias
|
||||
added TColorDialog debugging
|
||||
|
||||
Revision 1.452 2004/01/13 16:39:02 mattias
|
||||
changed consistency stops during var renaming to errors
|
||||
|
||||
|
@ -194,6 +194,13 @@ begin
|
||||
Color^.red := gushort(Trunc(colorArray[0] * $FFFF));
|
||||
Color^.green := gushort(Trunc(colorArray[1] * $FFFF));
|
||||
Color^.blue := gushort(Trunc(colorArray[2] * $FFFF));
|
||||
{$IFDEF VerboseColorDialog}
|
||||
writeln('gtk_color_selection_get_current_color ',
|
||||
' Red=',HexStr(Cardinal(Color^.Red),8),
|
||||
' Green=',HexStr(Cardinal(Color^.Green),8),
|
||||
' Blue=',HexStr(Cardinal(Color^.Blue),8),
|
||||
'');
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
Procedure gtk_color_selection_set_current_color(colorsel : PGTKColorSelection;
|
||||
@ -201,6 +208,13 @@ Procedure gtk_color_selection_set_current_color(colorsel : PGTKColorSelection;
|
||||
var
|
||||
SelectionColor: PGDouble;
|
||||
begin
|
||||
{$IFDEF VerboseColorDialog}
|
||||
writeln('gtk_color_selection_set_current_color ',
|
||||
' Red=',HexStr(Cardinal(Color^.Red),8),
|
||||
' Green=',HexStr(Cardinal(Color^.Green),8),
|
||||
' Blue=',HexStr(Cardinal(Color^.Blue),8),
|
||||
'');
|
||||
{$ENDIF}
|
||||
GetMem(SelectionColor,4*SizeOf(GDouble));
|
||||
try
|
||||
SelectionColor[0]:=gdouble(Color^.Red)/65535;
|
||||
@ -5731,6 +5745,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.245 2004/01/14 20:09:50 mattias
|
||||
added TColorDialog debugging
|
||||
|
||||
Revision 1.244 2004/01/13 16:39:02 mattias
|
||||
changed consistency stops during var renaming to errors
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user