From b7b7dedc1fa70c7d2348a4cfe78617e99131bfa8 Mon Sep 17 00:00:00 2001
From: Robert Roebling <robert@roebling.de>
Date: Sun, 22 Feb 2004 11:50:09 +0000
Subject: [PATCH]   Fixed some probs in wxRadioBox

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/gtk/radiobox.cpp  | 11 +++++++----
 src/gtk1/radiobox.cpp | 11 +++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp
index 7463243d03..d4240061a6 100644
--- a/src/gtk/radiobox.cpp
+++ b/src/gtk/radiobox.cpp
@@ -317,13 +317,16 @@ wxSize wxRadioBox::LayoutItems()
         num_of_cols = num_per_major;
         num_of_rows = m_majorDim;
     }
-
+    
+    int lineheight = GetCharHeight();
+    
     if ( HasFlag(wxRA_SPECIFY_COLS) ||
          (HasFlag(wxRA_SPECIFY_ROWS) && (num_of_cols > 1)) )
     {
         for (int j = 0; j < num_of_cols; j++)
         {
-            y = 15;
+            y = 3;
+            y += lineheight;
 
             int max_len = 0;
             wxList::compatibility_iterator node = m_boxes.Item( j*num_of_rows );
@@ -353,7 +356,7 @@ wxSize wxRadioBox::LayoutItems()
             {
                 GtkWidget *button = GTK_WIDGET( node->GetData() );
 
-                gtk_pizza_resize( GTK_PIZZA(m_parent->m_wxwindow), button, max_len, 20 );
+                gtk_pizza_resize( GTK_PIZZA(m_parent->m_wxwindow), button, max_len, lineheight );
 
                 node = node->GetNext();
                 if (!node) break;
@@ -392,7 +395,7 @@ wxSize wxRadioBox::LayoutItems()
         {
             GtkWidget *button = GTK_WIDGET( node->GetData() );
 
-            gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y, max, 20 );
+            gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y, max, lineheight );
             x += max;
 
             node = node->GetNext();
diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp
index 7463243d03..d4240061a6 100644
--- a/src/gtk1/radiobox.cpp
+++ b/src/gtk1/radiobox.cpp
@@ -317,13 +317,16 @@ wxSize wxRadioBox::LayoutItems()
         num_of_cols = num_per_major;
         num_of_rows = m_majorDim;
     }
-
+    
+    int lineheight = GetCharHeight();
+    
     if ( HasFlag(wxRA_SPECIFY_COLS) ||
          (HasFlag(wxRA_SPECIFY_ROWS) && (num_of_cols > 1)) )
     {
         for (int j = 0; j < num_of_cols; j++)
         {
-            y = 15;
+            y = 3;
+            y += lineheight;
 
             int max_len = 0;
             wxList::compatibility_iterator node = m_boxes.Item( j*num_of_rows );
@@ -353,7 +356,7 @@ wxSize wxRadioBox::LayoutItems()
             {
                 GtkWidget *button = GTK_WIDGET( node->GetData() );
 
-                gtk_pizza_resize( GTK_PIZZA(m_parent->m_wxwindow), button, max_len, 20 );
+                gtk_pizza_resize( GTK_PIZZA(m_parent->m_wxwindow), button, max_len, lineheight );
 
                 node = node->GetNext();
                 if (!node) break;
@@ -392,7 +395,7 @@ wxSize wxRadioBox::LayoutItems()
         {
             GtkWidget *button = GTK_WIDGET( node->GetData() );
 
-            gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y, max, 20 );
+            gtk_pizza_set_size( GTK_PIZZA(m_parent->m_wxwindow), button, m_x+x, m_y+y, max, lineheight );
             x += max;
 
             node = node->GetNext();
-- 
2.47.2