author | waspe <waspe> | 2003-11-04 16:37:14 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-04 16:37:14 (UTC) |
commit | efcd8d6a743261194b55df3afeec956fde9886d4 (patch) (side-by-side diff) | |
tree | 7bf7232a92c40c8236813fc06aac18b4f8d16d1d /core/pim | |
parent | d2c52ff34d0ef37d055f74bb9fd957c6ffc583a9 (diff) | |
download | opie-efcd8d6a743261194b55df3afeec956fde9886d4.zip opie-efcd8d6a743261194b55df3afeec956fde9886d4.tar.gz opie-efcd8d6a743261194b55df3afeec956fde9886d4.tar.bz2 |
remove merge conflict
-rw-r--r-- | core/pim/datebook/datebookday.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index f4008e9..4d64099 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp @@ -18,5 +18,4 @@ ** **********************************************************************/ -#include <qmessagebox.h> #include "datebookday.h" @@ -24,21 +23,11 @@ #include "datebookdayallday.h" -#include <qpe/datebookdb.h> #include <qpe/resource.h> -#include <qpe/event.h> #include <qpe/qpeapplication.h> -#include <qpe/timestring.h> -#include <qpe/qpedebug.h> #include <qpe/ir.h> -#include <qheader.h> -#include <qdatetime.h> -#include <qpainter.h> #include <qsimplerichtext.h> #include <qpopupmenu.h> -#include <qtextcodec.h> -#include <qpalette.h> -#include <qlineedit.h> #include <qtimer.h> @@ -54,5 +43,5 @@ DateBookDayView::DateBookDayView( bool whichClock, QWidget *parent, const char * setHScrollBarMode( QScrollView::AlwaysOff ); verticalHeader()->setPalette(white); - verticalHeader()->setResizeEnabled(FALSE); + verticalHeader()->setResizeEnabled(FALSE); setSelectionMode( Single ); @@ -73,4 +62,5 @@ void DateBookDayView::initHeader() { QString strTmp; + int preferredWidth = 0; for ( int i = 0; i < 24; ++i ) { if ( ampm ) { @@ -91,6 +81,16 @@ void DateBookDayView::initHeader() strTmp = strTmp.rightJustify( 6, ' ' ); verticalHeader()->setLabel( i, strTmp ); + + // Compute correct width for current Font (Add some space right) + int actWidth = QFontMetrics( QFont::defaultFont() ).width( strTmp + QString(" ") ); + if ( preferredWidth < actWidth ) + preferredWidth = actWidth; setRowStretchable( i, FALSE ); } + + // It seems as if the header has a bug. It does not resize + // correct horizontally if it is used vertical.. + // Thus, we do it manually.. + setLeftMargin( preferredWidth ); } @@ -174,5 +174,5 @@ void DateBookDayView::setRowStyle( int style ) } -void DateBookDayView::contentsMouseReleaseEvent( QMouseEvent *e ) +void DateBookDayView::contentsMouseReleaseEvent( QMouseEvent* /* e */ ) { int sh=99,eh=-1; @@ -220,5 +220,5 @@ void DateBookDayViewQuickLineEdit::finallyCallClose() { } -void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent * e ) +void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent* /* e */) { slotReturnPressed(); // Reuse code to add event and close this widget. |