Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkdeclarative
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#269
  • Loading branch information
deepin-ci-robot committed Jan 4, 2024
1 parent f469d0c commit 3988e74
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions qt6/src/qml/FloatingPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Control {
property D.Palette dropShadowColor: DS.Style.floatingPanel.dropShadow
property D.Palette outsideBorderColor: DS.Style.floatingPanel.outsideBorder
property D.Palette insideBorderColor: DS.Style.floatingPanel.insideBorder
property bool enableOffScreen: true
// corner radius
property int radius: DS.Style.floatingPanel.radius
// blur radius
Expand All @@ -25,7 +24,7 @@ Control {
implicitWidth: DS.Style.floatingPanel.width
implicitHeight: DS.Style.floatingPanel.height
radius: blurRadius
offscreen: enableOffScreen
offscreen: true

D.ItemViewport {
anchors.fill: parent
Expand Down
1 change: 0 additions & 1 deletion qt6/src/qml/Menu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ T.Menu {
implicitHeight: DS.Style.menu.item.height
radius: DS.Style.menu.radius
backgroundColor: control.backgroundColor
enableOffScreen: false
}
}
}
5 changes: 4 additions & 1 deletion src/private/dblurimagenode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ void DOpenGLBlurEffectNode::render(const QSGRenderNode::RenderState *state)
QSGRenderNode::StateFlags DOpenGLBlurEffectNode::changedStates() const
{
if (m_offscreen)
return StateFlags();
return BlendState;
return BlendState | StencilState | ScissorState;
}

Expand Down Expand Up @@ -604,6 +604,9 @@ void DOpenGLBlurEffectNode::applyDaulBlur(QOpenGLFramebufferObject *targetFBO, G
QOpenGLFunctions *f = context->functions();
shader->bind();

glEnable(GL_BLEND);
f->glBlendFunc(GL_ONE, GL_ZERO);

// TODO(xiaoyaobing): Shader pixel offset value during hardware rendering, because software rendering
// does not, so write a fixed value here
shader->setUniformValue("offset", QVector2D(8, 8));
Expand Down
3 changes: 1 addition & 2 deletions src/qml/FloatingPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Control {
property D.Palette dropShadowColor: DS.Style.floatingPanel.dropShadow
property D.Palette outsideBorderColor: DS.Style.floatingPanel.outsideBorder
property D.Palette insideBorderColor: DS.Style.floatingPanel.insideBorder
property bool enableOffScreen: true
// corner radius
property int radius: DS.Style.floatingPanel.radius
// blur radius
Expand All @@ -25,7 +24,7 @@ Control {
implicitWidth: DS.Style.floatingPanel.width
implicitHeight: DS.Style.floatingPanel.height
radius: blurRadius
offscreen: enableOffScreen
offscreen: true

D.ItemViewport {
anchors.fill: parent
Expand Down
1 change: 0 additions & 1 deletion src/qml/Menu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ T.Menu {
implicitHeight: DS.Style.menu.item.height
radius: DS.Style.menu.radius
backgroundColor: control.backgroundColor
enableOffScreen: false
}
}
}

0 comments on commit 3988e74

Please sign in to comment.