-rw-r--r-- | korganizer/koagendaview.cpp | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 8001c8f..acf43bd 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -367,13 +367,11 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : mDayLabelsFrame = 0; mDayLabels = 0; bool isRTL = KOGlobals::self()->reverseLayout(); - + QPixmap expandPix; if ( KOPrefs::instance()->mVerticalScreen ) { - mExpandedPixmap = SmallIcon( "1downarrow" ); - mNotExpandedPixmap = SmallIcon( "1uparrow" ); + expandPix = SmallIcon( "1updownarrow" ); } else { - mExpandedPixmap = SmallIcon( isRTL ? "1leftarrow" : "1rightarrow" ); - mNotExpandedPixmap = SmallIcon( isRTL ? "1rightarrow" : "1leftarrow" ); + expandPix = SmallIcon("1leftrightarrow" ); } QBoxLayout *topLayout = new QVBoxLayout(this); @@ -393,12 +391,13 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : mDummyAllDayLeft = new QVBox( mAllDayFrame ); mExpandButton = new QPushButton(mDummyAllDayLeft); - mExpandButton->setPixmap( mNotExpandedPixmap ); - int widebut = mExpandButton->sizeHint().width(); + mExpandButton->setPixmap( expandPix ); + int widebut = mExpandButton->sizeHint().width()+4; + int heibut = mExpandButton->sizeHint().height()+4; + if ( heibut > widebut ) + widebut = heibut ; if ( QApplication::desktop()->width() < 480 ) - widebut = widebut*2; - else - widebut = (widebut*3) / 2; + widebut = widebut*3/2; //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, // QSizePolicy::Fixed ) ); mExpandButton->setFixedSize( widebut, widebut); @@ -1456,15 +1455,6 @@ void KOAgendaView::setContentsPos(int y) mAgenda->setContentsPos(0,y); } -void KOAgendaView::setExpandedButton( bool expanded ) -{ - if ( expanded ) { - mExpandButton->setPixmap( mExpandedPixmap ); - } else { - mExpandButton->setPixmap( mNotExpandedPixmap ); - } -} - void KOAgendaView::clearSelection() { mAgenda->deselectItem(); |