Commit ce0cde83 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QtQuickToolBar: Bo not allow negative border margins

While editing BorderImage margins I do not allow
negative margins anymore.
parent b59962eb
......@@ -520,11 +520,14 @@ void PreviewLabel::paintEvent(QPaintEvent *event)
pen.setColor("#F0F0F0");
p.setPen(pen);
p.drawLine(m_left * m_zoom, 4, m_left * m_zoom, height() - 4);
p.drawLine(width() - m_right * m_zoom, 4, width() - m_right * m_zoom, height() - 4);
p.drawLine(4, m_top * m_zoom, width() - 4, m_top * m_zoom);
p.drawLine(4, height() - m_bottom * m_zoom, width() - 4, height() - m_bottom * m_zoom);
if (m_left >= 0)
p.drawLine(m_left * m_zoom, 4, m_left * m_zoom, height() - 4);
if (m_right >= 0)
p.drawLine(width() - m_right * m_zoom, 4, width() - m_right * m_zoom, height() - 4);
if (m_top >= 0)
p.drawLine(4, m_top * m_zoom, width() - 4, m_top * m_zoom);
if (m_bottom >= 0)
p.drawLine(4, height() - m_bottom * m_zoom, width() - 4, height() - m_bottom * m_zoom);
}
{
......@@ -534,11 +537,14 @@ void PreviewLabel::paintEvent(QPaintEvent *event)
pen.setColor("#101010");
p.setPen(pen);
p.drawLine(m_left * m_zoom, 4, m_left * m_zoom, height() - 4);
p.drawLine(width() - m_right * m_zoom, 4, width() - m_right * m_zoom, height() - 4);
p.drawLine(4, m_top * m_zoom, width() - 4, m_top * m_zoom);
p.drawLine(4, height() - m_bottom * m_zoom, width() - 4, height() - m_bottom * m_zoom);
if (m_left >= 0)
p.drawLine(m_left * m_zoom, 4, m_left * m_zoom, height() - 4);
if (m_right >= 0)
p.drawLine(width() - m_right * m_zoom, 4, width() - m_right * m_zoom, height() - 4);
if (m_top >= 0)
p.drawLine(4, m_top * m_zoom, width() - 4, m_top * m_zoom);
if (m_bottom >= 0)
p.drawLine(4, height() - m_bottom * m_zoom, width() - 4, height() - m_bottom * m_zoom);
}
}
}
......
Supports Markdown
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