]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/gui/daynavigatorwidget.cpp
Add .pro.user.* to svn:ignore and remove it in the release target.
[toast/confclerk.git] / src / gui / daynavigatorwidget.cpp
index c48f354fa349408a1e6dd2d8ca3df8ae52067c8f..3e6a033930d69d7ff4ebb11956bda208f6153017 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
- * Copyright (C) 2011 Philipp Spitzer, gregor herrmann
+ * Copyright (C) 2011-2012 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
@@ -105,8 +105,7 @@ void DayNavigatorWidget::nextDayButtonClicked() {
 }
 
 
-void DayNavigatorWidget::paintEvent(QPaintEvent *aEvent)
-{
+void DayNavigatorWidget::paintEvent(QPaintEvent *aEvent) {
     Q_UNUSED(aEvent);
 
     QString selectedDateStr = mCurDate.isValid() ? mCurDate.toString("dddd\nyyyy-MM-dd") : tr("No date");
@@ -114,13 +113,7 @@ void DayNavigatorWidget::paintEvent(QPaintEvent *aEvent)
     painter.save();
 
     // rectangle only for the text
-    int marginSize = 9;
-    int buttonSize = 32;
-#ifdef MAEMO
-    QRect q(y()-height()+1*marginSize+2.5*buttonSize, x(), height()-2*marginSize-2.5*buttonSize, width());
-#else
-    QRect q(y()-height()+1*marginSize+2*buttonSize, x(), height()-2*marginSize-3*buttonSize, width());
-#endif
+    QRect q(-selectedDate->height()-selectedDate->y(), selectedDate->x(), selectedDate->height(), selectedDate->width());
     painter.rotate(270);
 
     // font size adjustion, static on maemo, dynamically otherwise