Commit 6d04a56f authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: fix column size in complete preferences

Close #3887
parent 204eaed4
/*****************************************************************************
* preferences.cpp : "Normal preferences"
****************************************************************************
* Copyright (C) 2006-2007 the VideoLAN team
* Copyright (C) 2006-2011 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
......@@ -59,6 +59,9 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
setIconSize( QSize( ITEM_HEIGHT,ITEM_HEIGHT ) );
setTextElideMode( Qt::ElideNone );
setUniformRowHeights( true );
CONNECT( this, itemExpanded(QTreeWidgetItem*), this, resizeColumns() );
/* Nice icons */
#define BI( a,b) QIcon a##_icon = QIcon( b )
BI( audio, ":/prefsmenu/advanced/audio" );
......@@ -285,8 +288,6 @@ PrefsTree::PrefsTree( intf_thread_t *_p_intf, QWidget *_parent ) :
resizeColumnToContents( 0 );
}
PrefsTree::~PrefsTree() {}
void PrefsTree::applyAll()
{
doAll( false );
......@@ -411,6 +412,11 @@ void PrefsTree::filter( const QString &text )
}
}
void PrefsTree::resizeColumns()
{
resizeColumnToContents( 0 );
}
/* go over the module config items and search text in psz_text
* also search the module name and head */
bool PrefsItemData::contains( const QString &text, Qt::CaseSensitivity cs )
......
......@@ -68,7 +68,6 @@ class PrefsTree : public QTreeWidget
Q_OBJECT
public:
PrefsTree( intf_thread_t *, QWidget * );
virtual ~PrefsTree();
void applyAll();
void cleanAll();
......@@ -79,6 +78,9 @@ private:
bool filterItems( QTreeWidgetItem *item, const QString &text, Qt::CaseSensitivity cs );
bool collapseUnselectedItems( QTreeWidgetItem *item );
intf_thread_t *p_intf;
private slots:
void resizeColumns();
};
class ConfigControl;
......
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