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; FUserChoice: integer;
FHelpContext: THelpContext; FHelpContext: THelpContext;
procedure SetHandle(const AValue: integer); procedure SetHandle(const AValue: integer);
procedure SetHeight(const AValue: integer);
procedure SetWidth(const AValue: integer);
protected protected
function DoExecute : boolean; virtual; function DoExecute : boolean; virtual;
public public
@ -98,8 +100,8 @@ type
property OnCanClose: TCloseQueryEvent read FOnCanClose write FOnCanClose; property OnCanClose: TCloseQueryEvent read FOnCanClose write FOnCanClose;
property OnShow: TNotifyEvent read FOnShow write FOnShow; property OnShow: TNotifyEvent read FOnShow write FOnShow;
property HelpContext: THelpContext read FHelpContext write FHelpContext default 0; property HelpContext: THelpContext read FHelpContext write FHelpContext default 0;
property Width: integer read FWidth write FWidth; property Width: integer read FWidth write SetWidth;
property Height: integer read FHeight write FHeight; property Height: integer read FHeight write SetHeight;
end; end;
@ -419,6 +421,9 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $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 Revision 1.35 2003/09/02 21:32:56 mattias
implemented TOpenPictureDialog implemented TOpenPictureDialog

View File

@ -65,11 +65,22 @@ begin
FHandle:=AValue; FHandle:=AValue;
end; 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; function TCommonDialog.DoExecute : boolean;
var CanClose: boolean; var CanClose: boolean;
begin begin
if Assigned(FOnShow) then FOnShow(Self); if Assigned(FOnShow) then FOnShow(Self);
Assert(False, 'Trace:Calling dialog - LM_SHOWMODAL');
CNSendMessage(LM_SHOWMODAL, Self, nil); CNSendMessage(LM_SHOWMODAL, Self, nil);
repeat repeat
Application.HandleMessage; Application.HandleMessage;
@ -87,6 +98,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $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 Revision 1.9 2003/09/02 21:32:56 mattias
implemented TOpenPictureDialog implemented TOpenPictureDialog

View File

@ -191,6 +191,10 @@ type
procedure ShowModal(Sender: TObject); virtual; procedure ShowModal(Sender: TObject); virtual;
procedure UpdateTransientWindows; virtual; procedure UpdateTransientWindows; virtual;
procedure UntransientWindow(GtkWindow: PGtkWindow); 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 InitializeCommonDialog(ADialog: TObject; AWindow: PGtkWidget);
procedure CreateOpenDialogFilter(OpenDialog: TOpenDialog; procedure CreateOpenDialogFilter(OpenDialog: TOpenDialog;
SelWidget: PGtkWidget); SelWidget: PGtkWidget);
@ -198,10 +202,6 @@ type
SelWidget: PGtkWidget); SelWidget: PGtkWidget);
procedure InitializeOpenDialog(OpenDialog: TOpenDialog; procedure InitializeOpenDialog(OpenDialog: TOpenDialog;
SelWidget: PGtkWidget); SelWidget: PGtkWidget);
procedure InitializeFileDialog(FileDialog: TFileDialog;
var SelWidget: PGtkWidget; Title: PChar);
procedure InitializeFontDialog(FontDialog: TFontDialog;
var SelWidget: PGtkWidget; Title: PChar);
// misc // misc
Function GetCaption(Sender : TObject) : String; virtual; Function GetCaption(Sender : TObject) : String; virtual;
@ -360,6 +360,9 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $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 Revision 1.141 2003/09/02 21:32:56 mattias
implemented TOpenPictureDialog implemented TOpenPictureDialog

View File

@ -4958,8 +4958,8 @@ begin
PreviewWidget:=PGtkWidget(AControl.Handle); PreviewWidget:=PGtkWidget(AControl.Handle);
gtk_object_set_data(PGtkObject(PreviewWidget),'LCLPreviewFixed', gtk_object_set_data(PGtkObject(PreviewWidget),'LCLPreviewFixed',
PreviewWidget); PreviewWidget);
gtk_widget_set_usize(PreviewWidget,AControl.Width,AControl.Height);
gtk_box_pack_start(GTK_BOX(list_hbox),PreviewWidget,true,true,0); gtk_box_pack_start(GTK_BOX(list_hbox),PreviewWidget,true,true,0);
gtk_widget_show(PreviewWidget); gtk_widget_show(PreviewWidget);
end; end;
@ -8122,6 +8122,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $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 Revision 1.403 2003/09/02 21:32:56 mattias
implemented TOpenPictureDialog implemented TOpenPictureDialog

View File

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

View File

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