Changeset 5ec938e
- Timestamp:
- 08/15/11 20:01:18 (11 years ago)
- Branches:
- master, qt5
- Children:
- f0e0ac0
- Parents:
- a9f56bb
- Location:
- src/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/daynavigatorwidget.cpp
ra9f56bb r5ec938e 86 86 configureNavigation(); 87 87 emit(dateChanged(mCurDate)); 88 selectedDate->update();88 this->update(); 89 89 } 90 90 } … … 97 97 configureNavigation(); 98 98 emit(dateChanged(mCurDate)); 99 selectedDate->update();99 this->update(); 100 100 } 101 101 } … … 109 109 configureNavigation(); 110 110 emit(dateChanged(mCurDate)); 111 selectedDate->update();111 this->update(); 112 112 } 113 113 } … … 120 120 QPainter painter(this); 121 121 painter.save(); 122 QRect q(y()-height()+16, x(), height(), width()); // today icon size = 32x32 122 123 // rectangle only for the text 124 int marginSize = 9; 125 int buttonSize = 32; 126 #ifdef MAEMO 127 QRect q(y()-height()+1*marginSize+2.5*buttonSize, x(), height()-2*marginSize-2.5*buttonSize, width()); 128 #else 129 QRect q(y()-height()+1*marginSize+2*buttonSize, x(), height()-2*marginSize-3*buttonSize, width()); 130 #endif 123 131 painter.rotate(270); 132 133 // font size adjustion, static on maemo, dynamically otherwise 134 QFont f = painter.font(); 135 #ifdef MAEMO 136 qreal factor = 0.8; 137 #else 138 qreal factor = (qreal) 2 * q.width() / painter.fontMetrics().width(selectedDateStr); 139 #endif 140 if (factor < 1) f.setPointSizeF(f.pointSizeF() * factor); 141 painter.setFont(f); 142 124 143 painter.drawText(q, Qt::AlignCenter, selectedDateStr); 125 144 painter.restore(); -
src/gui/daynavigatorwidget.ui
ra9f56bb r5ec938e 26 26 <item row="1" column="0"> 27 27 <layout class="QVBoxLayout" name="verticalLayout"> 28 <property name="spacing"> 29 <number>0</number> 30 </property> 28 31 <item> 29 32 <widget class="QToolButton" name="nextDayButton">
Note: See TracChangeset
for help on using the changeset viewer.