Diffstat (limited to 'core/settings/launcher/tabdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/launcher/tabdialog.cpp | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index a90ba7d..d20412a 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp @@ -41,2 +41,3 @@ #include <qwhatsthis.h> +#include <qcheckbox.h> @@ -269,3 +270,3 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig - QVBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); + QVBoxLayout *lay = new QVBoxLayout ( this, 3, 3 ); @@ -299,3 +300,5 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig bgTypeClicked ( tc. m_bg_type ); + m_fontuse-> setChecked ( tc. m_font_use ); m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic )); + m_fontselect-> setEnabled ( m_fontuse-> isChecked ( )); fontClicked ( m_fontselect-> selectedFont ( )); @@ -312,4 +315,12 @@ QWidget *TabDialog::createFontTab ( QWidget *parent ) { - m_fontselect = new OFontSelector ( false, parent, "FontTab" ); + QWidget *tab = new QWidget ( parent, "FontTab" ); + QVBoxLayout *vertLayout = new QVBoxLayout ( tab, 3, 3 ); + m_fontuse = new QCheckBox ( tr( "Use a custom font" ), tab ); + vertLayout-> addWidget ( m_fontuse ); + + m_fontselect = new OFontSelector ( false, tab, "fontsel" ); + vertLayout-> addWidget ( m_fontselect ); + + connect ( m_fontuse, SIGNAL( toggled ( bool )), m_fontselect, SLOT( setEnabled ( bool ))); connect( m_fontselect, SIGNAL( fontSelected ( const QFont & )), @@ -317,3 +328,3 @@ QWidget *TabDialog::createFontTab ( QWidget *parent ) - return m_fontselect; + return tab; } @@ -322,4 +333,4 @@ QWidget *TabDialog::createBgTab ( QWidget *parent ) { - QWidget *tab = new QWidget( parent, "AdvancedTab" ); - QVBoxLayout *vertLayout = new QVBoxLayout( tab, 4, 4 ); + QWidget *tab = new QWidget( parent, "BgTab" ); + QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); @@ -340,3 +351,3 @@ QWidget *TabDialog::createBgTab ( QWidget *parent ) QHBoxLayout *hb = new QHBoxLayout ( ); - hb-> setSpacing ( 4 ); + hb-> setSpacing ( 3 ); @@ -355,3 +366,3 @@ QWidget *TabDialog::createBgTab ( QWidget *parent ) hb = new QHBoxLayout ( ); - hb-> setSpacing ( 4 ); + hb-> setSpacing ( 3 ); @@ -382,4 +393,4 @@ QWidget *TabDialog::createIconTab ( QWidget *parent ) { - QWidget *tab = new QWidget( parent, "AdvancedTab" ); - QVBoxLayout *vertLayout = new QVBoxLayout( tab, 4, 4 ); + QWidget *tab = new QWidget( parent, "IconTab" ); + QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); @@ -492,2 +503,5 @@ void TabDialog::accept ( ) + m_tc. m_font_use = m_fontuse-> isChecked ( ); + + if ( m_tc. m_font_use ) { QFont f = m_fontselect-> selectedFont ( ); @@ -498,2 +512,3 @@ void TabDialog::accept ( ) m_tc. m_font_italic = f. italic ( ); + } |