QskMenu::Overlay settings fixed ( working for Squiek again )

This commit is contained in:
Uwe Rathmann 2023-02-27 14:06:57 +01:00
parent c8b276db40
commit a67d23420f
3 changed files with 6 additions and 4 deletions

View File

@ -359,12 +359,13 @@ void Editor::setupMenu()
using A = QskAspect; using A = QskAspect;
using Q = QskMenu; using Q = QskMenu;
setFlagHint( Q::Overlay | A::Style, false );
setGradient( Q::Overlay, stateLayerColor( m_pal.outline, 0.8 ) );
setBoxShape( Q::Panel, 4_dp ); setBoxShape( Q::Panel, 4_dp );
setBoxBorderMetrics( Q::Panel, 0 ); setBoxBorderMetrics( Q::Panel, 0 );
setPadding( 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 // 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: // 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 ); const auto panel = flattenedColor( m_pal.primary, m_pal.background, 0.08 );

View File

@ -340,6 +340,9 @@ void Editor::setupMenu()
using A = QskAspect; using A = QskAspect;
using Q = QskMenu; using Q = QskMenu;
setFlagHint( Q::Overlay | A::Style, true );
setGradient( Q::Overlay, QColor( 220, 220, 220, 100 ) );
setBoxShape( Q::Panel, qskDpiScaled( 4 ) ); setBoxShape( Q::Panel, qskDpiScaled( 4 ) );
setBoxBorderMetrics( Q::Panel, qskDpiScaled( 1 ) ); setBoxBorderMetrics( Q::Panel, qskDpiScaled( 1 ) );
setBoxBorderColors( Q::Panel, m_pal.darker125 ); setBoxBorderColors( Q::Panel, m_pal.darker125 );

View File

@ -75,8 +75,6 @@ QskMenu::QskMenu( QQuickItem* parent )
, m_data( new PrivateData ) , m_data( new PrivateData )
{ {
setModal( true ); setModal( true );
setOverlay( true );
setFaderAspect( QskMenu::Panel | QskAspect::Position | QskAspect::Metric ); setFaderAspect( QskMenu::Panel | QskAspect::Position | QskAspect::Metric );
setPopupFlag( QskPopup::CloseOnPressOutside, true ); setPopupFlag( QskPopup::CloseOnPressOutside, true );