Commit 5596fd9f authored by Fabian Vogt's avatar Fabian Vogt
Browse files

Look at QStyleOptionProgressBar::orientation again

Some applications (KGet, DigiKam) use that and not QStyle::State_Horizontal.
For compatibility, keep looking at it as long as it's available.
parent 45745976
Pipeline #221610 passed with stage
in 1 minute and 53 seconds
......@@ -168,7 +168,11 @@ private:
//_______________________________________________________________
bool isProgressBarHorizontal(const QStyleOptionProgressBar *option)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
return option && (option->state & QStyle::State_Horizontal);
#else
return option && ((option->state & QStyle::State_Horizontal) || option->orientation == Qt::Horizontal);
#endif
}
enum class ToolButtonMenuArrowStyle {
......
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