fixed default size of preview widget

git-svn-id: trunk@4562 -
This commit is contained in:
mattias 2003-09-04 10:51:30 +00:00
parent 2859144431
commit bad5a3e490
6 changed files with 43 additions and 9 deletions

View File

@ -80,6 +80,8 @@ type
FUserChoice: integer;
FHelpContext: THelpContext;
procedure SetHandle(const AValue: integer);
procedure SetHeight(const AValue: integer);
procedure SetWidth(const AValue: integer);
protected
function DoExecute : boolean; virtual;
public
@ -98,8 +100,8 @@ type
property OnCanClose: TCloseQueryEvent read FOnCanClose write FOnCanClose;
property OnShow: TNotifyEvent read FOnShow write FOnShow;
property HelpContext: THelpContext read FHelpContext write FHelpContext default 0;
property Width: integer read FWidth write FWidth;
property Height: integer read FHeight write FHeight;
property Width: integer read FWidth write SetWidth;
property Height: integer read FHeight write SetHeight;
end;
@ -419,6 +421,9 @@ end.
{ =============================================================================
$Log$
Revision 1.36 2003/09/04 10:51:30 mattias
fixed default size of preview widget
Revision 1.35 2003/09/02 21:32:56 mattias
implemented TOpenPictureDialog

View File

@ -65,11 +65,22 @@ begin
FHandle:=AValue;
end;
procedure TCommonDialog.SetHeight(const AValue: integer);
begin
if FHeight=AValue then exit;
FHeight:=AValue;
end;
procedure TCommonDialog.SetWidth(const AValue: integer);
begin
if FWidth=AValue then exit;
FWidth:=AValue;
end;
function TCommonDialog.DoExecute : boolean;
var CanClose: boolean;
begin
if Assigned(FOnShow) then FOnShow(Self);
Assert(False, 'Trace:Calling dialog - LM_SHOWMODAL');
CNSendMessage(LM_SHOWMODAL, Self, nil);
repeat
Application.HandleMessage;
@ -87,6 +98,9 @@ end;
{ =============================================================================
$Log$
Revision 1.10 2003/09/04 10:51:30 mattias
fixed default size of preview widget
Revision 1.9 2003/09/02 21:32:56 mattias
implemented TOpenPictureDialog

View File

@ -191,6 +191,10 @@ type
procedure ShowModal(Sender: TObject); virtual;
procedure UpdateTransientWindows; virtual;
procedure UntransientWindow(GtkWindow: PGtkWindow);
procedure InitializeFileDialog(FileDialog: TFileDialog;
var SelWidget: PGtkWidget; Title: PChar);
procedure InitializeFontDialog(FontDialog: TFontDialog;
var SelWidget: PGtkWidget; Title: PChar);
procedure InitializeCommonDialog(ADialog: TObject; AWindow: PGtkWidget);
procedure CreateOpenDialogFilter(OpenDialog: TOpenDialog;
SelWidget: PGtkWidget);
@ -198,10 +202,6 @@ type
SelWidget: PGtkWidget);
procedure InitializeOpenDialog(OpenDialog: TOpenDialog;
SelWidget: PGtkWidget);
procedure InitializeFileDialog(FileDialog: TFileDialog;
var SelWidget: PGtkWidget; Title: PChar);
procedure InitializeFontDialog(FontDialog: TFontDialog;
var SelWidget: PGtkWidget; Title: PChar);
// misc
Function GetCaption(Sender : TObject) : String; virtual;
@ -360,6 +360,9 @@ end.
{ =============================================================================
$Log$
Revision 1.142 2003/09/04 10:51:30 mattias
fixed default size of preview widget
Revision 1.141 2003/09/02 21:32:56 mattias
implemented TOpenPictureDialog

View File

@ -4958,8 +4958,8 @@ begin
PreviewWidget:=PGtkWidget(AControl.Handle);
gtk_object_set_data(PGtkObject(PreviewWidget),'LCLPreviewFixed',
PreviewWidget);
gtk_widget_set_usize(PreviewWidget,AControl.Width,AControl.Height);
gtk_box_pack_start(GTK_BOX(list_hbox),PreviewWidget,true,true,0);
gtk_widget_show(PreviewWidget);
end;
@ -8122,6 +8122,9 @@ end;
{ =============================================================================
$Log$
Revision 1.404 2003/09/04 10:51:30 mattias
fixed default size of preview widget
Revision 1.403 2003/09/02 21:32:56 mattias
implemented TOpenPictureDialog

View File

@ -1251,6 +1251,12 @@ begin
FilterList.Free;
gtk_object_set_data(PGtkObject(DlgWindow),'LCLFilterList',nil);
end;
// free preview handle
if ADialog is TPreviewFileDialog then begin
if TPreviewFileDialog(ADialog).PreviewFileControl<>nil then
TPreviewFileDialog(ADialog).PreviewFileControl.Handle:=0;
end;
end;
end;
@ -4405,6 +4411,9 @@ end;
{ =============================================================================
$Log$
Revision 1.193 2003/09/04 10:51:30 mattias
fixed default size of preview widget
Revision 1.192 2003/08/30 18:53:08 mattias
using default colors, when theme does not define them

View File

@ -39,7 +39,7 @@ uses
LCLStrConsts, LCLLinux, LCLType, gtkDef, DynHashArray, LazLinkedList,
GraphType, GraphMath, Graphics, Buttons, Menus, GTKWinApiWindow, StdCtrls,
ComCtrls, CListBox, KeyMap, Calendar, Arrow, Spin, CommCtrl, ExtCtrls,
Dialogs, FileCtrl, LResources, Math, GTKGlobals;
Dialogs, ExtDlgs, FileCtrl, LResources, Math, GTKGlobals;
{$IFDEF gtk2}