Commit 8f61a016 authored by Ludovic Fauvet's avatar Ludovic Fauvet

Settings: fix some layout bugs

parent e20dbfc7
......@@ -50,6 +50,7 @@ Panel::Panel( QWidget* parent )
m_buttons->setExclusive( true );
m_layout->setMargin( 0 );
m_layout->setSpacing( 1 );
m_layout->insertSpacerItem( 1, new QSpacerItem( 1, 1, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
QObject::connect( m_buttons,
SIGNAL( buttonClicked( int ) ),
......@@ -79,11 +80,10 @@ void Panel::addButton( const QString& label,
button->setIconSize( QSize( Panel::M_ICON_HEIGHT,
Panel::M_ICON_HEIGHT) );
button->setToolButtonStyle( Qt::ToolButtonTextUnderIcon );
button->resize( Panel::M_ICON_HEIGHT + 6,
Panel::M_ICON_HEIGHT + 6 );
button->setSizePolicy( QSizePolicy::Expanding,
QSizePolicy::Expanding );
QSizePolicy::Minimum );
if ( m_firstButton == 0 )
{
button->setChecked( true );
......@@ -91,7 +91,8 @@ void Panel::addButton( const QString& label,
m_firstButtonNb = number;
}
m_buttons->addButton( button, number );
m_layout->addWidget( button );
m_layout->insertWidget( m_layout->count() - 1, button );
}
void Panel::show()
......
......@@ -48,6 +48,8 @@ Settings::Settings( bool loadDefaults,
m_name( name )
{
m_panel = new Panel( this );
m_panel->setMaximumWidth( 130 );
m_stackedWidgets = new QStackedWidget( this );
SettingsManager::getInstance()->addNewSettingsPart( m_name );
connect();
......
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>415</width>
<height>304</height>
<height>126</height>
</rect>
</property>
<property name="windowTitle">
......@@ -48,19 +48,6 @@
</property>
</widget>
</item>
<item row="6" column="0">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>139</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0">
<widget class="QLabel" name="automaticSaveLabell">
<property name="text">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment