Review Request 128201: Improved StatusbarProgressDidget that looks better on OS X and Linux

René J.V. Bertin rjvbertin at
Mon Jun 20 10:56:30 UTC 2016

This is an automatically generated e-mail. To reply, visit:

(Updated June 20, 2016, 12:56 p.m.)

Review request for KDevelop and David Faure.


Here's a series of screenshots showing how the widget looks on X11 with a flat button under Breeze, Oxygen and QtCurve.

Any KDevelop developers care to comment on this choice? I kind of like how the widget looks under Breeze; with the round Ciment icon I think I prefer to have a visible rectangular button rather than what amounts to a round button (nowadays at least).

The code is almost back to its original intent: use a non-standard button size except with the Macintosh style.
One can even skip the "additional adjustments", but then the progressbar becomes considerably taller, the heigh it has when the widget is expanded. I personnally don't like though it does have the advantage of consistency when the widget is expanded.

    if (!macWidgetStyle) {
        // Adjust maximumHeight, such that its value corresponds to
        // fontMetrics().height() + 2
        // for Breeze, Oxygen, Fusion, Windows and QtCurve
        // (the 6 follows from the sizeHint() code)
        maximumHeight -= 6;
        // additional adjustments:
        m_pButton->setAttribute( Qt::WA_LayoutUsesWidgetRect, true );
        stack->setMaximumHeight( maximumHeight );
    iconSize.scale( maximumHeight, maximumHeight, Qt::KeepAspectRatio );
    m_pButton->setFlat( true );
    m_pButton->setMaximumWidth( m_pButton->iconSize().width() + 4 );
    box->addWidget( m_pButton  );

NB: I have no idea where the reddish vertical hairline comes from. It's visible before the widget is even created.

Repository: kdevplatform


I came across this old bit of code, judging from the use of the deprecated `Q_OS_MAC` token. 
Some quick testing suggests that using `WA_LayoutUsesWidgetRect` achieves what I think is the intended effect without platform-specific code. (That platform test ought really check for using the `macintosh` widget style btw, rather than "are we running on OS X").


  shell/progresswidget/statusbarprogresswidget.cpp 1a32ea8 



For now only on OS X, with the native theme as well as QtCurve, Breeze and Oxygen.

File Attachments (updated)

OS X/Mac native *without* the patch
stock widget under Linux (same layout using Breeze)
OS X/native with the new patch
OS X using QtCurve with the new patch
Linux, Breeze, new patch
Linux, QtCurve, new patch
Linux, Oxygen, new patch
Linux, Breeze + Breeze icons, new patch
Linux, QtCurve + Breeze icons, new patch
Linux,Oxygen+Breeze icons, new patch
Linux, Breeze, new patch with maximumHeight from progressBar->sizeHint().height()
X11, Breeze style + icons
X11, Oxygen style, Breeze icons
X11, QtCurve style, Breeze icons
X11, Oxygen style & icons
X11, Oxygen style & icons, expanded state
X11, Breeze, no "additional adjustments"
X11, Oxygen, taller progbar due to "no additional adjustments"


René J.V. Bertin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list