--- a/calendarui/views/src/calenpreviewpane.cpp Mon Aug 09 18:30:52 2010 +0530
+++ b/calendarui/views/src/calenpreviewpane.cpp Wed Aug 25 14:02:13 2010 +0530
@@ -74,6 +74,8 @@
mNoEntriesLabel = 0;
mHtDiff = 0.0;
mScrollDuration = 0;
+ mPreviewTextColor = HbColorScheme::color("qtc_cal_day_preview_text");
+
setAcceptDrops(true);
setScrollDirections(Qt::Vertical);
setVerticalScrollBarPolicy(HbScrollArea::ScrollBarAlwaysOff);
@@ -107,6 +109,9 @@
mNoEntriesLabel = label;
+ if (mPreviewTextColor.isValid()) {
+ mNoEntriesLabel->setTextColor(mPreviewTextColor);
+ }
OstTraceFunctionExit0( CALENPREVIEWPANE_SETNOENTRIESLABEL_EXIT );
}
@@ -138,6 +143,9 @@
HbFontSpec font(HbFontSpec::Secondary);
if (mIsNoEntriesAdded) {
if (!instanceCount) {
+ if (mPreviewTextColor.isValid()) {
+ mNoEntriesLabel->setTextColor(mPreviewTextColor);
+ }
mNoEntriesLabel->setVisible(true);
OstTraceFunctionExit0( CALENPREVIEWPANE_POPULATELABEL_EXIT );
return;
@@ -162,13 +170,6 @@
// Set the required font
label->setFontSpec(font);
- // Set the text color from the theme
- QColor previewPaneColor = HbColorScheme::color(
- "qtc_cal_day_preview_text");
- if (previewPaneColor.isValid()) {
- label->setTextColor(previewPaneColor);
- }
-
// Set the elide mode to right
label->setElideMode(Qt::ElideRight);
// Add the label to the list
@@ -179,6 +180,10 @@
label = mLabelList.at(i);
count--;
}
+
+ if (mPreviewTextColor.isValid()) {
+ label->setTextColor(mPreviewTextColor);
+ }
QString summary = mInstanceArray[i].summary();
if(!summary.length()) {
// No summary display "Unnamed"
@@ -234,6 +239,9 @@
// Clear the list
mLabelList.clear();
+ if (mPreviewTextColor.isValid()) {
+ mNoEntriesLabel->setTextColor(mPreviewTextColor);
+ }
// Add the no entries text to the preview pane
mNoEntriesLabel->setVisible(true);
mIsNoEntriesAdded = true;
@@ -431,11 +439,12 @@
HbInstantFeedback::play(HbFeedback::Basic);
// Preview pane tapped
mServices.IssueCommandL(ECalenAgendaView);
+ mView->disconnectAboutToQuitEvent();
event->accept(Qt::TapGesture);
}
}
- OstTraceFunctionExit0( DUP2_CALENPREVIEWPANE_GESTUREEVENT_EXIT );
+ OstTraceFunctionExit0( DUP3_CALENPREVIEWPANE_GESTUREEVENT_EXIT );
}
/*!
@@ -499,4 +508,16 @@
mIsGestureHandled = false;
}
+/*!
+ Slot to handle the change in theme
+ */
+void CalenPreviewPane::handleThemeChange()
+{
+ OstTraceFunctionEntry0( CALENPREVIEWPANE_HANDLETHEMECHANGE_ENTRY );
+
+ mPreviewTextColor = HbColorScheme::color("qtc_cal_day_preview_text");
+
+ OstTraceFunctionExit0( CALENPREVIEWPANE_HANDLETHEMECHANGE_EXIT );
+}
+
// End of file --Don't remove this.