main
朱子楚\zhuzi 2023-06-11 21:44:54 +08:00
parent 05b41f3383
commit aee97c2aab
1 changed files with 10 additions and 11 deletions

View File

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