mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 11:17:15 +08:00
update
This commit is contained in:
parent
b3ca045936
commit
05b41f3383
@ -243,25 +243,33 @@ CustomWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleDarkChanged(button){
|
function handleDarkChanged(button){
|
||||||
var pos = button.mapToItem(window.contentItem,0,0)
|
if(Screen.devicePixelRatio===1){
|
||||||
var mouseX = pos.x
|
var pos = button.mapToItem(window.contentItem,0,0)
|
||||||
var mouseY = pos.y
|
var mouseX = pos.x
|
||||||
canvas.maxRadius = Math.max(distance(mouseX,mouseY,0,0),distance(mouseX,mouseY,canvas.width,0),distance(mouseX,mouseY,0,canvas.height),distance(mouseX,mouseY,canvas.width,canvas.height))
|
var mouseY = pos.y
|
||||||
window.contentItem.grabToImage(function(result) {
|
canvas.maxRadius = Math.max(distance(mouseX,mouseY,0,0),distance(mouseX,mouseY,canvas.width,0),distance(mouseX,mouseY,0,canvas.height),distance(mouseX,mouseY,canvas.width,canvas.height))
|
||||||
img_cache.source = result.url
|
window.contentItem.grabToImage(function(result) {
|
||||||
canvas.requestPaint()
|
img_cache.source = result.url
|
||||||
|
canvas.requestPaint()
|
||||||
|
if(FluTheme.dark){
|
||||||
|
FluTheme.darkMode = FluDarkMode.Light
|
||||||
|
}else{
|
||||||
|
FluTheme.darkMode = FluDarkMode.Dark
|
||||||
|
}
|
||||||
|
canvas.centerX = mouseX
|
||||||
|
canvas.centerY = mouseY
|
||||||
|
anim_radius.enabled = false
|
||||||
|
canvas.radius = 0
|
||||||
|
anim_radius.enabled = true
|
||||||
|
canvas.radius = canvas.maxRadius
|
||||||
|
})
|
||||||
|
}else{
|
||||||
if(FluTheme.dark){
|
if(FluTheme.dark){
|
||||||
FluTheme.darkMode = FluDarkMode.Light
|
FluTheme.darkMode = FluDarkMode.Light
|
||||||
}else{
|
}else{
|
||||||
FluTheme.darkMode = FluDarkMode.Dark
|
FluTheme.darkMode = FluDarkMode.Dark
|
||||||
}
|
}
|
||||||
canvas.centerX = mouseX
|
}
|
||||||
canvas.centerY = mouseY
|
|
||||||
anim_radius.enabled = false
|
|
||||||
canvas.radius = 0
|
|
||||||
anim_radius.enabled = true
|
|
||||||
canvas.radius = canvas.maxRadius
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user