504
504
else if theDialog is TFontDialog then
506
Assert(False, 'Trace:Pressed OK in FontDialog');
506
//DebugLn('Trace:Pressed OK in FontDialog');
507
507
FontName := gtk_font_selection_dialog_get_font_name(
508
508
pgtkfontselectiondialog(FPointer));
509
509
//debugln('gtkDialogOKclickedCB FontName=',FontName);
770
770
Set the color of the color selection dialog
771
771
------------------------------------------------------------------------------}
772
procedure SetColorDialogColor(ColorSelection: PGtkColorSelection;
772
procedure SetColorDialogColor(ColorSelection: PGtkColorSelection; aColor: TColor);
775
774
SelectionColor: TGDKColor;
776
775
colorSel : PGTKCOLORSELECTION;
778
{$IFDEF VerboseColorDialog}
779
DebugLn('TGtkWidgetSet.SetColorDialogColor Start Color=',DbgS(Color));
781
Color:=ColorToRGB(Color);
782
{$IFDEF VerboseColorDialog}
783
DebugLn('TGtkWidgetSet.SetColorDialogColor Converted Color=',DbgS(Color));
778
ColorRef:=ColorToRGB(aColor);
779
{$IFDEF VerboseColorDialog}
780
DebugLn('TGtkWidgetSet.SetColorDialogColor Start aColor=',DbgS(aColor));
781
DebugLn('TGtkWidgetSet.SetColorDialogColor Converted aColor=',DbgS(ColorRef));
785
783
SelectionColor.Pixel := 0;
786
SelectionColor.Red := Red(Color) shl 8;
787
SelectionColor.Green:= Green(Color) shl 8;
788
SelectionColor.Blue:= Blue(Color) shl 8;
784
SelectionColor.Red := Red(ColorRef) shl 8;
785
SelectionColor.Green:= Green(ColorRef) shl 8;
786
SelectionColor.Blue:= Blue(ColorRef) shl 8;
789
787
colorSel := PGTKCOLORSELECTION((PGTKCOLORSELECTIONDIALOG(ColorSelection))^.colorsel);
790
788
gtk_color_selection_set_current_color(colorSel,@SelectionColor);