refactor: update interface

pull/25/merge
kateleet 5 years ago
parent fd33abe631
commit 11b2aa24f3

@ -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 {

@ -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

Loading…
Cancel
Save