diff --git a/skins/material3/QskMaterial3Skin.cpp b/skins/material3/QskMaterial3Skin.cpp index 199d2cdf..7c23c6a5 100644 --- a/skins/material3/QskMaterial3Skin.cpp +++ b/skins/material3/QskMaterial3Skin.cpp @@ -324,6 +324,8 @@ void Editor::setupMenu() setBoxBorderMetrics( Q::Panel, 0 ); setPadding( Q::Panel, 0 ); + setGradient( Q::Overlay, Qt::transparent ); + // The color here is primary with an opacity of 8% - we blend that // with the background, because we don't want the menu to have transparency: const auto panel = flattenedColor( m_pal.primary, m_pal.background, 0.08 ); diff --git a/src/controls/QskMenu.cpp b/src/controls/QskMenu.cpp index 39139210..95e56910 100644 --- a/src/controls/QskMenu.cpp +++ b/src/controls/QskMenu.cpp @@ -17,6 +17,7 @@ #include #include +QSK_SUBCONTROL( QskMenu, Overlay ) QSK_SUBCONTROL( QskMenu, Panel ) QSK_SUBCONTROL( QskMenu, Segment ) QSK_SUBCONTROL( QskMenu, Cursor ) @@ -81,6 +82,8 @@ QskMenu::QskMenu( QQuickItem* parent ) setPopupFlag( QskPopup::CloseOnPressOutside, true ); setPopupFlag( QskPopup::DeleteOnClose, true ); + setSubcontrolProxy( Inherited::Overlay, Overlay ); + initSizePolicy( QskSizePolicy::Fixed, QskSizePolicy::Fixed ); } diff --git a/src/controls/QskMenu.h b/src/controls/QskMenu.h index beb3261d..e669a532 100644 --- a/src/controls/QskMenu.h +++ b/src/controls/QskMenu.h @@ -32,7 +32,7 @@ class QSK_EXPORT QskMenu : public QskPopup using Inherited = QskPopup; public: - QSK_SUBCONTROLS( Panel, Segment, Cursor, Text, Graphic, Separator ) + QSK_SUBCONTROLS( Overlay, Panel, Segment, Cursor, Text, Graphic, Separator ) QSK_STATES( Selected ) QskMenu( QQuickItem* parentItem = nullptr );