From ba3d660ed4f856362d2b914ed744874c235b4001 Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 27 Oct 2004 00:49:03 +0000 Subject: fixed some whantsnext view kayout --- (limited to 'korganizer') diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 3aae076..749204b 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -374,8 +374,14 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : mExpandButton = new QPushButton(mDummyAllDayLeft); mExpandButton->setPixmap( mNotExpandedPixmap ); - mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, - QSizePolicy::Fixed ) ); + int widebut = mExpandButton->sizeHint().width(); + if ( QApplication::desktop()->width() < 480 ) + widebut = widebut*2; + else + widebut = (widebut*3) / 2; + //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, + // QSizePolicy::Fixed ) ); + mExpandButton->setFixedSize( widebut, widebut); connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); mExpandButton->setFocusPolicy(NoFocus); mAllDayAgenda = new KOAgenda(1,mAllDayFrame); diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 0fea9be..59b864c 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -39,7 +39,7 @@ #include "koglobals.h" #include "koprefs.h" #include "koeventviewerdialog.h" - +#include #include "kowhatsnextview.h" using namespace KOrg; @@ -68,7 +68,17 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, setFont( KOPrefs::instance()->mWhatsNextFont ); mView = new WhatsNextTextBrowser(this); connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &))); - + QStyleSheet* stsh = mView->styleSheet(); + QStyleSheetItem * style ; + + style = stsh->item ("h2" ); + if ( style ) { + style->setMargin(QStyleSheetItem::MarginAll,0); + } + style = stsh->item ("table" ); + if ( style ) { + style->setMargin(QStyleSheetItem::MarginAll,0); + } mEventViewer = 0; QBoxLayout *topLayout = new QVBoxLayout(this); @@ -144,7 +154,7 @@ void KOWhatsNextView::updateView() QString ipath;// = new QString(); // kil.loadIcon("korganizer",KIcon::NoGroup,32,KIcon::DefaultState,&ipath); //" + date + "\n"; - mText = "\n"; + mText = "
\n"; //mText += "

"; #ifdef DESKTOP_VERSION mText += "

"; @@ -326,7 +336,7 @@ void KOWhatsNextView::updateView() if (replys > 0 ) mText += "

\n"; - mText += "\n\n"; + mText += "\n\n"; mView->setText(mText); mView->setFocus(); @@ -340,6 +350,7 @@ void KOWhatsNextView::updateView() // test->show(); // mView->setBackgroundMode(FixedPixmap ); // mView->setBackgroundPixmap ( bPix ); + qDebug("%s ",mText.latin1()); } void KOWhatsNextView::appendDay( int i, QDate eventDate ) -- cgit v0.9.0.2