From a18c2043c41319f23c582cf15fc051bd6b6f262f Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Mon, 26 Dec 2022 23:09:43 +0000
Subject: [PATCH] Minor adjustment for bitmap button size for GTK.

---
 common/widgets/split_button.cpp      | 7 +++++--
 common/widgets/std_bitmap_button.cpp | 7 +++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/common/widgets/split_button.cpp b/common/widgets/split_button.cpp
index 5b14e9cecb..01ff174da1 100644
--- a/common/widgets/split_button.cpp
+++ b/common/widgets/split_button.cpp
@@ -245,7 +245,7 @@ void SPLIT_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
                     dc.SetPen( fg );
                 }
 
-                dc.DrawRoundedRectangle( aRect, aRect.height / 4 );
+                dc.DrawRoundedRectangle( aRect, aRect.height / 4.0 );
             };
 #endif
 
@@ -260,7 +260,10 @@ void SPLIT_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
     // wxRendereNative doesn't handle dark mode on OSX.
     drawBackground( r1 );
 #else
-    r1.width += 2;
+    #ifdef _WXMSW_
+        r1.width += 2;
+    #endif
+
     wxRendererNative::Get().DrawPushButton( this, dc, r1, m_stateButton );
 #endif
 
diff --git a/common/widgets/std_bitmap_button.cpp b/common/widgets/std_bitmap_button.cpp
index 88c3c2cff0..affba224a7 100644
--- a/common/widgets/std_bitmap_button.cpp
+++ b/common/widgets/std_bitmap_button.cpp
@@ -173,7 +173,7 @@ void STD_BITMAP_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
                     dc.SetPen( fg );
                 }
 
-                dc.DrawRoundedRectangle( aRect, aRect.height / 4 );
+                dc.DrawRoundedRectangle( aRect, aRect.height / 4.0 );
             };
 #endif
 
@@ -187,7 +187,10 @@ void STD_BITMAP_BUTTON::OnPaint( wxPaintEvent& WXUNUSED( aEvent ) )
     // wxRendereNative doesn't handle dark mode on OSX.
     drawBackground( r1 );
 #else
-    r1.width += 1;
+    #ifdef __WXMSW__
+        r1.width += 1;
+    #endif
+
     wxRendererNative::Get().DrawPushButton( this, dc, r1, m_stateButton );
 #endif