heuristic for initializing the cascading property moved from skin to
QskMenu
This commit is contained in:
parent
c4f5a4bc93
commit
d52453311f
|
@ -237,8 +237,7 @@ void Editor::setupMenu()
|
|||
|
||||
setGradient( Q::Panel, m_pal.baseColor );
|
||||
|
||||
const bool isCascading = qskMaybeDesktopPlatform();
|
||||
setFlagHint( Q::Panel | A::Style, isCascading );
|
||||
setFlagHint( Q::Panel | A::Style, false ); // not cascading
|
||||
|
||||
#if 0
|
||||
setPadding( Q::Separator, QMarginsF( 10, 0, 10, 0 ) );
|
||||
|
|
|
@ -42,16 +42,10 @@ const QPlatformIntegration* qskPlatformIntegration()
|
|||
|
||||
bool qskMaybeDesktopPlatform()
|
||||
{
|
||||
// this is what QC2 is doing for menus ?
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 15, 0 )
|
||||
#if !QT_CONFIG(cursor)
|
||||
return false;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(cursor)
|
||||
if ( const auto platform = QGuiApplicationPrivate::platformIntegration() )
|
||||
return platform->hasCapability( QPlatformIntegration::MultipleWindows );
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <QskColorFilter.h>
|
||||
#include <QskSkinlet.h>
|
||||
#include <QskEvent.h>
|
||||
#include <QskPlatform.h>
|
||||
|
||||
#include <qvector.h>
|
||||
#include <qvariant.h>
|
||||
|
@ -85,7 +86,7 @@ QskMenu::~QskMenu()
|
|||
// has no effect as we do not offer submenus yet. TODO ...
|
||||
bool QskMenu::isCascading() const
|
||||
{
|
||||
return flagHint( QskMenu::Panel | QskAspect::Style );
|
||||
return flagHint( QskMenu::Panel | QskAspect::Style, qskMaybeDesktopPlatform() );
|
||||
}
|
||||
|
||||
void QskMenu::setCascading( bool on )
|
||||
|
|
Loading…
Reference in New Issue