-rw-r--r-- | korganizer/koagenda.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 9b817bc..01cef35 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1900,38 +1900,42 @@ void KOAgenda::computeSizes() | |||
1900 | KOAgendaItem *item; | 1900 | KOAgendaItem *item; |
1901 | int subCellWidth; | 1901 | int subCellWidth; |
1902 | 1902 | ||
1903 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { | 1903 | for ( item=mItems.first(); item != 0; item=mItems.next() ) { |
1904 | subCellWidth = mGridSpacingX / item->subCells(); | 1904 | subCellWidth = mGridSpacingX / item->subCells(); |
1905 | item->resize(subCellWidth,item->height()); | 1905 | item->resize(subCellWidth,item->height()); |
1906 | moveChild(item,(KOGlobals::self()->reverseLayout() ? | 1906 | moveChild(item,(KOGlobals::self()->reverseLayout() ? |
1907 | (mColumns - 1 - item->cellX()) * mGridSpacingX : | 1907 | (mColumns - 1 - item->cellX()) * mGridSpacingX : |
1908 | item->cellX() * mGridSpacingX) + | 1908 | item->cellX() * mGridSpacingX) + |
1909 | item->subCell() * subCellWidth,childY(item)); | 1909 | item->subCell() * subCellWidth,childY(item)); |
1910 | } | 1910 | } |
1911 | } | 1911 | } |
1912 | int cw = contentsWidth(); | 1912 | int cw = contentsWidth(); |
1913 | int ch = contentsHeight(); | 1913 | int ch = contentsHeight(); |
1914 | if ( mAllDayMode ) { | 1914 | if ( mAllDayMode ) { |
1915 | QPixmap* paintPixAll = KOAgendaItem::paintPixAllday(); | 1915 | QPixmap* paintPixAll = KOAgendaItem::paintPixAllday(); |
1916 | if ( (paintPixAll->width() < cw || paintPixAll->height() < ch) && cw > 0 && ch > 0 ) | 1916 | if ( (paintPixAll->width() < cw || paintPixAll->height() < ch) && cw > 0 && ch > 0 ) { |
1917 | //qDebug("paintPixAll->resize "); | ||
1917 | paintPixAll->resize( cw, ch ); | 1918 | paintPixAll->resize( cw, ch ); |
1919 | } | ||
1918 | } else { | 1920 | } else { |
1919 | QPixmap* paintPix = KOAgendaItem::paintPix(); | 1921 | QPixmap* paintPix = KOAgendaItem::paintPix(); |
1920 | if ( paintPix->width() < cw || paintPix->height() < ch ) | 1922 | if ( paintPix->width() < cw || paintPix->height() < ch ) { |
1921 | KOAgendaItem::resizePixmap( cw , ch ); | 1923 | //qDebug("paintPix->resize "); |
1924 | paintPix->resize( cw , ch ); | ||
1925 | } | ||
1922 | } | 1926 | } |
1923 | 1927 | ||
1924 | checkScrollBoundaries(); | 1928 | checkScrollBoundaries(); |
1925 | marcus_bains(); | 1929 | marcus_bains(); |
1926 | drawContentsToPainter(); | 1930 | drawContentsToPainter(); |
1927 | viewport()->repaint(false); | 1931 | viewport()->repaint(false); |
1928 | } | 1932 | } |
1929 | 1933 | ||
1930 | void KOAgenda::scrollUp() | 1934 | void KOAgenda::scrollUp() |
1931 | { | 1935 | { |
1932 | scrollBy(0,-mScrollOffset); | 1936 | scrollBy(0,-mScrollOffset); |
1933 | } | 1937 | } |
1934 | 1938 | ||
1935 | 1939 | ||
1936 | void KOAgenda::scrollDown() | 1940 | void KOAgenda::scrollDown() |
1937 | { | 1941 | { |