From 98444f8937b151a3deb71b7ae0da495872c52855 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 26 Mar 2005 13:36:19 +0000 Subject: icons added --- (limited to 'korganizer/koagendaview.cpp') 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(); -- cgit v0.9.0.2