author | drw <drw> | 2005-03-02 20:36:36 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-02 20:36:36 (UTC) |
commit | 05be6e2a303522d3ec59841c028f97d524d44317 (patch) (side-by-side diff) | |
tree | d31b6f964e0684ae868e54d0f0500e8f88b163bd /noncore | |
parent | d6e85e8d0d5eee2c1f647b1ddfc49a1c8bfe3302 (diff) | |
download | opie-05be6e2a303522d3ec59841c028f97d524d44317.zip opie-05be6e2a303522d3ec59841c028f97d524d44317.tar.gz opie-05be6e2a303522d3ec59841c028f97d524d44317.tar.bz2 |
Scale icons approprtely
-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index 82d8931..1aa91bb 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp @@ -347,30 +347,31 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg ) vertLayout-> addSpacing ( 3 ); QHBoxLayout *rotLay = new QHBoxLayout ( vertLayout, 3 ); QLabel* rotlabel = new QLabel( tr( "Rotation direction:" ), tab ); m_rotdir_cw = new QRadioButton( tab, "rotdir_cw" ); - QPixmap cw1 = Resource::loadIconSet("redo"). pixmap( ); m_rotdir_ccw = new QRadioButton( tab, "rotdir_ccw" ); - QImage ccwImage = cw1. convertToImage( ). mirror( 1, 0 ); - QPixmap ccw1; m_rotdir_flip = new QRadioButton( tab, "rotdir_flip" ); - QPixmap flip1 = Resource::loadIconSet("pass"). pixmap( ); QButtonGroup* rotbtngrp = new QButtonGroup( tab, "rotbuttongroup" ); rotbtngrp-> hide ( ); rotbtngrp-> setExclusive ( true ); rotbtngrp-> insert ( m_rotdir_cw ); rotbtngrp-> insert ( m_rotdir_ccw ); rotbtngrp-> insert ( m_rotdir_flip ); - ccw1. convertFromImage( ccwImage ); - m_rotdir_cw-> setPixmap( cw1 ); - m_rotdir_ccw-> setPixmap( ccw1 ); - m_rotdir_flip-> setPixmap( flip1 ); + QImage ccwImage = Resource::loadImage( "redo" ); + QPixmap cw, ccw, flip; + cw.convertFromImage( ccwImage.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + ccw.convertFromImage( ccwImage.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ).mirror( 1, 0 ) ); + flip.convertFromImage( Resource::loadImage( "pass" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); + + m_rotdir_cw-> setPixmap( cw ); + m_rotdir_ccw-> setPixmap( ccw ); + m_rotdir_flip-> setPixmap( flip ); rotLay-> addWidget ( rotlabel, 0 ); rotLay-> addWidget ( m_rotdir_cw, 0 ); rotLay-> addWidget ( m_rotdir_ccw, 0 ); rotLay-> addWidget ( m_rotdir_flip, 0 ); |