Hi,
Here's the patch for GTK3 BitBtn, which makes attached Glyph to behave the same as on GTK2/QT5.
I have zero experience with GTK2/GTK3 so I asked copilot to fix the code and it did

Tested on Ubuntu 25.10 (wayland) and BitBtn with a glyph and spacing property looks exactly as I expected it to look.
diff --git a/lcl/interfaces/gtk3/gtk3widgets.pas b/lcl/interfaces/gtk3/gtk3widgets.pas
index bec6a95b4f..6bda7e7aad 100644
--- a/lcl/interfaces/gtk3/gtk3widgets.pas
+++ b/lcl/interfaces/gtk3/gtk3widgets.pas
@@ -10847,26 +10847,50 @@ end;
procedure TGtk3Button.SetSpacing(AValue: Integer);
var
- ATGValue: TGValue;
- AImage: PGtkWidget;
+ Img: PGtkWidget;
+ Pos: TGtkPositionType;
+ MarginTop, MarginBottom, MarginLeft, MarginRight: Integer;
begin
- // if FSpacing=AValue then Exit;
- FSpacing:=AValue;
+ // Normalize spacing
if AValue < 0 then
- FSpacing := 2;
- ATGValue.g_type := G_TYPE_INT;
- ATGValue.set_int(AValue);
+ AValue := 0;
- // no way under gtk3 ... we cannot set style property image-spacing
- // so we are using cheat
- AImage := PGtkButton(FWidget)^.get_image;
- if AImage <> nil then
- begin
- if AValue < 0 then
- AVAlue := 0;
- //TODO: margin depends on layout ! This is ok for left (default) layout
- PGtkImage(AImage)^.set_margin_right(AValue);
+ FSpacing := AValue;
+
+ // Get the image widget
+ Img := PGtkButton(FWidget)^.get_image;
+ if Img = nil then
+ Exit;
+
+ // Get current image position
+ Pos := PGtkButton(FWidget)^.get_image_position;
+
+ // Reset all margins first
+ MarginTop := 0;
+ MarginBottom := 0;
+ MarginLeft := 0;
+ MarginRight := 0;
+
+ // Apply spacing depending on position
+ case Pos of
+ GTK_POS_LEFT:
+ MarginRight := AValue;
+
+ GTK_POS_RIGHT:
+ MarginLeft := AValue;
+
+ GTK_POS_TOP:
+ MarginBottom := AValue;
+
+ GTK_POS_BOTTOM:
+ MarginTop := AValue;
end;
+
+ // Apply margins
+ PGtkWidget(Img)^.set_margin_top(MarginTop);
+ PGtkWidget(Img)^.set_margin_bottom(MarginBottom);
+ PGtkWidget(Img)^.set_margin_left(MarginLeft);
+ PGtkWidget(Img)^.set_margin_right(MarginRight);
end;
procedure TGtk3Button.SetImage(AImage: TBitmap);