author | sandman <sandman> | 2002-10-01 22:39:41 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-10-01 22:39:41 (UTC) |
commit | 73f578b88919d8f7220c3f647c4173ffa4e4512b (patch) (side-by-side diff) | |
tree | b925ef79ffafa54d8e9f81e4a3f1bcc100f6babd | |
parent | 536fffa98e7fb205fe1851caaf29011e3fad79cc (diff) | |
download | opie-73f578b88919d8f7220c3f647c4173ffa4e4512b.zip opie-73f578b88919d8f7220c3f647c4173ffa4e4512b.tar.gz opie-73f578b88919d8f7220c3f647c4173ffa4e4512b.tar.bz2 |
fixed the missing/wrong icons in the tabbar
-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index e269aec..43ff24c 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp @@ -266,194 +266,194 @@ QWidget *Appearance::createColorTab ( QWidget *parent ) config. setGroup ( "Appearance" ); QWidget *tab = new QWidget( parent, "ColorTab" ); QGridLayout *gridLayout = new QGridLayout( tab, 0, 0, 4, 4 ); gridLayout->setRowStretch ( 3, 10 ); m_color_list = new QListBox ( tab ); gridLayout->addMultiCellWidget ( m_color_list, 0, 3, 0, 0 ); connect( m_color_list, SIGNAL( highlighted( int ) ), this, SLOT( colorClicked( int ) ) ); loadColors ( m_color_list ); m_color_list-> setCurrentItem ( 0 ); QPushButton* tempButton = new QPushButton( tab, "editSchemeButton" ); tempButton->setText( tr( "Edit..." ) ); connect( tempButton, SIGNAL( clicked() ), this, SLOT( editSchemeClicked() ) ); gridLayout->addWidget( tempButton, 0, 1 ); tempButton = new QPushButton( tab, "deleteSchemeButton" ); tempButton->setText( tr( "Delete" ) ); connect( tempButton, SIGNAL( clicked() ), this, SLOT( deleteSchemeClicked() ) ); gridLayout->addWidget( tempButton, 1, 1 ); tempButton = new QPushButton( tab, "saveSchemeButton" ); tempButton->setText( tr( "Save" ) ); connect( tempButton, SIGNAL( clicked() ), this, SLOT( saveSchemeClicked() ) ); gridLayout->addWidget( tempButton, 2, 1 ); return tab; } QWidget *Appearance::createGuiTab ( QWidget *parent ) { Config config ( "qpe" ); config. setGroup ( "Appearance" ); QWidget *tab = new QWidget( parent, "AdvancedTab" ); QVBoxLayout *vertLayout = new QVBoxLayout( tab, 4, 4 ); QGridLayout* gridLayout = new QGridLayout ( vertLayout ); int style = config. readNumEntry ( "TabStyle", 2 ) - 1; bool tabtop = ( config. readEntry ( "TabPosition", "Top" ) == "Top" ); QLabel* label = new QLabel( tr( "Tab style:" ), tab ); gridLayout-> addWidget ( label, 0, 0 ); QButtonGroup* btngrp = new QButtonGroup( tab, "buttongroup" ); btngrp-> hide ( ); btngrp-> setExclusive ( true ); m_tabstyle_list = new QComboBox ( false, tab, "tabstyle" ); m_tabstyle_list-> insertItem ( tr( "Tabs" )); m_tabstyle_list-> insertItem ( tr( "Tabs w/icons" )); m_tabstyle_list-> insertItem ( tr( "Drop down list" )); m_tabstyle_list-> insertItem ( tr( "Drop down list w/icons" )); m_tabstyle_list-> setCurrentItem ( style ); gridLayout-> addMultiCellWidget ( m_tabstyle_list, 0, 0, 1, 2 ); m_tabstyle_top = new QRadioButton( tr( "Top" ), tab, "tabpostop" ); btngrp-> insert ( m_tabstyle_top ); gridLayout-> addWidget( m_tabstyle_top, 1, 1 ); m_tabstyle_bottom = new QRadioButton( tr( "Bottom" ), tab, "tabposbottom" ); btngrp-> insert ( m_tabstyle_bottom ); gridLayout-> addWidget( m_tabstyle_bottom, 1, 2 ); m_tabstyle_top-> setChecked ( tabtop ); m_tabstyle_bottom-> setChecked ( !tabtop ); m_original_tabstyle = style; m_original_tabpos = tabtop; return tab; } Appearance::Appearance( QWidget* parent, const char* name, WFlags ) : QDialog ( parent, name, true ) { setCaption( tr( "Appearance" ) ); Config config( "qpe" ); config.setGroup( "Appearance" ); QVBoxLayout *top = new QVBoxLayout ( this, 4, 4 ); m_sample = new SampleWindow ( this ); m_sample-> setDecoration ( new DefaultWindowDecoration ( )); OTabWidget* tw = new OTabWidget ( this, "tabwidget", OTabWidget::Global, OTabWidget::Bottom ); QWidget *styletab; tw-> addTab ( styletab = createStyleTab ( tw ), "appearance/styletabicon.png", tr( "Style" )); tw-> addTab ( createFontTab ( tw ), "appearance/fonttabicon.png", tr( "Font" )); tw-> addTab ( createColorTab ( tw ), "appearance/colorstabicon.png", tr( "Colors" ) ); - tw-> addTab ( createDecoTab ( tw ), "appearance/styletabicon.png", tr( "Windows" ) ); - tw-> addTab ( createGuiTab ( tw ), "appearance/backgroundtabicon.png", tr( "Gui" ) ); + tw-> addTab ( createDecoTab ( tw ), "appearance/decotabicon.png", tr( "Windows" ) ); + tw-> addTab ( createGuiTab ( tw ), "appearance/advancedtabicon.png", tr( "Gui" ) ); top-> addWidget ( tw, 10 ); top-> addWidget ( m_sample, 1 ); tw-> setCurrentTab ( styletab ); } Appearance::~Appearance() { } void Appearance::accept ( ) { Config config("qpe"); config.setGroup( "Appearance" ); int newtabstyle = m_tabstyle_list-> currentItem ( ); bool newtabpos = m_tabstyle_top-> isChecked ( ); if ( m_style_changed ) { StyleListItem *item = (StyleListItem *) m_style_list-> item ( m_style_list-> currentItem ( )); if ( item ) config.writeEntry( "Style", item-> key ( )); } if (( newtabstyle != m_original_tabstyle ) || ( newtabpos != m_original_tabpos )) { config. writeEntry ( "TabStyle", newtabstyle + 1 ); config. writeEntry ( "TabPosition", newtabpos ? "Top" : "Bottom" ); } if ( m_font_changed ) { config. writeEntry ( "FontFamily", m_fontselect-> fontFamily ( )); config. writeEntry ( "FontStyle", m_fontselect-> fontStyle ( )); config. writeEntry ( "FontSize", m_fontselect-> fontSize ( )); } if ( m_color_changed ) { ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( )); if ( item ) item-> save ( config ); } config. write ( ); // need to flush the config info first Global::applyStyle ( ); if ( QMessageBox::warning ( this, tr( "Restart" ), tr( "Do you want to restart Opie now?" ), tr( "Yes" ), tr( "No" ), 0, 0, 1 ) == 0 ) { QCopEnvelope e( "QPE/System", "restart()" ); } QDialog::accept ( ); } void Appearance::done ( int r ) { QDialog::done ( r ); close ( ); } void Appearance::styleClicked ( int index ) { StyleListItem *sli = (StyleListItem *) m_style_list-> item ( index ); m_style_settings-> setEnabled ( sli ? sli-> hasSettings ( ) : false ); if ( m_sample && sli && sli-> style ( )) m_sample-> setStyle2 ( sli-> style ( )); m_style_changed |= ( index != m_original_style ); } void Appearance::styleSettingsClicked ( ) { StyleListItem *item = (StyleListItem *) m_style_list-> item ( m_style_list-> currentItem ( )); if ( item && item-> hasSettings ( )) { QDialog *d = new QDialog ( this, "SETTINGS-DLG", true ); QVBoxLayout *vbox = new QVBoxLayout ( d, 4, 0 ); QWidget *w = item-> settings ( d ); if ( w ) { vbox-> addWidget ( w ); d-> setCaption ( w-> caption ( )); d-> showMaximized ( ); bool accepted = ( d-> exec ( ) == QDialog::Accepted ); if ( item-> setSettings ( accepted )) m_style_changed = true; } delete d; |