author | drw <drw> | 2005-03-02 20:36:36 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-02 20:36:36 (UTC) |
commit | 05be6e2a303522d3ec59841c028f97d524d44317 (patch) (unidiff) | |
tree | d31b6f964e0684ae868e54d0f0500e8f88b163bd /noncore/settings/appearance2/appearance.cpp | |
parent | d6e85e8d0d5eee2c1f647b1ddfc49a1c8bfe3302 (diff) | |
download | opie-05be6e2a303522d3ec59841c028f97d524d44317.zip opie-05be6e2a303522d3ec59841c028f97d524d44317.tar.gz opie-05be6e2a303522d3ec59841c028f97d524d44317.tar.bz2 |
Scale icons approprtely
Diffstat (limited to 'noncore/settings/appearance2/appearance.cpp') (more/less context) (ignore whitespace changes)
-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 | |||
@@ -341,42 +341,43 @@ QWidget *Appearance::createAdvancedTab ( QWidget *parent, Config &cfg ) | |||
341 | 341 | ||
342 | m_tabstyle_top-> setChecked ( tabtop ); | 342 | m_tabstyle_top-> setChecked ( tabtop ); |
343 | m_tabstyle_bottom-> setChecked ( !tabtop ); | 343 | m_tabstyle_bottom-> setChecked ( !tabtop ); |
344 | 344 | ||
345 | m_original_tabstyle = style; | 345 | m_original_tabstyle = style; |
346 | m_original_tabpos = tabtop; | 346 | m_original_tabpos = tabtop; |
347 | 347 | ||
348 | vertLayout-> addSpacing ( 3 ); | 348 | vertLayout-> addSpacing ( 3 ); |
349 | QHBoxLayout *rotLay = new QHBoxLayout ( vertLayout, 3 ); | 349 | QHBoxLayout *rotLay = new QHBoxLayout ( vertLayout, 3 ); |
350 | 350 | ||
351 | QLabel* rotlabel = new QLabel( tr( "Rotation direction:" ), tab ); | 351 | QLabel* rotlabel = new QLabel( tr( "Rotation direction:" ), tab ); |
352 | m_rotdir_cw = new QRadioButton( tab, "rotdir_cw" ); | 352 | m_rotdir_cw = new QRadioButton( tab, "rotdir_cw" ); |
353 | QPixmap cw1 = Resource::loadIconSet("redo"). pixmap( ); | ||
354 | m_rotdir_ccw = new QRadioButton( tab, "rotdir_ccw" ); | 353 | m_rotdir_ccw = new QRadioButton( tab, "rotdir_ccw" ); |
355 | QImage ccwImage = cw1. convertToImage( ). mirror( 1, 0 ); | ||
356 | QPixmap ccw1; | ||
357 | m_rotdir_flip = new QRadioButton( tab, "rotdir_flip" ); | 354 | m_rotdir_flip = new QRadioButton( tab, "rotdir_flip" ); |
358 | QPixmap flip1 = Resource::loadIconSet("pass"). pixmap( ); | ||
359 | QButtonGroup* rotbtngrp = new QButtonGroup( tab, "rotbuttongroup" ); | 355 | QButtonGroup* rotbtngrp = new QButtonGroup( tab, "rotbuttongroup" ); |
360 | 356 | ||
361 | rotbtngrp-> hide ( ); | 357 | rotbtngrp-> hide ( ); |
362 | rotbtngrp-> setExclusive ( true ); | 358 | rotbtngrp-> setExclusive ( true ); |
363 | rotbtngrp-> insert ( m_rotdir_cw ); | 359 | rotbtngrp-> insert ( m_rotdir_cw ); |
364 | rotbtngrp-> insert ( m_rotdir_ccw ); | 360 | rotbtngrp-> insert ( m_rotdir_ccw ); |
365 | rotbtngrp-> insert ( m_rotdir_flip ); | 361 | rotbtngrp-> insert ( m_rotdir_flip ); |
366 | 362 | ||
367 | ccw1. convertFromImage( ccwImage ); | 363 | QImage ccwImage = Resource::loadImage( "redo" ); |
368 | m_rotdir_cw-> setPixmap( cw1 ); | 364 | QPixmap cw, ccw, flip; |
369 | m_rotdir_ccw-> setPixmap( ccw1 ); | 365 | cw.convertFromImage( ccwImage.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); |
370 | m_rotdir_flip-> setPixmap( flip1 ); | 366 | ccw.convertFromImage( ccwImage.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ).mirror( 1, 0 ) ); |
367 | flip.convertFromImage( Resource::loadImage( "pass" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | ||
368 | |||
369 | m_rotdir_cw-> setPixmap( cw ); | ||
370 | m_rotdir_ccw-> setPixmap( ccw ); | ||
371 | m_rotdir_flip-> setPixmap( flip ); | ||
371 | 372 | ||
372 | rotLay-> addWidget ( rotlabel, 0 ); | 373 | rotLay-> addWidget ( rotlabel, 0 ); |
373 | rotLay-> addWidget ( m_rotdir_cw, 0 ); | 374 | rotLay-> addWidget ( m_rotdir_cw, 0 ); |
374 | rotLay-> addWidget ( m_rotdir_ccw, 0 ); | 375 | rotLay-> addWidget ( m_rotdir_ccw, 0 ); |
375 | rotLay-> addWidget ( m_rotdir_flip, 0 ); | 376 | rotLay-> addWidget ( m_rotdir_flip, 0 ); |
376 | 377 | ||
377 | int rotDirection = cfg.readNumEntry( "rotatedir" ); | 378 | int rotDirection = cfg.readNumEntry( "rotatedir" ); |
378 | ODirection rot = CW; | 379 | ODirection rot = CW; |
379 | 380 | ||
380 | if (rotDirection == -1) | 381 | if (rotDirection == -1) |
381 | { | 382 | { |
382 | rot = ODevice::inst ( )-> direction ( ); | 383 | rot = ODevice::inst ( )-> direction ( ); |