Mercurial > hg > svgui
changeset 934:325a7aa69055 tonioni
Fix possible excess image size
author | Chris Cannam |
---|---|
date | Wed, 25 Mar 2015 11:48:33 +0000 |
parents | 9022635c615a |
children | 1c529a22a6a7 a61a779d73df |
files | widgets/LevelPanToolButton.cpp |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/widgets/LevelPanToolButton.cpp Wed Mar 25 11:41:17 2015 +0000 +++ b/widgets/LevelPanToolButton.cpp Wed Mar 25 11:48:33 2015 +0000 @@ -134,6 +134,9 @@ LevelPanToolButton::paintEvent(QPaintEvent *e) { QToolButton::paintEvent(e); + if (m_pixels >= height()) { + setImageSize(height()-1); + } double margin = (double(height()) - m_pixels) / 2.0; m_lpw->renderTo(this, QRectF(margin, margin, m_pixels, m_pixels), false); }