mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 03:29:28 +02:00
fixed anchoring controls
git-svn-id: trunk@2569 -
This commit is contained in:
parent
600e5ef1b4
commit
6de14d6998
@ -293,11 +293,10 @@ var
|
|||||||
//Info: PGtkWindowGeometryInfo;
|
//Info: PGtkWindowGeometryInfo;
|
||||||
begin
|
begin
|
||||||
Width:=AWinControl.Width;
|
Width:=AWinControl.Width;
|
||||||
if Width<0 then
|
// 0 and negative values have a special meaning, so don't use them
|
||||||
Width:=0;
|
if Width<=0 then Width:=1;
|
||||||
Height:=AWinControl.Height;
|
Height:=AWinControl.Height;
|
||||||
if Height<0 then
|
if Height<=0 then Height:=1;
|
||||||
Height:=0;
|
|
||||||
|
|
||||||
//writeln('TgtkObject.SetWindowSizeAndPosition ',AWinControl.Name,':',AWinControl.ClassName,' ',AWinControl.Visible,' Old=',PGtkWidget(Window)^.allocation.Width,',',PGtkWidget(Window)^.allocation.Width,' New=',Width,',',Height);
|
//writeln('TgtkObject.SetWindowSizeAndPosition ',AWinControl.Name,':',AWinControl.ClassName,' ',AWinControl.Visible,' Old=',PGtkWidget(Window)^.allocation.Width,',',PGtkWidget(Window)^.allocation.Width,' New=',Width,',',Height);
|
||||||
// set geometry default size
|
// set geometry default size
|
||||||
@ -336,7 +335,7 @@ begin
|
|||||||
end else if (Sender is TCustomForm) then begin
|
end else if (Sender is TCustomForm) then begin
|
||||||
GtkWindow:=PGtkWindow(TCustomForm(Sender).Handle);
|
GtkWindow:=PGtkWindow(TCustomForm(Sender).Handle);
|
||||||
gtk_window_set_default_size(GtkWindow,
|
gtk_window_set_default_size(GtkWindow,
|
||||||
TControl(Sender).Width,TControl(Sender).Height);
|
Max(1,TControl(Sender).Width),Max(1,TControl(Sender).Height));
|
||||||
gtk_widget_set_uposition(PGtkWidget(GtkWindow),
|
gtk_widget_set_uposition(PGtkWidget(GtkWindow),
|
||||||
TControl(Sender).Left, TControl(Sender).Top);
|
TControl(Sender).Left, TControl(Sender).Top);
|
||||||
end else begin
|
end else begin
|
||||||
@ -646,11 +645,11 @@ procedure TgtkObject.SendCachedLCLMessages;
|
|||||||
if not IsTopLevelWidget then begin
|
if not IsTopLevelWidget then begin
|
||||||
// resize widget
|
// resize widget
|
||||||
LCLWidth:=LCLControl.Width;
|
LCLWidth:=LCLControl.Width;
|
||||||
if LCLWidth<0 then
|
if LCLWidth<=0 then
|
||||||
LCLWidth:=0;
|
LCLWidth:=1;
|
||||||
LCLHeight:=LCLControl.Height;
|
LCLHeight:=LCLControl.Height;
|
||||||
if LCLHeight<0 then
|
if LCLHeight<=0 then
|
||||||
LCLHeight:=0;
|
LCLHeight:=1;
|
||||||
if (LCLWidth>10000) or (LCLHeight>10000) then begin
|
if (LCLWidth>10000) or (LCLHeight>10000) then begin
|
||||||
WriteBigWarning;
|
WriteBigWarning;
|
||||||
end;
|
end;
|
||||||
@ -933,8 +932,8 @@ end;
|
|||||||
procedure TgtkObject.RealizeWidgetSize(Widget: PGtkWidget; NewWidth,
|
procedure TgtkObject.RealizeWidgetSize(Widget: PGtkWidget; NewWidth,
|
||||||
NewHeight: integer);
|
NewHeight: integer);
|
||||||
begin
|
begin
|
||||||
if NewWidth<0 then NewWidth:=0;
|
if NewWidth<=0 then NewWidth:=1;
|
||||||
if NewHeight<0 then NewHeight:=0;
|
if NewHeight<=0 then NewHeight:=1;
|
||||||
gtk_widget_set_usize(Widget, NewWidth, NewHeight);
|
gtk_widget_set_usize(Widget, NewWidth, NewHeight);
|
||||||
if GtkWidgetIsA(Widget,GTK_COMBO_TYPE) then begin
|
if GtkWidgetIsA(Widget,GTK_COMBO_TYPE) then begin
|
||||||
// the combobox has an entry, which height is not resized
|
// the combobox has an entry, which height is not resized
|
||||||
@ -7325,6 +7324,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.373 2003/06/10 12:28:23 mattias
|
||||||
|
fixed anchoring controls
|
||||||
|
|
||||||
Revision 1.372 2003/06/09 14:39:52 mattias
|
Revision 1.372 2003/06/09 14:39:52 mattias
|
||||||
implemented setting working directory for debugger
|
implemented setting working directory for debugger
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user