Diffstat (limited to 'core/launcher/launcherview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/launcherview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 9d78c0d..2b34cc5 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp | |||
@@ -618,49 +618,49 @@ QIconViewItem* LauncherIconView::busyItem() const | |||
618 | { | 618 | { |
619 | return bsy; | 619 | return bsy; |
620 | } | 620 | } |
621 | 621 | ||
622 | void LauncherIconView::setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; } | 622 | void LauncherIconView::setBusyIndicatorType ( BusyIndicatorType t ) { busyType = t; } |
623 | 623 | ||
624 | void LauncherIconView::calculateGrid( ItemTextPos pos ) | 624 | void LauncherIconView::calculateGrid( ItemTextPos pos ) |
625 | { | 625 | { |
626 | int dw = QApplication::desktop()->width(); | 626 | int dw = QApplication::desktop()->width(); |
627 | int viewerWidth = dw-style().scrollBarExtent().width(); | 627 | int viewerWidth = dw-style().scrollBarExtent().width(); |
628 | if ( pos == Bottom ) { | 628 | if ( pos == Bottom ) { |
629 | if( !numColumns ) { | 629 | if( !numColumns ) { |
630 | if ( viewerWidth <= 200 ) numColumns = 2; | 630 | if ( viewerWidth <= 200 ) numColumns = 2; |
631 | else if ( viewerWidth >= 400 ) numColumns = viewerWidth/96; | 631 | else if ( viewerWidth >= 400 ) numColumns = viewerWidth/96; |
632 | else numColumns = 3; | 632 | else numColumns = 3; |
633 | } | 633 | } |
634 | setSpacing( 4 ); | 634 | setSpacing( 4 ); |
635 | setGridX( (viewerWidth-(numColumns+1)*spacing())/numColumns ); | 635 | setGridX( (viewerWidth-(numColumns+1)*spacing())/numColumns ); |
636 | setGridY( fontMetrics().height()*2+24 ); | 636 | setGridY( fontMetrics().height()*2+24 ); |
637 | } else { | 637 | } else { |
638 | if( !numColumns ) { | 638 | if( !numColumns ) { |
639 | if ( viewerWidth < 150 ) numColumns = 1; | 639 | if ( viewerWidth < 150 ) numColumns = 1; |
640 | else if ( viewerWidth >= 400 ) numColumns = viewerWidth/150; | 640 | else if ( viewerWidth >= 400 ) numColumns = viewerWidth/150; |
641 | else numColumns = 2; | 641 | else numColumns = 2; |
642 | } | 642 | } |
643 | setSpacing( 2 ); | 643 | setSpacing( 2 ); |
644 | setGridX( (viewerWidth-(numColumns+1)*spacing())/numColumns ); | 644 | setGridX( (viewerWidth-(numColumns+1)*spacing())/numColumns ); |
645 | setGridY( fontMetrics().height()+2 ); | 645 | setGridY( fontMetrics().height()+2 ); |
646 | } | 646 | } |
647 | } | 647 | } |
648 | 648 | ||
649 | void LauncherIconView::styleChange( QStyle &old ) | 649 | void LauncherIconView::styleChange( QStyle &old ) |
650 | { | 650 | { |
651 | QIconView::styleChange( old ); | 651 | QIconView::styleChange( old ); |
652 | calculateGrid( itemTextPos() ); | 652 | calculateGrid( itemTextPos() ); |
653 | } | 653 | } |
654 | 654 | ||
655 | void LauncherIconView::keyPressEvent(QKeyEvent* e) | 655 | void LauncherIconView::keyPressEvent(QKeyEvent* e) |
656 | { | 656 | { |
657 | ike = TRUE; | 657 | ike = TRUE; |
658 | if ( e->key() == Key_F33 /* OK button */ || e->key() == Key_Space ) { | 658 | if ( e->key() == Key_F33 /* OK button */ || e->key() == Key_Space ) { |
659 | if ( (e->state() & ShiftButton) ) | 659 | if ( (e->state() & ShiftButton) ) |
660 | emit mouseButtonPressed(ShiftButton, currentItem(), QPoint() ); | 660 | emit mouseButtonPressed(ShiftButton, currentItem(), QPoint() ); |
661 | else | 661 | else |
662 | returnPressed(currentItem()); | 662 | returnPressed(currentItem()); |
663 | } | 663 | } |
664 | 664 | ||
665 | QIconView::keyPressEvent(e); | 665 | QIconView::keyPressEvent(e); |
666 | ike = FALSE; | 666 | ike = FALSE; |