mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-08 21:04:26 +00:00
Change number of time axis divisions from 5 to 6 for convenience
This commit is contained in:
parent
0af17bf7e9
commit
7de0f9abed
@ -327,11 +327,11 @@ void SpeedPlotView::paintEvent(QPaintEvent *)
|
|||||||
painter.drawLine(fullRect.left(), rect.top() + 0.75 * rect.height(), rect.right(), rect.top() + 0.75 * rect.height());
|
painter.drawLine(fullRect.left(), rect.top() + 0.75 * rect.height(), rect.right(), rect.top() + 0.75 * rect.height());
|
||||||
painter.drawLine(fullRect.left(), rect.bottom(), rect.right(), rect.bottom());
|
painter.drawLine(fullRect.left(), rect.bottom(), rect.right(), rect.bottom());
|
||||||
|
|
||||||
painter.drawLine(rect.left(), fullRect.top(), rect.left(), fullRect.bottom());
|
const int TIME_AXIS_DIVISIONS = 6;
|
||||||
painter.drawLine(rect.left() + 0.2 * rect.width(), fullRect.top(), rect.left() + 0.2 * rect.width(), fullRect.bottom());
|
for (int i = 0; i < TIME_AXIS_DIVISIONS; ++i) {
|
||||||
painter.drawLine(rect.left() + 0.4 * rect.width(), fullRect.top(), rect.left() + 0.4 * rect.width(), fullRect.bottom());
|
const int x = rect.left() + (i * rect.width()) / TIME_AXIS_DIVISIONS;
|
||||||
painter.drawLine(rect.left() + 0.6 * rect.width(), fullRect.top(), rect.left() + 0.6 * rect.width(), fullRect.bottom());
|
painter.drawLine(x, fullRect.top(), x, fullRect.bottom());
|
||||||
painter.drawLine(rect.left() + 0.8 * rect.width(), fullRect.top(), rect.left() + 0.8 * rect.width(), fullRect.bottom());
|
}
|
||||||
|
|
||||||
// Set antialiasing for graphs
|
// Set antialiasing for graphs
|
||||||
painter.setRenderHints(QPainter::Antialiasing | QPainter::HighQualityAntialiasing);
|
painter.setRenderHints(QPainter::Antialiasing | QPainter::HighQualityAntialiasing);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user