# HG changeset patch # User Chris Cannam # Date 1427284113 0 # Node ID 325a7aa6905538d36e9624fb5caa182d26e0f760 # Parent 9022635c615a2b74653ffcb3ca809fae389a3f35 Fix possible excess image size diff -r 9022635c615a -r 325a7aa69055 widgets/LevelPanToolButton.cpp --- 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); }