Skip to content

Commit

Permalink
fix: insideBoxBorer color issue
Browse files Browse the repository at this point in the history
adjust insideBoxBorer color

Issue: linuxdeepin/developer-center#8342
  • Loading branch information
mhduiy committed Jun 18, 2024
1 parent ee907b1 commit b488079
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions qt6/src/qml/InsideBoxBorder.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,20 @@

import QtQuick 2.0
import QtQuick.Window 2.11
import org.deepin.dtk 1.0 as D

Item {
// The width of the window's inner and outer borders do not change as the screen scales, and always remain 1px size
property real borderWidth: 1 / Screen.devicePixelRatio
property color color: Qt.rgba(1, 1, 1, 0.15)
property color color: D.DTK.themeType === D.ApplicationHelper.DarkType ? Qt.rgba(1, 1, 1, 0.15) : Qt.rgba(1, 1, 1, blendColorAlpha(0.4) - 0.05)
property alias radius: rect.radius

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

Rectangle {
id: rect

Expand Down

0 comments on commit b488079

Please sign in to comment.