mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 21:37:04 +08:00
update
This commit is contained in:
parent
05b41f3383
commit
aee97c2aab
@ -243,7 +243,14 @@ CustomWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleDarkChanged(button){
|
function handleDarkChanged(button){
|
||||||
if(Screen.devicePixelRatio===1){
|
var changeDark = function(){
|
||||||
|
if(FluTheme.dark){
|
||||||
|
FluTheme.darkMode = FluDarkMode.Light
|
||||||
|
}else{
|
||||||
|
FluTheme.darkMode = FluDarkMode.Dark
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(Screen.devicePixelRatio===1 && FluTools.isWin()){
|
||||||
var pos = button.mapToItem(window.contentItem,0,0)
|
var pos = button.mapToItem(window.contentItem,0,0)
|
||||||
var mouseX = pos.x
|
var mouseX = pos.x
|
||||||
var mouseY = pos.y
|
var mouseY = pos.y
|
||||||
@ -251,11 +258,7 @@ CustomWindow {
|
|||||||
window.contentItem.grabToImage(function(result) {
|
window.contentItem.grabToImage(function(result) {
|
||||||
img_cache.source = result.url
|
img_cache.source = result.url
|
||||||
canvas.requestPaint()
|
canvas.requestPaint()
|
||||||
if(FluTheme.dark){
|
changeDark()
|
||||||
FluTheme.darkMode = FluDarkMode.Light
|
|
||||||
}else{
|
|
||||||
FluTheme.darkMode = FluDarkMode.Dark
|
|
||||||
}
|
|
||||||
canvas.centerX = mouseX
|
canvas.centerX = mouseX
|
||||||
canvas.centerY = mouseY
|
canvas.centerY = mouseY
|
||||||
anim_radius.enabled = false
|
anim_radius.enabled = false
|
||||||
@ -264,11 +267,7 @@ CustomWindow {
|
|||||||
canvas.radius = canvas.maxRadius
|
canvas.radius = canvas.maxRadius
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
if(FluTheme.dark){
|
changeDark()
|
||||||
FluTheme.darkMode = FluDarkMode.Light
|
|
||||||
}else{
|
|
||||||
FluTheme.darkMode = FluDarkMode.Dark
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user