This commit is contained in:
zhuzichu
2024-01-02 16:56:28 +08:00
parent 0241ecd07f
commit 1464e647d9
6 changed files with 51 additions and 26 deletions

View File

@ -8,7 +8,7 @@ Button {
property string contentDescription: ""
QtObject{
id:d
property bool checked: rect_back.height == background.height
property bool checked: (rect_back.height === background.height) && (progress === 1)
}
property color normalColor: {
if(d.checked){

View File

@ -70,6 +70,7 @@ Window {
_realHeight = height
_realWidth = width
moveWindowToDesktopCenter()
fixWindowSize()
useSystemAppBar = FluApp.useSystemAppBar
if(!useSystemAppBar){
loader_frameless_helper.sourceComponent = com_frameless
@ -120,7 +121,11 @@ Window {
}
Component{
id:com_frameless
FluFramelessHelper{}
FluFramelessHelper{
onLoadCompleted:{
window.moveWindowToDesktopCenter()
}
}
}
Component{
id:com_background
@ -301,11 +306,13 @@ Window {
function moveWindowToDesktopCenter(){
screen = Qt.application.screens[FluTools.cursorScreenIndex()]
window.setGeometry((Screen.width-window.width)/2+Screen.virtualX,(Screen.height-window.height)/2+Screen.virtualY,window.width,window.height)
}
function fixWindowSize(){
if(fixSize){
maximumWidth = width
maximumHeight = height
minimumWidth = width
minimumHeight = height
window.maximumWidth = window.width
window.maximumHeight = window.height
window.minimumWidth = window.width
window.minimumHeight = window.height
}
}
function onResult(data){