diff -r a5a1242fd2e8 -r b0711afde476 calendarui/views/dayview/src/calendayutils.cpp --- a/calendarui/views/dayview/src/calendayutils.cpp Thu Sep 02 20:25:23 2010 +0300 +++ b/calendarui/views/dayview/src/calendayutils.cpp Fri Sep 17 08:29:05 2010 +0300 @@ -97,6 +97,16 @@ } /*! + \brief minEventHeight + + \return Minimum height of event bubble + */ +qreal CalenDayUtils::minEventHeight() const +{ + return mMinEventHeight; +} + +/*! \brief contentWidth \return Width of content area @@ -160,6 +170,7 @@ } mHourElementWidth = calculateHourElementWidth(); mHourElementHeight = calculateHourElementHeight(); + mMinEventHeight = calculateMinEventHeight(); } /*! @@ -215,3 +226,27 @@ return prefHeight; } + +/*! + \brief Calculates the height of hour element according to UI spec. + + \return Calculated minimum height of event bubble + */ +qreal CalenDayUtils::calculateMinEventHeight() const +{ + HbStyle style; + HbDeviceProfile deviceProfile; + + // Calculate minimum height of event bubble + qreal textHeight = 0.0; + qreal topSpacing = 0.0; + qreal bottomSpacing = 0.0; + style.parameter(QString("hb-param-text-height-secondary"), textHeight, + deviceProfile); + style.parameter(QString("hb-param-margin-gene-top"), topSpacing, + deviceProfile); + style.parameter(QString("hb-param-margin-gene-bottom"), bottomSpacing, + deviceProfile); + + return (topSpacing + textHeight + bottomSpacing); +}