-rw-r--r-- | core/settings/launcher/launchersettings.cpp | 9 | ||||
-rw-r--r-- | core/settings/launcher/tabdialog.cpp | 82 |
2 files changed, 46 insertions, 45 deletions
diff --git a/core/settings/launcher/launchersettings.cpp b/core/settings/launcher/launchersettings.cpp index 7b85602..cb6e98a 100644 --- a/core/settings/launcher/launchersettings.cpp +++ b/core/settings/launcher/launchersettings.cpp @@ -1,2 +1,3 @@ + /* =. This file is part of the OPIE Project @@ -16,5 +17,5 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General ..}^=.= = ; Public License for more details. -++= -. .` .: +++= -. .` .: : = ...= . :.=- You should have received a copy of the GNU -. .:....=;==+<; General Public License along with this file; @@ -50,8 +51,8 @@ LauncherSettings::LauncherSettings ( ) : QDialog ( 0, "LauncherSettings", false, m_menu = new MenuSettings ( tw ); - tw-> addTab ( m_taskbar, "launchersettings/taskbartab.png", tr( "Taskbar" )); - tw-> addTab ( m_menu, "launchersettings/menutab.png", tr( "O-Menu" )); + tw-> addTab ( m_taskbar, "wait", tr( "Taskbar" )); + tw-> addTab ( m_menu, "go", tr( "O-Menu" )); tw-> addTab ( m_tabs, "launchersettings/tabstab.png", tr( "Tabs" )); - + tw-> setCurrentTab ( m_taskbar ); } diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index 4c9942f..5f68010 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp @@ -16,5 +16,5 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General ..}^=.= = ; Public License for more details. -++= -. .` .: +++= -. .` .: : = ...= . :.=- You should have received a copy of the GNU -. .:....=;==+<; General Public License along with this file; @@ -53,9 +53,9 @@ class SampleItem : public QIconViewItem { public: SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text ) - { + { m_large = pix; m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 )); } - + void sizeChange ( ) { @@ -63,13 +63,13 @@ public: repaint ( ); } - - QPixmap *pixmap ( ) const + + QPixmap *pixmap ( ) const { - if ( iconView ( )-> itemTextPos ( ) == QIconView::Right ) + if ( iconView ( )-> itemTextPos ( ) == QIconView::Right ) return (QPixmap *) &m_small; else return (QPixmap *) &m_large; } - + private: QPixmap m_large, m_small; @@ -92,12 +92,12 @@ public: - new SampleItem ( this, tr( "Sample 1" ), Resource::loadPixmap ( "DateBook" )); + new SampleItem ( this, tr( "Sample 1" ), Resource::loadPixmap ( "datebook/DateBook" )); new SampleItem ( this, tr( "Sample 2" ), Resource::loadPixmap ( "Calibrate" )); new SampleItem ( this, tr( "Sample 3" ), Resource::loadPixmap ( "UnknownDocument" )); - + setBackgroundType ( TabConfig::Ruled, QString::null ); - + setMaximumHeight ( firstItem ( )-> height ( ) + 16 ); - } + } void setViewMode ( TabConfig::ViewMode m ) @@ -106,5 +106,5 @@ public: switch ( m ) { - case TabConfig::List: + case TabConfig::List: setItemTextPos( QIconView::Right ); break; @@ -120,5 +120,5 @@ public: viewport ( )-> setUpdatesEnabled ( true ); update ( ); - } + } @@ -189,5 +189,5 @@ public: QIconView::setItemTextPos( pos ); } - + void calculateGrid ( ItemTextPos pos ) { @@ -203,5 +203,5 @@ public: setGridX (( viewerWidth - ( cols + 1 ) * spacing ( )) / cols ); setGridY ( fontMetrics ( ). height ( ) * 2 + 24 ); - } + } else { int cols = 2; @@ -215,13 +215,13 @@ public: } } - + void paletteChange( const QPalette &p ) { static bool excllock = false; - + if ( excllock ) return; excllock = true; - + unsetPalette ( ); QIconView::paletteChange ( p ); @@ -231,14 +231,14 @@ public: cg.setColor ( QColorGroup::Text, m_textcolor ); setPalette ( QPalette ( cg, cg, cg )); - + excllock = false; } - - void setBackgroundPixmap ( const QPixmap &pm ) + + void setBackgroundPixmap ( const QPixmap &pm ) { m_bgpix = pm; } - - void setBackgroundColor ( const QColor &c ) + + void setBackgroundColor ( const QColor &c ) { m_bgcolor = c; @@ -248,11 +248,11 @@ public: { if ( !m_bgpix. isNull ( )) { - p-> drawTiledPixmap ( r, m_bgpix, QPoint (( r. x ( ) + contentsX ( )) % m_bgpix. width ( ), + p-> drawTiledPixmap ( r, m_bgpix, QPoint (( r. x ( ) + contentsX ( )) % m_bgpix. width ( ), ( r. y ( ) + contentsY ( )) % m_bgpix. height ( ))); - } + } else p-> fillRect ( r, m_bgcolor ); } - + private: QColor m_textcolor; @@ -274,7 +274,7 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig QWidget *bgtab; - tw-> addTab ( bgtab = createBgTab ( tw ), "appearance/backgroundtabicon.png", tr( "Background" )); - tw-> addTab ( createFontTab ( tw ), "appearance/fonttabicon.png", tr( "Font" )); - tw-> addTab ( createIconTab ( tw ), "appearance/colorstabicon.png", tr( "Icons" ) ); + tw-> addTab ( bgtab = createBgTab ( tw ), "appearance/color", tr( "Background" )); + tw-> addTab ( createFontTab ( tw ), "font", tr( "Font" )); + tw-> addTab ( createIconTab ( tw ), "pixmap", tr( "Icons" ) ); tw-> setCurrentTab ( bgtab ); @@ -376,8 +376,8 @@ QWidget *TabDialog::createBgTab ( QWidget *parent ) hb-> addWidget ( m_imagebrowse ); hb-> addStretch ( 10 ); - + gridLayout-> addLayout ( hb, 2, 1 ); - QPushButton *p = new QPushButton ( tr( "Default" ), tab ); + QPushButton *p = new QPushButton ( tr( "Default" ), tab ); connect ( p, SIGNAL( clicked ( )), this, SLOT( bgDefaultClicked ( ))); gridLayout-> addWidget ( p, 3, 1 ); @@ -394,5 +394,5 @@ QWidget *TabDialog::createIconTab ( QWidget *parent ) QWidget *tab = new QWidget( parent, "IconTab" ); QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); - + QGridLayout* gridLayout = new QGridLayout ( vertLayout ); gridLayout-> setColStretch ( 1, 10 ); @@ -449,5 +449,5 @@ void TabDialog::bgTypeClicked ( int t ) if ( m_bgtype-> id ( m_bgtype-> selected ( )) != t ) m_bgtype-> setButton ( t ); - + m_solidcolor-> setEnabled ( t == TabConfig::SolidColor ); m_imagebrowse-> setEnabled ( t == TabConfig::Image ); @@ -457,5 +457,5 @@ void TabDialog::bgTypeClicked ( int t ) else if ( t == TabConfig::Image ) s = Resource::findPixmap ( m_bgimage ); - + m_sample-> setBackgroundType ((TabConfig::BackgroundType) t, s ); } @@ -478,12 +478,12 @@ void TabDialog::bgImageClicked ( ) MimeTypes types; QStringList list; - list << "image/*"; + list << "image/*"; types. insert ( "Images", list ); - + QString file = OFileDialog::getOpenFileName ( 1, "/", QString::null, types ); if ( !file. isEmpty ( )) { m_bgimage = DocLnk ( file ). file ( ); bgTypeClicked ( TabConfig::Image ); - } + } } @@ -501,10 +501,10 @@ void TabDialog::accept ( ) m_tc. m_bg_image = m_bgimage; m_tc. m_text_color = m_iconcolor-> color ( ). name ( ); - + m_tc. m_font_use = m_fontuse-> isChecked ( ); - if ( m_tc. m_font_use ) { + if ( m_tc. m_font_use ) { QFont f = m_fontselect-> selectedFont ( ); - + m_tc. m_font_family = f. family ( ); m_tc. m_font_size = f. pointSize ( ); @@ -512,5 +512,5 @@ void TabDialog::accept ( ) m_tc. m_font_italic = f. italic ( ); } - + QDialog::accept ( ); } |