-rw-r--r-- | library/datebookmonth.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp index 2616b7b..ffdf335 100644 --- a/library/datebookmonth.cpp +++ b/library/datebookmonth.cpp | |||
@@ -648,33 +648,40 @@ void DayItemMonth::paint( QPainter *p, const QColorGroup &cg, | |||
648 | p->fillRect(x1, y, x2 - x1, h, colorNormal); | 648 | p->fillRect(x1, y, x2 - x1, h, colorNormal); |
649 | } | 649 | } |
650 | 650 | ||
651 | y += h; | 651 | y += h; |
652 | 652 | ||
653 | while(repeatLine.count() >= 2) { | 653 | while(repeatLine.count() >= 2) { |
654 | int x2 = repeatLine.pop(); | 654 | int x2 = repeatLine.pop(); |
655 | int x1 = repeatLine.pop(); | 655 | int x1 = repeatLine.pop(); |
656 | if (x2 < x1 + 2) | 656 | if (x2 < x1 + 2) |
657 | x2 = x1 + 2; | 657 | x2 = x1 + 2; |
658 | p->fillRect(x1, y, x2 - x1, h, colorRepeat); | 658 | p->fillRect(x1, y, x2 - x1, h, colorRepeat); |
659 | } | 659 | } |
660 | 660 | ||
661 | 661 | ||
662 | // Finally, draw the number. | 662 | // Finally, draw the number. |
663 | QFont f = p->font(); | 663 | QFont f = p->font(); |
664 | f.setPointSize( ( f.pointSize() / 3 ) * 2 ); | 664 | if(qApp->desktop()->width() >= 480) |
665 | { | ||
666 | f.setPointSize( f.pointSize() - 2 ); | ||
667 | } | ||
668 | else | ||
669 | { | ||
670 | f.setPointSize( ( f.pointSize() / 3 ) * 2 ); | ||
671 | } | ||
665 | p->setFont( f ); | 672 | p->setFont( f ); |
666 | QFontMetrics fm( f ); | 673 | QFontMetrics fm( f ); |
667 | p->drawText( 1, 1 + fm.ascent(), QString::number( day() ) ); | 674 | p->drawText( 1, 1 + fm.ascent(), QString::number( day() ) ); |
668 | 675 | ||
669 | p->restore(); | 676 | p->restore(); |
670 | } | 677 | } |
671 | 678 | ||
672 | 679 | ||
673 | 680 | ||
674 | void DayItemMonth::setType( Calendar::Day::Type t ) | 681 | void DayItemMonth::setType( Calendar::Day::Type t ) |
675 | { | 682 | { |
676 | switch ( t ) { | 683 | switch ( t ) { |
677 | case Calendar::Day::PrevMonth: | 684 | case Calendar::Day::PrevMonth: |
678 | case Calendar::Day::NextMonth: | 685 | case Calendar::Day::NextMonth: |
679 | back = QBrush( QColor( 224, 224, 224 ) ); | 686 | back = QBrush( QColor( 224, 224, 224 ) ); |
680 | forg = black; | 687 | forg = black; |