summaryrefslogtreecommitdiff
authorzecke <zecke>2005-02-08 23:07:38 (UTC)
committer zecke <zecke>2005-02-08 23:07:38 (UTC)
commit5703c0b74a0866145a24a01e68530ed36a33e9cc (patch) (side-by-side diff)
tree6cd77da956b55cd8bfd760f266ce23b10e6b5b48
parent80144c63f04e798b10a966402f235d236e3e540f (diff)
downloadopie-5703c0b74a0866145a24a01e68530ed36a33e9cc.zip
opie-5703c0b74a0866145a24a01e68530ed36a33e9cc.tar.gz
opie-5703c0b74a0866145a24a01e68530ed36a33e9cc.tar.bz2
Reuse the gained space and implement the "Scrollbars on Left" GUI Setting
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/appearance2/appearance.cpp16
-rw-r--r--noncore/settings/appearance2/appearance.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp
index d649ed6..82d8931 100644
--- a/noncore/settings/appearance2/appearance.cpp
+++ b/noncore/settings/appearance2/appearance.cpp
@@ -272,48 +272,62 @@ QWidget *Appearance::createColorTab ( QWidget *parent, Config &cfg )
connect( tempButton, SIGNAL( clicked() ), this, SLOT( editSchemeClicked() ) );
gridLayout->addWidget( tempButton, 0, 1 );
QWhatsThis::add( tempButton, tr( "Click here to change the colors in the current color scheme." ) );
tempButton = new QPushButton( tab, "deleteSchemeButton" );
tempButton->setText( tr( "Delete" ) );
connect( tempButton, SIGNAL( clicked() ), this, SLOT( deleteSchemeClicked() ) );
gridLayout->addWidget( tempButton, 1, 1 );
QWhatsThis::add( tempButton, tr( "Click here to delete the color scheme selected in the list to the left." ) );
tempButton = new QPushButton( tab, "saveSchemeButton" );
tempButton->setText( tr( "Save" ) );
connect( tempButton, SIGNAL( clicked() ), this, SLOT( saveSchemeClicked() ) );
gridLayout->addWidget( tempButton, 2, 1 );
QWhatsThis::add( tempButton, tr( "Click here to name and save the current color scheme." ) );
return tab;
}
QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg )
{
QWidget *tab = new QWidget ( parent );
QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 );
+ /*
+ * show scrollbars on the left?
+ */
+ m_leftHand = new QCheckBox( tr("Show Scrollbars on the left"), tab );
+ m_leftHand->setChecked( cfg.readBoolEntry( "LeftHand", false ) );
+ QWhatsThis::add( m_leftHand, tr( "Click here to display scrollbars on the left side instead of the right." ) );
+ vertLayout->addWidget( m_leftHand );
+
+ QFrame *f = new QFrame ( tab );
+ f-> setFrameStyle ( QFrame::HLine | QFrame::Sunken );
+ vertLayout-> addWidget ( f );
+ vertLayout-> addSpacing ( 3 );
+
+
QGridLayout* gridLayout = new QGridLayout ( vertLayout, 0, 0, 3, 0 );
int style = cfg. readNumEntry ( "TabStyle", 2 ) - 1;
bool tabtop = ( cfg. readEntry ( "TabPosition", "Top" ) == "Top" );
QLabel* label = new QLabel( tr( "Tab style:" ), tab );
gridLayout-> addWidget ( label, 0, 0 );
QWhatsThis::add( label, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) );
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 );
QWhatsThis::add( m_tabstyle_list, tr( "Click here to select a desired style for tabbed dialogs (such as this application). The styles available are:\n\n1. Tabs - normal tabs with text labels only\n2. Tabs w/icons - tabs with icons for each tab, text label only appears on current tab\n3. Drop down list - a vertical listing of tabs\n4. Drop down list w/icons - a vertical listing of tabs with icons" ) );
m_tabstyle_top = new QRadioButton( tr( "Top" ), tab, "tabpostop" );
btngrp-> insert ( m_tabstyle_top );
@@ -472,48 +486,50 @@ void Appearance::accept ( )
if ( m_color_changed )
{
ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( ));
if ( item )
item-> save ( config );
}
ODirection rot;
if (m_rotdir_ccw-> isChecked ( ))
{
rot = CCW;
}
else if (m_rotdir_cw-> isChecked ( ))
{
rot = CW;
}
else
{
rot = Flip;
}
config. writeEntry ( "rotatedir", (int)rot );
+ config. writeEntry( "LeftHand", m_leftHand->isChecked() );
+
config. write ( ); // need to flush the config info first
Global::applyStyle ( );
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 ( ))
{
int ci = m_color_list ? m_color_list-> currentItem ( ) : -1;
m_sample-> setStyle2 ( sli-> style ( ), ci < 0 ? palette ( ) : ((ColorListItem *) m_color_list-> item ( ci ))-> palette ( ));
}
diff --git a/noncore/settings/appearance2/appearance.h b/noncore/settings/appearance2/appearance.h
index de2f1ab..287f9f7 100644
--- a/noncore/settings/appearance2/appearance.h
+++ b/noncore/settings/appearance2/appearance.h
@@ -98,27 +98,28 @@ private:
int m_original_deco;
int m_original_tabstyle;
bool m_original_tabpos;
QListBox * m_style_list;
QPushButton * m_style_settings;
QListBox * m_deco_list;
QListBox * m_color_list;
Opie::Ui::OFontSelector *m_fontselect;
SampleWindow *m_sample;
QComboBox * m_tabstyle_list;
QRadioButton *m_tabstyle_top;
QRadioButton *m_tabstyle_bottom;
QRadioButton *m_rotdir_cw;
QRadioButton *m_rotdir_ccw;
QRadioButton *m_rotdir_flip;
QWidget * m_advtab;
+ QCheckBox *m_leftHand;
};
#endif