summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-04-13 00:52:15 (UTC)
committer mickeyl <mickeyl>2003-04-13 00:52:15 (UTC)
commit789046e40be9cbd91f22ebee67898ee1d6cc473a (patch) (side-by-side diff)
tree5ada2d271c9a92e42abc08f35d9e5b3d85c1a5f3
parente26dcc6893559ab0fab52c22b79226b40656ad3d (diff)
downloadopie-789046e40be9cbd91f22ebee67898ee1d6cc473a.zip
opie-789046e40be9cbd91f22ebee67898ee1d6cc473a.tar.gz
opie-789046e40be9cbd91f22ebee67898ee1d6cc473a.tar.bz2
<tadaa>Change tab icon size to 14x14</tadaa>. Now most of our new icons
are no longer looking fuzzy because of scaling them up from 14x14 to 16x16
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/otabwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp
index 99bf067..a1fd2c0 100644
--- a/libopie/otabwidget.cpp
+++ b/libopie/otabwidget.cpp
@@ -282,97 +282,97 @@ void OTabWidget::setTabStyle( TabStyle s )
setUpLayout();
}
OTabWidget::TabPosition OTabWidget::tabPosition() const
{
return tabBarPosition;
}
void OTabWidget::setTabPosition( TabPosition p )
{
tabBarPosition = p;
if ( tabBarPosition == Top )
{
tabBar->setShape( QTabBar::RoundedAbove );
}
else
{
tabBar->setShape( QTabBar::RoundedBelow );
}
setUpLayout();
}
void OTabWidget::slotTabBarSelected( int id )
{
OTabInfo *newtab = tabs.first();
while ( newtab && newtab->id() != id )
{
newtab = tabs.next();
}
if ( newtab && newtab->id() == id )
{
selectTab( newtab );
}
}
void OTabWidget::slotTabListSelected( int index )
{
OTabInfo *newtab = tabs.at( index );
if ( newtab )
{
selectTab( newtab );
}
}
QPixmap OTabWidget::loadSmooth( const QString &name )
{
QImage image = Resource::loadImage( name );
QPixmap pixmap;
- pixmap.convertFromImage( image.smoothScale( 16, 16 ) );
+ pixmap.convertFromImage( image.smoothScale( 14, 14 ) );
return pixmap;
}
void OTabWidget::selectTab( OTabInfo *tab )
{
if ( tabBarStyle == IconTab )
{
if ( currentTab )
{
tabBar->tab( currentTab->id() )->setText( QString::null );
setUpLayout();
}
tabBar->tab( tab->id() )->setText( tab->label() );
tabBar->setCurrentTab( tab->id() );
setUpLayout();
tabBar->update();
}
else
{
tabBar->setCurrentTab( tab->id() );
}
widgetStack->raiseWidget( tab->control() );
emit currentChanged( tab->control() );
currentTab = tab;
}
void OTabWidget::setUpLayout()
{
tabBar->layoutTabs();
QSize t( tabBarStack->sizeHint() );
if ( tabBarStyle == IconTab )
{
if ( t.width() > width() )
t.setWidth( width() );
}
else
{
t.setWidth( width() );
}
int lw = widgetStack->lineWidth();
if ( tabBarPosition == Bottom )
{
tabBarStack->setGeometry( QMAX(0, lw-2), height() - t.height() - lw, t.width(), t.height() );
widgetStack->setGeometry( 0, 0, width(), height()-t.height()+QMAX(0, lw-2) );
}