Commit 455458e1 authored by Volker Krause's avatar Volker Krause
Browse files

Reproduce whitespaces a bit more correctly when layouting U_TLAY text

parent fc877ba4
......@@ -151,12 +151,12 @@ QString Rct2Ticket::passengerName() const
QDateTime Rct2Ticket::outboundDepartureTime() const
{
return d->parseTime(d->layout.text(6, 1, 5, 1), d->layout.text(6, 7, 5, 1));
return d->parseTime(d->layout.text(6, 1, 5, 1).trimmed(), d->layout.text(6, 7, 5, 1).trimmed());
}
QDateTime Rct2Ticket::outboundArrivalTime() const
{
return d->parseTime(d->layout.text(6, 52, 5, 1), d->layout.text(6, 58, 5, 1));
return d->parseTime(d->layout.text(6, 52, 5, 1).trimmed(), d->layout.text(6, 58, 5, 1).trimmed());
}
QString Rct2Ticket::outboundDepartureStation() const
......
......@@ -178,7 +178,8 @@ QString Uic9183TicketLayout::text(int row, int column, int width, int height) co
if (offset >= 0) {
s[f.row() + i - row] += lines.at(i).mid(offset).left(width);
} else {
s[f.row() + i - row] += lines.at(i); // TODO left padding by offset, truncate by width + offset
s[f.row() + i - row] += QString(-offset, QLatin1Char(' '));
s[f.row() + i - row] += lines.at(i); // TODO truncate by width + offset
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment