Fixed some probs in wxRadioBox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25913 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -318,12 +318,15 @@ wxSize wxRadioBox::LayoutItems()
|
|||||||
num_of_rows = m_majorDim;
|
num_of_rows = m_majorDim;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int lineheight = GetCharHeight();
|
||||||
|
|
||||||
if ( HasFlag(wxRA_SPECIFY_COLS) ||
|
if ( HasFlag(wxRA_SPECIFY_COLS) ||
|
||||||
(HasFlag(wxRA_SPECIFY_ROWS) && (num_of_cols > 1)) )
|
(HasFlag(wxRA_SPECIFY_ROWS) && (num_of_cols > 1)) )
|
||||||
{
|
{
|
||||||
for (int j = 0; j < num_of_cols; j++)
|
for (int j = 0; j < num_of_cols; j++)
|
||||||
{
|
{
|
||||||
y = 15;
|
y = 3;
|
||||||
|
y += lineheight;
|
||||||
|
|
||||||
int max_len = 0;
|
int max_len = 0;
|
||||||
wxList::compatibility_iterator node = m_boxes.Item( j*num_of_rows );
|
wxList::compatibility_iterator node = m_boxes.Item( j*num_of_rows );
|
||||||
@@ -353,7 +356,7 @@ wxSize wxRadioBox::LayoutItems()
|
|||||||
{
|
{
|
||||||
GtkWidget *button = GTK_WIDGET( node->GetData() );
|
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();
|
node = node->GetNext();
|
||||||
if (!node) break;
|
if (!node) break;
|
||||||
@@ -392,7 +395,7 @@ wxSize wxRadioBox::LayoutItems()
|
|||||||
{
|
{
|
||||||
GtkWidget *button = GTK_WIDGET( node->GetData() );
|
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;
|
x += max;
|
||||||
|
|
||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
|
@@ -318,12 +318,15 @@ wxSize wxRadioBox::LayoutItems()
|
|||||||
num_of_rows = m_majorDim;
|
num_of_rows = m_majorDim;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int lineheight = GetCharHeight();
|
||||||
|
|
||||||
if ( HasFlag(wxRA_SPECIFY_COLS) ||
|
if ( HasFlag(wxRA_SPECIFY_COLS) ||
|
||||||
(HasFlag(wxRA_SPECIFY_ROWS) && (num_of_cols > 1)) )
|
(HasFlag(wxRA_SPECIFY_ROWS) && (num_of_cols > 1)) )
|
||||||
{
|
{
|
||||||
for (int j = 0; j < num_of_cols; j++)
|
for (int j = 0; j < num_of_cols; j++)
|
||||||
{
|
{
|
||||||
y = 15;
|
y = 3;
|
||||||
|
y += lineheight;
|
||||||
|
|
||||||
int max_len = 0;
|
int max_len = 0;
|
||||||
wxList::compatibility_iterator node = m_boxes.Item( j*num_of_rows );
|
wxList::compatibility_iterator node = m_boxes.Item( j*num_of_rows );
|
||||||
@@ -353,7 +356,7 @@ wxSize wxRadioBox::LayoutItems()
|
|||||||
{
|
{
|
||||||
GtkWidget *button = GTK_WIDGET( node->GetData() );
|
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();
|
node = node->GetNext();
|
||||||
if (!node) break;
|
if (!node) break;
|
||||||
@@ -392,7 +395,7 @@ wxSize wxRadioBox::LayoutItems()
|
|||||||
{
|
{
|
||||||
GtkWidget *button = GTK_WIDGET( node->GetData() );
|
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;
|
x += max;
|
||||||
|
|
||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
|
Reference in New Issue
Block a user