Commit 5c7316ef authored by Clément Stenac's avatar Clément Stenac

Re-enable custom fonts in preferences, without the crash

parent f3098146
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "components/preferences.hpp" #include "components/preferences.hpp"
#include "components/preferences_widgets.hpp" #include "components/preferences_widgets.hpp"
#include "qt4.hpp" #include "qt4.hpp"
...@@ -35,7 +34,7 @@ ...@@ -35,7 +34,7 @@
#include "pixmaps/advanced.xpm" #include "pixmaps/advanced.xpm"
#include "pixmaps/codec.xpm" #include "pixmaps/codec.xpm"
#include "pixmaps/intf.xpm" #include "pixmaps/intf.xpm"
#include <QApplication>
#include <QLabel> #include <QLabel>
#include <QTreeWidget> #include <QTreeWidget>
#include <QTreeWidgetItem> #include <QTreeWidgetItem>
...@@ -70,16 +69,8 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) : ...@@ -70,16 +69,8 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
setAlternatingRowColors( true ); setAlternatingRowColors( true );
header()->hide(); header()->hide();
#ifndef WIN32 QFont myFont = QApplication::font(0);
// Fixme - A bit UGLY myFont.setPointSize( myFont.pointSize() + 3 ); myFont.setBold( true );
QFont f = font();
int pSize = f.pointSize();
if( pSize > 0 )
f.setPointSize( pSize + 1 );
else
f.setPixelSize( f.pixelSize() + 1 );
setFont( f );
#endif
#define BI( a,b) QIcon a##_icon = QIcon( QPixmap( b##_xpm )) #define BI( a,b) QIcon a##_icon = QIcon( QPixmap( b##_xpm ))
BI( audio, audio ); BI( audio, audio );
...@@ -406,16 +397,15 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -406,16 +397,15 @@ PrefsPanel::PrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
} }
} }
QLabel *label = new QLabel( head, this ); QLabel *label = new QLabel( head );
#ifndef WIN32 global_layout->addWidget( label );
QFont font = label->font(); QFont myFont = QApplication::font(0);
font.setPointSize( font.pointSize() + 2 ); font.setBold( true ); myFont.setPointSize( myFont.pointSize() + 3 ); myFont.setBold( true );
label->setFont( font );
#endif label->setFont( myFont );
QLabel *help = new QLabel( data->help, this ); QLabel *help = new QLabel( data->help, this );
help->setWordWrap( true ); help->setWordWrap( true );
global_layout->addWidget( label );
global_layout->addWidget( help ); global_layout->addWidget( help );
QGroupBox *box = NULL; QGroupBox *box = NULL;
......
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