GODT-1272: Ultimate fix for MacOS transparency

This commit is contained in:
Alexander Bilyak
2021-10-11 16:37:15 +02:00
committed by Jakub
parent e49d2e1be7
commit 10da4f284c
2 changed files with 309 additions and 289 deletions

View File

@ -43,7 +43,12 @@ Window {
flags : Qt.Window | Qt.Dialog
visible : true
title : "Bridge Test GUI"
color : colorScheme.background_norm
// This is needed because on MacOS if first window shown is not transparent -
// all other windows of application will not have transparent background (black
// instead of transparency). In our case that mean that if BridgeTest will be
// shown before StatusWindow - StatusWindow will not have transparent corners.
color: "transparent"
function getCursorPos() {
return BridgePreview.getCursorPos()
@ -272,12 +277,20 @@ Window {
}
}
StackLayout {
Rectangle {
color: root.colorScheme.background_norm
anchors.top: tabBar.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
implicitHeight: children[0].contentHeight + children[0].anchors.topMargin + children[0].anchors.bottomMargin
implicitWidth: children[0].contentWidth + children[0].anchors.leftMargin + children[0].anchors.rightMargin
StackLayout {
anchors.fill: parent
currentIndex: tabBar.currentIndex
anchors.margins: 10
@ -634,6 +647,7 @@ Window {
}
}
}
}
property Bridge bridge

View File

@ -41,6 +41,12 @@ ApplicationWindow {
property var backend
property var notifications
// This is needed because on MacOS if first window shown is not transparent -
// all other windows of application will not have transparent background (black
// instead of transparency). In our case that mean that if MainWindow will be
// shown before StatusWindow - StatusWindow will not have transparent corners.
color: "transparent"
// show Setup Guide on every new user
Connections {
target: root.backend.users