calendarui/views/src/calenmonthgrid.cpp
changeset 49 5de72ea7a065
parent 37 360d55486d7f
child 50 579cc610882e
--- a/calendarui/views/src/calenmonthgrid.cpp	Fri Jun 11 13:37:54 2010 +0300
+++ b/calendarui/views/src/calenmonthgrid.cpp	Wed Jun 23 18:11:28 2010 +0300
@@ -22,6 +22,7 @@
 #include <hbcolorscheme.h>
 #include <hbpangesture.h>
 #include <hbswipegesture.h>
+#include <hbdeviceprofile.h>
 
 // User includes
 #include "calenmonthgrid.h"
@@ -30,6 +31,7 @@
 #include "calenmonthview.h"
 #include "calendateutils.h"
 #include "calencommon.h"
+#include "calenconstants.h"
 
 // Constants
 #define SCROLL_SPEEED 3000 
@@ -67,6 +69,7 @@
 	setClampingStyle(HbScrollArea::StrictClamping);
 	setEnabledAnimations(HbAbstractItemView::None);
 	setFrictionEnabled(false);
+	setFlag(QGraphicsItem::ItemHasNoContents, false);
 	resetTransform();
 	
 	// Get the content widget of the scroll area to draw the grid lines
@@ -983,8 +986,11 @@
 	
 	// Set the required attributes to the pen
 	QPen pen;
+	HbDeviceProfile deviceProf;
+	qreal unitValue = deviceProf.unitValue();
+	qreal widthInPixels = GRIDLINE_WIDTH * unitValue;
 	pen.setStyle(Qt::SolidLine);
-	pen.setWidth(GRIDLINE_WIDTH);
+	pen.setWidth(widthInPixels);
 	if (mGridLineColor.isValid()) {
 		pen.setBrush(mGridLineColor);
 	} else {