mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 17:39:22 +02:00
Gtk2: fixed regression in TGtk2WidgetSet.InvalidateRect() for GtkFixed widgets (TGroupBox, TTabSheet).issue #25572
git-svn-id: trunk@44093 -
This commit is contained in:
parent
ee2a512b9b
commit
204e1058b2
@ -6286,6 +6286,23 @@ begin
|
|||||||
begin
|
begin
|
||||||
Inc(gdkRect.X, PaintWidget^.Allocation.x);
|
Inc(gdkRect.X, PaintWidget^.Allocation.x);
|
||||||
Inc(gdkRect.Y, PaintWidget^.Allocation.y);
|
Inc(gdkRect.Y, PaintWidget^.Allocation.y);
|
||||||
|
// issue #25572
|
||||||
|
if GTK_IS_FIXED(PaintWidget) and GTK_IS_EVENT_BOX(PaintWidget^.parent) then
|
||||||
|
begin
|
||||||
|
Inc(gdkRect.Width, PaintWidget^.Allocation.x);
|
||||||
|
Inc(gdkRect.Height, PaintWidget^.Allocation.y);
|
||||||
|
// DebugLn('#25572 PATCH FOR ',dbgsName(LCLObject),' GdkRect=',dbgs(gdkRect),' Alloc=',dbgs(TGdkRectangle(PaintWidget^.allocation)));
|
||||||
|
{GtkWidget isn't yet allocated to LCL size, do not call invalid area update - update complete gtkwidget}
|
||||||
|
if (gdkRect.Width > PaintWidget^.allocation.width) or (gdkRect.Height > PaintWidget^.allocation.Height) then
|
||||||
|
begin
|
||||||
|
// DebugLn('*** WARNING: Rect to paint is bigger than widget Width diff=',dbgs(gdkRect.Width - PaintWidget^.allocation.width),
|
||||||
|
// ' Height diff=',dbgs(gdkRect.Height - PaintWidget^.allocation.height));
|
||||||
|
if bErase then
|
||||||
|
gtk_widget_queue_clear(PaintWidget);
|
||||||
|
gtk_widget_queue_draw(PaintWidget);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
if (LCLObject is TScrollingWinControl) and GTK_IS_SCROLLED_WINDOW(Widget) then
|
if (LCLObject is TScrollingWinControl) and GTK_IS_SCROLLED_WINDOW(Widget) then
|
||||||
begin
|
begin
|
||||||
@ -6310,6 +6327,7 @@ begin
|
|||||||
|
|
||||||
gtk_widget_queue_draw_area(PaintWidget,
|
gtk_widget_queue_draw_area(PaintWidget,
|
||||||
gdkRect.X,gdkRect.Y,gdkRect.Width,gdkRect.Height);
|
gdkRect.X,gdkRect.Y,gdkRect.Width,gdkRect.Height);
|
||||||
|
|
||||||
//DebugLn(['TGtk2WidgetSet.InvalidateRect ',GetWidgetDebugReport(Widget),' IsAPI=',GtkWidgetIsA(PGTKWidget(Widget),GTKAPIWidget_GetType)]);
|
//DebugLn(['TGtk2WidgetSet.InvalidateRect ',GetWidgetDebugReport(Widget),' IsAPI=',GtkWidgetIsA(PGTKWidget(Widget),GTKAPIWidget_GetType)]);
|
||||||
if GtkWidgetIsA(PGTKWidget(Widget),GTKAPIWidget_GetType) then
|
if GtkWidgetIsA(PGTKWidget(Widget),GTKAPIWidget_GetType) then
|
||||||
GTKAPIWidget_InvalidateCaret(PGTKAPIWidget(Widget));
|
GTKAPIWidget_InvalidateCaret(PGTKAPIWidget(Widget));
|
||||||
|
Loading…
Reference in New Issue
Block a user