From d9b5fcc45b1fef5ac11ef549a47561c7382ff451 Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 30 Aug 2003 08:07:32 +0000 Subject: do not rely on scrollbars beeing right --- (limited to 'core') diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp index ab7e963..dad1c3f 100644 --- a/core/pim/datebook/datebookweek.cpp +++ b/core/pim/datebook/datebookweek.cpp @@ -313,9 +313,10 @@ void DateBookWeekView::resizeEvent( QResizeEvent *e ) { const int hourWidth = 20; QScrollView::resizeEvent( e ); - int avail = width()-qApp->style().scrollBarExtent().width()-1; - header->setGeometry( 0, 0, avail, header->sizeHint().height() ); - setMargins( 0, header->height(), 0, 0 ); + int avail = visibleWidth(); + header->setGeometry( leftMargin()+frameWidth()+frameRect().left() , frameWidth(), + visibleWidth(), header->sizeHint().height() ); + setMargins( 0, header->sizeHint().height(), 0, 0 ); header->resizeSection( 0, hourWidth ); int sw = (avail - hourWidth) / 7; for ( int i = 1; i < 7; i++ ) -- cgit v0.9.0.2