mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Added the last 'tick' to the rulers
The last tick to the rulers were missing, this was making them to look odd, this make the rulers better looking, but it caused the other-non-ported-yet-to-percent stuff to behave in a not so good way, most visible one is the handlers, gonna update them next. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
6115dc1f12
commit
b07429ff8b
1 changed files with 6 additions and 2 deletions
|
@ -408,15 +408,19 @@ void Ruler::updateTicks()
|
|||
if (orientation == Qt::Horizontal) {
|
||||
double steps = (max - min) / interval;
|
||||
double stepSize = (m.x2() - m.x1()) / steps;
|
||||
for (qreal pos = m.x1(); pos < m.x2(); pos += stepSize) {
|
||||
qreal pos;
|
||||
for (pos = m.x1(); pos < m.x2(); pos += stepSize) {
|
||||
ticks.push_back(new QGraphicsLineItem(pos, m.y1(), pos, m.y1() + tickSize, this));
|
||||
}
|
||||
ticks.push_back(new QGraphicsLineItem(pos, m.y1(), pos, m.y1() + tickSize, this));
|
||||
} else {
|
||||
double steps = (max - min) / interval;
|
||||
double stepSize = (m.y2() - m.y1()) / steps;
|
||||
for (qreal pos = m.y1(); pos < m.y2(); pos += stepSize) {
|
||||
qreal pos;
|
||||
for (pos = m.y1(); pos < m.y2(); pos += stepSize) {
|
||||
ticks.push_back(new QGraphicsLineItem(m.x1(), pos, m.x1() - tickSize, pos, this));
|
||||
}
|
||||
ticks.push_back(new QGraphicsLineItem(m.x1(), pos, m.x1() - tickSize, pos, this));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue