From 48cc5bef59a44e2239c8828993ca36fad234db0d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Kempf Date: Sat, 28 Apr 2007 15:11:17 +0000 Subject: [PATCH] Qt4 - Preferences: Fix the help text behaviour from modules. Known also as the very-too-wide-resizing-and-very-too-big-letters. --- .../gui/qt4/components/complete_preferences.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/gui/qt4/components/complete_preferences.cpp b/modules/gui/qt4/components/complete_preferences.cpp index 6a85fe9da4..462b368518 100644 --- a/modules/gui/qt4/components/complete_preferences.cpp +++ b/modules/gui/qt4/components/complete_preferences.cpp @@ -378,6 +378,10 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, global_layout = new QVBoxLayout(); global_layout->setMargin( 2 ); QString head; + QString help; + + help = QString( data->help ); + if( data->i_type == TYPE_SUBCATEGORY || data->i_type == TYPE_CATSUBCAT ) { head = QString( data->name ); @@ -388,8 +392,8 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, head = QString( qfu(p_module->psz_longname) ); if( p_module->psz_help ) { - head.append( "\n" ); - head.append( qfu( p_module->psz_help ) ); + help.append( "\n" ); + help.append( qfu( p_module->psz_help ) ); } } @@ -397,12 +401,12 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, global_layout->addWidget( label ); QFont myFont = QApplication::font( static_cast(0) ); myFont.setPointSize( myFont.pointSize() + 3 ); myFont.setBold( true ); - label->setFont( myFont ); - QLabel *help = new QLabel( data->help, this ); - help->setWordWrap( true ); - global_layout->addWidget( help ); + QLabel *helpLabel = new QLabel( help, this ); + helpLabel->setWordWrap( true ); + + global_layout->addWidget( helpLabel ); QGroupBox *box = NULL; QGridLayout *boxlayout = NULL; -- 2.39.2