summaryrefslogtreecommitdiff
authorumopapisdn <umopapisdn>2003-04-12 00:29:05 (UTC)
committer umopapisdn <umopapisdn>2003-04-12 00:29:05 (UTC)
commit79fcbf52d267aa3eb839de35f15992bf5e18f8eb (patch) (side-by-side diff)
tree5e3e1432654d3c97849356e96a1fc4c538a71118
parent59e2de381eebb33238ee1b257736a9ae0afdbb7e (diff)
downloadopie-79fcbf52d267aa3eb839de35f15992bf5e18f8eb.zip
opie-79fcbf52d267aa3eb839de35f15992bf5e18f8eb.tar.gz
opie-79fcbf52d267aa3eb839de35f15992bf5e18f8eb.tar.bz2
Bugfix: (bug #0000811) Events are now always atleast 12 pixels high in dayview.
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp
index af98e06..db4c2fd 100644
--- a/core/pim/datebook/datebookday.cpp
+++ b/core/pim/datebook/datebookday.cpp
@@ -620,19 +620,19 @@ DateBookDayWidget::DateBookDayWidget( const EffectiveEvent &e,
int h = end.hour()*60+end.minute()-y;
int rh = dateBook->dayView()->rowHeight(0);
y = y*rh/60;
h = h*rh/60;
- if ( h < 3 ) {
- h = 3;
- }
+
+ if ( h < 12 ) h = 12; // Make sure the widget is no smaller than 12 pixels high, so that it's possible to read atleast the first line.
+ if ( y > ((24*rh)-12) ) y=(24*rh)-12; // Make sure the widget fits inside the dayview.
geom.setY( y );
geom.setHeight( h );
geom.setX( 0 );
geom.setWidth(dateBook->dayView()->columnWidth(0)-1);
}
void DateBookDayWidget::setAllDayText( QString &text ) {
- text += "<b>" + tr("This is an all day event.") + "</b><br>";
+ text += "<b>" + tr("This is an all day event.") + "</b>";
}
void DateBookDayWidget::setEventText( QString& text ) {
bool whichClock = dateBook->dayView()->whichClock();
if ( ev.startDate() != ev.endDate() ) {
@@ -640,9 +640,9 @@ void DateBookDayWidget::setEventText( QString& text ) {
text += TimeString::timeString( ev.event().start().time(), whichClock, FALSE );
text += " - " + TimeString::longDateString( ev.startDate() ) + "<br>";
text += "<b>" + tr("End") + "</b>: ";
text += TimeString::timeString( ev.event().end().time(), whichClock, FALSE );
- text += " - " + TimeString::longDateString( ev.endDate() ) + "<br>";
+ text += " - " + TimeString::longDateString( ev.endDate() );
} else {
text += "<b>" + tr("Time") + "</b>: ";
text += TimeString::timeString( ev.start(), whichClock, FALSE );
text += "<b>" + tr(" - ") + "</b>";