diff --git a/src/controls/PopupTips.qml b/src/controls/PopupTips.qml index 675f8f2..76a41da 100644 --- a/src/controls/PopupTips.qml +++ b/src/controls/PopupTips.qml @@ -31,7 +31,9 @@ Window { property point position: Qt.point(0, 0) property alias backgroundOpacity: _background.opacity property alias backgroundColor: _background.color - + property var borderColor: compositing ? FishUI.Theme.darkMode ? Qt.rgba(255, 255, 255, 0.3) + : Qt.rgba(0, 0, 0, 0.2) : FishUI.Theme.darkMode ? Qt.rgba(255, 255, 255, 0.1) + : Qt.rgba(0, 0, 0, 0.05) flags: Qt.WindowStaysOnTopHint | Qt.WindowDoesNotAcceptFocus | Qt.ToolTip width: label.implicitWidth + FishUI.Units.largeSpacing * 1.5 height: label.implicitHeight + FishUI.Units.largeSpacing * 1.5 @@ -58,6 +60,9 @@ Window { anchors.fill: parent color: FishUI.Theme.secondBackgroundColor radius: windowHelper.compositing ? FishUI.Theme.mediumRadius : 0 + border.color: control.borderColor + border.width: 1 / Screen.devicePixelRatio + border.pixelAligned: Screen.devicePixelRatio > 1 ? false : true Behavior on color { ColorAnimation { diff --git a/src/controls/Units.qml b/src/controls/Units.qml index 1ffe638..0e0a651 100644 --- a/src/controls/Units.qml +++ b/src/controls/Units.qml @@ -67,7 +67,7 @@ QtObject { * use theme.mSize(theme.defaultFont), units.smallSpacing and units.largeSpacing. * The devicePixelRatio follows the definition of "device independent pixel" by Microsoft. */ - property real devicePixelRatio: Math.max(1, ((fontMetrics.font.pixelSize * 0.75) / fontMetrics.font.pointSize)) + property real devicePixelRatio: Screen.devicePixelRatio /** * metrics used by the default font