mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 19:20:59 +08:00
fix bug
This commit is contained in:
parent
0d61e33ef1
commit
ac253a3de5
@ -122,12 +122,21 @@ Window {
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
Component.onCompleted: {
|
||||
var geometry = FluTools.desktopAvailableGeometry(window)
|
||||
width = geometry.width
|
||||
height = geometry.height
|
||||
sourceSize = Qt.size(width,height)
|
||||
img_back.updateLayout()
|
||||
source = FluTools.getUrlByFilePath(FluTheme.desktopImagePath)
|
||||
}
|
||||
Connections{
|
||||
target: window
|
||||
function onScreenChanged(){
|
||||
img_back.updateLayout()
|
||||
}
|
||||
}
|
||||
function updateLayout(){
|
||||
var geometry = FluTools.desktopAvailableGeometry(window)
|
||||
img_back.width = geometry.width
|
||||
img_back.height = geometry.height
|
||||
img_back.sourceSize = Qt.size(img_back.width,img_back.height)
|
||||
}
|
||||
Connections{
|
||||
target: FluTheme
|
||||
function onDesktopImagePathChanged(){
|
||||
@ -157,7 +166,7 @@ Window {
|
||||
blurRadius: 64
|
||||
visible: window.active && FluTheme.blurBehindWindowEnabled
|
||||
tintColor: FluTheme.dark ? Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
|
||||
targetRect: Qt.rect(window.x,window.y,window.width,window.height)
|
||||
targetRect: Qt.rect(window.x-window.screen.virtualX,window.y-window.screen.virtualY,window.width,window.height)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -121,12 +121,21 @@ Window {
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
asynchronous: true
|
||||
Component.onCompleted: {
|
||||
var geometry = FluTools.desktopAvailableGeometry(window)
|
||||
width = geometry.width
|
||||
height = geometry.height
|
||||
sourceSize = Qt.size(width,height)
|
||||
img_back.updateLayout()
|
||||
source = FluTools.getUrlByFilePath(FluTheme.desktopImagePath)
|
||||
}
|
||||
Connections{
|
||||
target: window
|
||||
function onScreenChanged(){
|
||||
img_back.updateLayout()
|
||||
}
|
||||
}
|
||||
function updateLayout(){
|
||||
var geometry = FluTools.desktopAvailableGeometry(window)
|
||||
img_back.width = geometry.width
|
||||
img_back.height = geometry.height
|
||||
img_back.sourceSize = Qt.size(img_back.width,img_back.height)
|
||||
}
|
||||
Connections{
|
||||
target: FluTheme
|
||||
function onDesktopImagePathChanged(){
|
||||
@ -156,7 +165,7 @@ Window {
|
||||
blurRadius: 64
|
||||
visible: window.active && FluTheme.blurBehindWindowEnabled
|
||||
tintColor: FluTheme.dark ? Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
|
||||
targetRect: Qt.rect(window.x,window.y,window.width,window.height)
|
||||
targetRect: Qt.rect(window.x-window.screen.virtualX,window.y-window.screen.virtualY,window.width,window.height)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user