mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-24 03:30:59 +08:00
fix bug
This commit is contained in:
parent
0d61e33ef1
commit
ac253a3de5
@ -122,12 +122,21 @@ Window {
|
|||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var geometry = FluTools.desktopAvailableGeometry(window)
|
img_back.updateLayout()
|
||||||
width = geometry.width
|
|
||||||
height = geometry.height
|
|
||||||
sourceSize = Qt.size(width,height)
|
|
||||||
source = FluTools.getUrlByFilePath(FluTheme.desktopImagePath)
|
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{
|
Connections{
|
||||||
target: FluTheme
|
target: FluTheme
|
||||||
function onDesktopImagePathChanged(){
|
function onDesktopImagePathChanged(){
|
||||||
@ -157,7 +166,7 @@ Window {
|
|||||||
blurRadius: 64
|
blurRadius: 64
|
||||||
visible: window.active && FluTheme.blurBehindWindowEnabled
|
visible: window.active && FluTheme.blurBehindWindowEnabled
|
||||||
tintColor: FluTheme.dark ? Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
|
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
|
fillMode: Image.PreserveAspectCrop
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var geometry = FluTools.desktopAvailableGeometry(window)
|
img_back.updateLayout()
|
||||||
width = geometry.width
|
|
||||||
height = geometry.height
|
|
||||||
sourceSize = Qt.size(width,height)
|
|
||||||
source = FluTools.getUrlByFilePath(FluTheme.desktopImagePath)
|
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{
|
Connections{
|
||||||
target: FluTheme
|
target: FluTheme
|
||||||
function onDesktopImagePathChanged(){
|
function onDesktopImagePathChanged(){
|
||||||
@ -156,7 +165,7 @@ Window {
|
|||||||
blurRadius: 64
|
blurRadius: 64
|
||||||
visible: window.active && FluTheme.blurBehindWindowEnabled
|
visible: window.active && FluTheme.blurBehindWindowEnabled
|
||||||
tintColor: FluTheme.dark ? Qt.rgba(0, 0, 0, 1) : Qt.rgba(1, 1, 1, 1)
|
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