Prevent X axis label clipping for large font sizes
This commit is contained in:
parent
61a7a8e352
commit
03eac96557
@ -329,7 +329,8 @@ void TraceWaterfall::draw(QPainter &p)
|
|||||||
p.setPen(QPen(pref.Graphs.Color.axis, 1));
|
p.setPen(QPen(pref.Graphs.Color.axis, 1));
|
||||||
if(displayFullFreq) {
|
if(displayFullFreq) {
|
||||||
QRect bounding;
|
QRect bounding;
|
||||||
p.drawText(QRect(xCoord - 40, plotAreaBottom + 5, 80, pref.Graphs.fontSizeAxis), Qt::AlignHCenter, tickValue, &bounding);
|
p.drawText(QRect(xCoord - pref.Graphs.fontSizeAxis*2, plotAreaBottom + 5, pref.Graphs.fontSizeAxis*4,
|
||||||
|
pref.Graphs.fontSizeAxis), Qt::AlignHCenter, tickValue, &bounding);
|
||||||
lastTickLabelEnd = bounding.x() + bounding.width();
|
lastTickLabelEnd = bounding.x() + bounding.width();
|
||||||
} else {
|
} else {
|
||||||
// check if the same prefix was used as in the fullFreq string
|
// check if the same prefix was used as in the fullFreq string
|
||||||
|
@ -627,7 +627,8 @@ void TraceXYPlot::draw(QPainter &p)
|
|||||||
p.setPen(QPen(pref.Graphs.Color.axis, 1));
|
p.setPen(QPen(pref.Graphs.Color.axis, 1));
|
||||||
if(displayFullFreq) {
|
if(displayFullFreq) {
|
||||||
QRect bounding;
|
QRect bounding;
|
||||||
p.drawText(QRect(xCoord - 40, plotAreaBottom + 5, 80, pref.Graphs.fontSizeAxis), Qt::AlignHCenter, tickValue, &bounding);
|
p.drawText(QRect(xCoord - pref.Graphs.fontSizeAxis*2, plotAreaBottom + 5, pref.Graphs.fontSizeAxis*4,
|
||||||
|
pref.Graphs.fontSizeAxis), Qt::AlignHCenter, tickValue, &bounding);
|
||||||
lastTickLabelEnd = bounding.x() + bounding.width();
|
lastTickLabelEnd = bounding.x() + bounding.width();
|
||||||
} else {
|
} else {
|
||||||
// check if the same prefix was used as in the fullFreq string
|
// check if the same prefix was used as in the fullFreq string
|
||||||
|
Loading…
Reference in New Issue
Block a user