Commit 42e7e9dc authored by Michail Vourlakos's avatar Michail Vourlakos
Browse files

fix paint for standalone buttons with dynamic size

m_iconSize for standalone buttons can be changed
dynamically based on user or container preferences.
Such an example could be the window buttons applet
that is resizing its buttons based on panel thickness
or when the applet is on the desktop and the user
resizes it. Previous implementation was failing
because even though m_iconSize was set as NULL for
StandAlone buttons, on the first painting m_iconSize
was set based on Button::geometry(). This of course
was failing because the Button::geometry() could change
afterwards and painting was not considering it to
calculate m_iconSize again.
parent 6a21388b
......@@ -208,7 +208,7 @@ namespace Oxygen
if( m_flag == FlagFirstInList ) painter->translate( m_offset );
else painter->translate( 0, m_offset.y() );
if( !m_iconSize.isValid() ) m_iconSize = geometry().size().toSize();
if( !m_iconSize.isValid() || isStandAlone() ) m_iconSize = geometry().size().toSize();
// menu buttons
if( isMenuButton() )
......
Markdown is supported
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