Skip to content

Commit

Permalink
fix: border color issue
Browse files Browse the repository at this point in the history
adjust Inner border and outer border

Issue: linuxdeepin/developer-center#8342
  • Loading branch information
mhduiy authored and kegechen committed Jun 20, 2024
1 parent 3ea84bf commit 20165fd
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions qml/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,22 @@ QtObject {
if (DebugHelper.useRegularWindow) return Qt.Window
return ( Qt.FramelessWindowHint | Qt.Tool)
}

function blendColorAlpha(fallback) {
var appearance = DS.applet("org.deepin.ds.dde-appearance")
if (!appearance || appearance.opacity < 0)
return fallback
return appearance.opacity
}

StyledBehindWindowBlur {
control: parent
anchors.fill: parent
function blendColorAlpha(fallback) {
var appearance = DS.applet("org.deepin.ds.dde-appearance")
if (!appearance || appearance.opacity < 0)
return fallback
return appearance.opacity
}
blendColor: {
if (valid) {
return DStyle.Style.control.selectColor(undefined,
Qt.rgba(235 / 255.0, 235 / 255.0, 235 / 255.0, blendColorAlpha(0.6)),
Qt.rgba(0, 0, 0, blendColorAlpha(85 / 255)))
Qt.rgba(235 / 255.0, 235 / 255.0, 235 / 255.0, windowedFrameWindow.blendColorAlpha(0.6)),
Qt.rgba(0, 0, 0, windowedFrameWindow.blendColorAlpha(85 / 255)))
}
return DStyle.Style.control.selectColor(undefined,
DStyle.Style.behindWindowBlur.lightNoBlurColor,
Expand All @@ -216,6 +218,7 @@ QtObject {
InsideBoxBorder {
anchors.fill: parent
radius: WindowManagerHelper.hasComposite ? windowedFrameWindow.DWindow.windowRadius : 0
color: DTK.themeType === ApplicationHelper.DarkType ? Qt.rgba(1, 1, 1, 0.15) : Qt.rgba(1, 1, 1, windowedFrameWindow.blendColorAlpha(0.6) - 0.05)
}

color: "transparent"
Expand All @@ -225,6 +228,7 @@ QtObject {
DWindow.enableSystemResize: false
DWindow.enableSystemMove: false
DWindow.enableBlurWindow: true
DWindow.borderColor: DTK.themeType === ApplicationHelper.DarkType ? Qt.rgba(0, 0, 0, windowedFrameWindow.blendColorAlpha(0.6) + 10 / 255) : Qt.rgba(0, 0, 0, 0.15)

onVisibleChanged: {
updateWindowVisibilityAndPosition()
Expand Down

0 comments on commit 20165fd

Please sign in to comment.