G'day all,
This commit breaks anchoring to panels on GTK2.
Create a form, drop a panel on it and drop a combobox on the panel.
Anchor each end of the combobox to the panel.
Now resize the panel. As you expand the panel the combobox stretches out as it
should.
As you contract the panel the combobox retains it's old size and is
progressively hidden by the panel.
I reverted just this commit in my local svn and the problem has disappeared.
I have attached the offending commit for reference. I applied it with -p0 -R
and the problem went away.
Regards,
Brad
--
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.
Index: lcl/interfaces/gtk/gtkwsextctrls.pp
===================================================================
--- lcl/interfaces/gtk/gtkwsextctrls.pp (revision 16983)
+++ lcl/interfaces/gtk/gtkwsextctrls.pp (revision 16984)
@@ -637,12 +637,12 @@
// TPanel control is a area with frame around. Area can have its own color
// To implement that in gtk we need:
- // 1. GtkFrame to draw frame around area
+ // 1. GtkViewport to draw frame around area
// 2. GtkFixed to plaace controls and draw color area
- Widget := gtk_frame_new(nil);
+ Widget := gtk_viewport_new(nil, nil);
WidgetInfo := CreateWidgetInfo(Widget, AWinControl, AParams);
- gtk_frame_set_shadow_type(PGtkFrame(Widget), BorderStyleShadowMap[TCustomPanel(AWinControl).BorderStyle]);
+ gtk_viewport_set_shadow_type(PGtkViewport(Widget), BorderStyleShadowMap[TCustomPanel(AWinControl).BorderStyle]);
TempWidget := CreateFixedClientWidget;
gtk_container_add(GTK_CONTAINER(Widget), TempWidget);
gtk_widget_show(TempWidget);
Index: lcl/interfaces/gtk/gtkwscontrols.pp
===================================================================
--- lcl/interfaces/gtk/gtkwscontrols.pp (revision 16983)
+++ lcl/interfaces/gtk/gtkwscontrols.pp (revision 16984)
@@ -318,7 +318,10 @@
GTKAPIWidget_SetShadowType(PGTKAPIWidget(Widget), BorderStyleShadowMap[ABorderStyle])
else
if GTK_IS_FRAME(Widget) then
- gtk_frame_set_shadow_type(PGtkFrame(Widget), BorderStyleShadowMap[ABorderStyle]);
+ gtk_frame_set_shadow_type(PGtkFrame(Widget), BorderStyleShadowMap[ABorderStyle])
+ else
+ if GTK_IS_VIEWPORT(Widget) then
+ gtk_viewport_set_shadow_type(PGtkViewport(Widget), BorderStyleShadowMap[ABorderStyle]);
end;
{$IFDEF GTK1}
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus