mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-27 05:38:37 +08:00
update
This commit is contained in:
parent
cac1864d65
commit
fc618e96c5
@ -1 +1 @@
|
|||||||
Subproject commit 80f869adcaf7db76ba8088f2c16382dcd5feaafb
|
Subproject commit c4a7bc80d0ca0b1b87418515ab4836f3d4944ae0
|
@ -14,7 +14,6 @@ Window {
|
|||||||
property bool fixSize: false
|
property bool fixSize: false
|
||||||
property Component loadingItem: com_loading
|
property Component loadingItem: com_loading
|
||||||
property var appBar: com_app_bar
|
property var appBar: com_app_bar
|
||||||
flags: Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint
|
|
||||||
property color backgroundColor: {
|
property color backgroundColor: {
|
||||||
if(active){
|
if(active){
|
||||||
return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||||
@ -34,6 +33,7 @@ Window {
|
|||||||
}
|
}
|
||||||
signal initArgument(var argument)
|
signal initArgument(var argument)
|
||||||
id:window
|
id:window
|
||||||
|
flags: Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint
|
||||||
color:"transparent"
|
color:"transparent"
|
||||||
onStayTopChanged: {
|
onStayTopChanged: {
|
||||||
d.changedStayTop()
|
d.changedStayTop()
|
||||||
@ -49,19 +49,23 @@ Window {
|
|||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
lifecycle.onVisible(visible)
|
lifecycle.onVisible(visible)
|
||||||
}
|
}
|
||||||
onVisibilityChanged: {
|
|
||||||
console.debug(visibility)
|
|
||||||
}
|
|
||||||
QtObject{
|
QtObject{
|
||||||
id:d
|
id:d
|
||||||
function changedStayTop(){
|
function changedStayTop(){
|
||||||
var visibility = window.visibility
|
function toggleStayTop(){
|
||||||
if(window.stayTop){
|
if(window.stayTop){
|
||||||
window.flags = window.flags | Qt.WindowStaysOnTopHint
|
window.flags = window.flags | Qt.WindowStaysOnTopHint
|
||||||
}else{
|
}else{
|
||||||
window.flags = window.flags &~ Qt.WindowStaysOnTopHint
|
window.flags = window.flags &~ Qt.WindowStaysOnTopHint
|
||||||
}
|
}
|
||||||
window.visibility = visibility
|
}
|
||||||
|
if(window.visibility === Window.Maximized){
|
||||||
|
window.visibility = Window.Windowed
|
||||||
|
toggleStayTop()
|
||||||
|
window.visibility = Window.Maximized
|
||||||
|
}else{
|
||||||
|
toggleStayTop()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Connections{
|
Connections{
|
||||||
|
@ -13,7 +13,6 @@ Window {
|
|||||||
property bool fixSize: false
|
property bool fixSize: false
|
||||||
property Component loadingItem: com_loading
|
property Component loadingItem: com_loading
|
||||||
property var appBar: com_app_bar
|
property var appBar: com_app_bar
|
||||||
flags: Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint
|
|
||||||
property color backgroundColor: {
|
property color backgroundColor: {
|
||||||
if(active){
|
if(active){
|
||||||
return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(243/255,243/255,243/255,1)
|
||||||
@ -33,6 +32,7 @@ Window {
|
|||||||
}
|
}
|
||||||
signal initArgument(var argument)
|
signal initArgument(var argument)
|
||||||
id:window
|
id:window
|
||||||
|
flags: Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint
|
||||||
color:"transparent"
|
color:"transparent"
|
||||||
onStayTopChanged: {
|
onStayTopChanged: {
|
||||||
d.changedStayTop()
|
d.changedStayTop()
|
||||||
@ -48,19 +48,23 @@ Window {
|
|||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
lifecycle.onVisible(visible)
|
lifecycle.onVisible(visible)
|
||||||
}
|
}
|
||||||
onVisibilityChanged: {
|
|
||||||
console.debug(visibility)
|
|
||||||
}
|
|
||||||
QtObject{
|
QtObject{
|
||||||
id:d
|
id:d
|
||||||
function changedStayTop(){
|
function changedStayTop(){
|
||||||
var visibility = window.visibility
|
function toggleStayTop(){
|
||||||
if(window.stayTop){
|
if(window.stayTop){
|
||||||
window.flags = window.flags | Qt.WindowStaysOnTopHint
|
window.flags = window.flags | Qt.WindowStaysOnTopHint
|
||||||
}else{
|
}else{
|
||||||
window.flags = window.flags &~ Qt.WindowStaysOnTopHint
|
window.flags = window.flags &~ Qt.WindowStaysOnTopHint
|
||||||
}
|
}
|
||||||
window.visibility = visibility
|
}
|
||||||
|
if(window.visibility === Window.Maximized){
|
||||||
|
window.visibility = Window.Windowed
|
||||||
|
toggleStayTop()
|
||||||
|
window.visibility = Window.Maximized
|
||||||
|
}else{
|
||||||
|
toggleStayTop()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Connections{
|
Connections{
|
||||||
|
Loading…
Reference in New Issue
Block a user