summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Unidiff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index b5a59af..498d9b0 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1833,33 +1833,33 @@ void KOMonthView::doComputeLayoutWeek()
1833{ 1833{
1834 1834
1835 int daysToShow; 1835 int daysToShow;
1836 bool combinedSatSun = false; 1836 bool combinedSatSun = false;
1837 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { 1837 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
1838 daysToShow = 6; 1838 daysToShow = 6;
1839 combinedSatSun = true; 1839 combinedSatSun = true;
1840 } 1840 }
1841 int wid = width();//e 1841 int wid = width();//e
1842 int hei = height()-1-mNavigatorBar->height(); 1842 int hei = height()-1-mNavigatorBar->height();
1843#ifdef DESKTOP_VERSION 1843#ifdef DESKTOP_VERSION
1844 if ( !KOPrefs::instance()->mMonthViewWeekRowlayout ) { 1844 if ( !KOPrefs::instance()->mMonthViewWeekRowlayout ) {
1845 daysToShow = 2; 1845 daysToShow = 2;
1846 } else 1846 } else
1847#endif 1847#endif
1848 { 1848 {
1849 if ( wid < hei ) 1849 if ( wid < hei + 40 )
1850 daysToShow = 2; 1850 daysToShow = 2;
1851 else 1851 else
1852 daysToShow = 3; 1852 daysToShow = 3;
1853 } 1853 }
1854 bool landscape = (daysToShow == 3); 1854 bool landscape = (daysToShow == 3);
1855 mShowSatSunComp = true; 1855 mShowSatSunComp = true;
1856 combinedSatSun = true; 1856 combinedSatSun = true;
1857 1857
1858 //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ "); 1858 //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ ");
1859 QFontMetrics fm ( mWeekLabels[0]->font() ); 1859 QFontMetrics fm ( mWeekLabels[0]->font() );
1860 int weeklabelwid = fm.width( "888" ); 1860 int weeklabelwid = fm.width( "888" );
1861 wid -= weeklabelwid; 1861 wid -= weeklabelwid;
1862 1862
1863 int colWid = wid / daysToShow; 1863 int colWid = wid / daysToShow;
1864 int dayLabelHei = mDayLabelsW[0]->sizeHint().height(); 1864 int dayLabelHei = mDayLabelsW[0]->sizeHint().height();
1865 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow ); 1865 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow );