calendarui/views/dayview/src/calendayitem.cpp
changeset 64 1881ad52dc45
parent 63 a3cb48f6c889
child 83 5aadd1120515
equal deleted inserted replaced
63:a3cb48f6c889 64:1881ad52dc45
    68 
    68 
    69     // Minimum size of event frame (without/with description) 
    69     // Minimum size of event frame (without/with description) 
    70     mFrameMinWidth = KCalenMinEventWidth * deviceProfile.unitValue();
    70     mFrameMinWidth = KCalenMinEventWidth * deviceProfile.unitValue();
    71     mEventDescMinWidth = KCalenMinTouchableEventWidth
    71     mEventDescMinWidth = KCalenMinTouchableEventWidth
    72         * deviceProfile.unitValue();
    72         * deviceProfile.unitValue();
    73 
    73     
    74     // Minimum width is assured by widgetml and css, additionally called here 
    74     // Minimum width is assured by widgetml and css, additionally called here 
    75     // to prevent minimum size hint caching inside effectiveSizeHint
    75     // to prevent minimum size hint caching inside effectiveSizeHint
    76     setMinimumWidth(stripeWidth);
    76     setMinimumWidth(stripeWidth);
    77 }
    77 }
    78 
    78 
   109         setDescription(entry, isAllDayEvent);
   109         setDescription(entry, isAllDayEvent);
   110         setStatusStrip(entry, isAllDayEvent);
   110         setStatusStrip(entry, isAllDayEvent);
   111 
   111 
   112         mUpdated = true;
   112         mUpdated = true;
   113     }
   113     }
   114 
       
   115     //TODO: check if needed
       
   116     //repolish(); 
       
   117     //HbAbstractViewItem::updateChildItems();
       
   118 }
   114 }
   119 
   115 
   120 
   116 
   121 /*!
   117 /*!
   122  \brief Adds event description for the item.
   118  \brief Adds event description for the item.
   213 {
   209 {
   214     Q_UNUSED(event)
   210     Q_UNUSED(event)
   215 
   211 
   216     qreal width = rect().width();
   212     qreal width = rect().width();
   217 
   213 
       
   214     HbDeviceProfile deviceProfile;
   218     if (width < mEventDescMinWidth) {
   215     if (width < mEventDescMinWidth) {
       
   216         mColorStripe->setPreferredWidth(KCalenMinTimeStripWidth
       
   217             * deviceProfile.unitValue());
   219         mEventDesc->hide();
   218         mEventDesc->hide();
   220     }
   219     }
   221     else {
   220     else {
       
   221         mColorStripe->setPreferredWidth(KCalenTimeStripWidth
       
   222             * deviceProfile.unitValue());
   222         mEventDesc->show();
   223         mEventDesc->show();
   223     }
   224     }
   224 
   225 
   225     if (width < mFrameMinWidth) {
   226     if (width < mFrameMinWidth) {
   226         mBg->hide();
   227         mBg->hide();