From 608a9f1537af0f0f679ec5f7358e9a9716604f8b Mon Sep 17 00:00:00 2001 From: harlekin Date: Sun, 30 Mar 2003 22:05:20 +0000 Subject: changed header (gui) to layouts --- diff --git a/core/pim/today/changelog b/core/pim/today/changelog index 500090d..a77e581 100644 --- a/core/pim/today/changelog +++ b/core/pim/today/changelog @@ -1,7 +1,12 @@ +0.6.2 + +* header can now be made smaller +* changed header to different layout mode to play nicer with life rotation + 0.6.1 * datebook plugin now can now also show following days -+ changed refresh +* changed refresh * fixed one mem leak 0.6 diff --git a/core/pim/today/opie-today.control b/core/pim/today/opie-today.control index 40c2cdf..0e79d69 100644 --- a/core/pim/today/opie-today.control +++ b/core/pim/today/opie-today.control @@ -3,7 +3,7 @@ Priority: optional Section: opie/applications Maintainer: Maximilian Reiß Architecture: arm -Version: 0.6-$SUB_VERSION +Version: 0.6,2-$SUB_VERSION Depends: opie-base, libopie1 License: GPL Description: today screen diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 0b61bf8..d0cdd18 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -145,17 +145,9 @@ void Today::init() { if ( m_hideBanner ) { Opiezilla->hide(); TodayLabel->hide(); - Frame->setMaximumHeight( 18 ); - Frame->setMinimumHeight( 18 ); - DateLabel->setGeometry( QRect( 10, 2, 168, 12 ) ); - ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-20, 0, 25, 20 ) ); } else { Opiezilla->show(); TodayLabel->show(); - Frame->setMaximumHeight( 50 ); - Frame->setMinimumHeight( 50 ); - DateLabel->setGeometry( QRect( 10, 35, 168, 12 ) ); - ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-80, 29, 25, 20 ) ); } layout = new QVBoxLayout( this ); diff --git a/core/pim/today/todaybase.cpp b/core/pim/today/todaybase.cpp index a36ecaa..c896463 100644 --- a/core/pim/today/todaybase.cpp +++ b/core/pim/today/todaybase.cpp @@ -1,7 +1,7 @@ /* * todaybase.cpp * - * copyright : (c) 2002 by Maximilian Reiß + * copyright : (c) 2002, 2003 by Maximilian Reiß * email : harlekin@handhelds.org * */ @@ -16,10 +16,8 @@ #include "todaybase.h" +#include #include -#include -#include -#include #include #include @@ -48,18 +46,18 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) cg.setColor( QColorGroup::Text, white ); cg.setBrush( QColorGroup::Background, QBrush( QColor( 238, 238, 230 ), logo ) ); pal2.setActive( cg ); - // today logo + +// today logo Frame = new QLabel( this, "Frame" ); Frame->setPalette( pal2 ); Frame->setFrameShape( QFrame::StyledPanel ); Frame->setFrameShadow( QFrame::Raised ); Frame->setLineWidth( 0 ); - Frame->setMaximumHeight( 50 ); - Frame->setMinimumHeight( 50 ); + QHBoxLayout *frameLayout = new QHBoxLayout( Frame ); + QVBox *box1 = new QVBox( Frame ); // Today text - TodayLabel = new QLabel( Frame, "TodayText" ); - TodayLabel->setGeometry( QRect( 10, 1, 168, 40 ) ); + TodayLabel = new QLabel( box1, "TodayText" ); QFont TodayLabel_font( TodayLabel->font() ); TodayLabel_font.setBold( TRUE ); TodayLabel_font.setPointSize( 40 ); @@ -68,8 +66,7 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) TodayLabel->setText( "" + tr("Today") +"" ); // date - DateLabel = new QLabel( Frame, "TextLabel1" ); - DateLabel->setGeometry( QRect( 10, 35, 168, 12 ) ); + DateLabel = new QLabel( box1, "TextLabel1" ); QFont DateLabel_font( DateLabel->font() ); DateLabel_font.setBold( TRUE ); DateLabel->setFont( DateLabel_font ); @@ -79,10 +76,10 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) // Opiezilla Opiezilla = new QLabel( Frame, "OpieZilla" ); Opiezilla->setPixmap( opiezilla ); - Opiezilla->setGeometry( QApplication::desktop()->width()-50 ,1, 45, 47 ); QWhatsThis::add( Opiezilla , tr( "Today by Maximilian Reiß" ) ); Opiezilla->setBackgroundOrigin( QLabel::ParentOrigin ); + // Ownerfield OwnerField = new OClickableLabel( this , "Owner" ); OwnerField->setGeometry( QRect( 0, 0, this->width(), 12 ) ); @@ -91,12 +88,17 @@ TodayBase::TodayBase( QWidget* parent, const char* name, WFlags ) // config ConfigButton = new OClickableLabel ( Frame, "PushButton1" ); - ConfigButton->setGeometry( QRect( QApplication::desktop()->width()-80, 29, 25, 20 ) ); ConfigButton->setPixmap( config ); QWhatsThis::add( ConfigButton, tr( "Click here to get to the config dialog" ) ); ConfigButton->setBackgroundOrigin( QLabel::ParentOrigin ); + + frameLayout->addWidget( box1 ); + frameLayout->addStretch( 2 ); + frameLayout->addWidget( ConfigButton, 0, AlignBottom ); + frameLayout->addWidget( Opiezilla ); } + /** * D' tor */ -- cgit v0.9.0.2