mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 11:17:15 +08:00
update
This commit is contained in:
parent
b981ecca7d
commit
542ea0a7b9
@ -45,7 +45,6 @@ FluWindow {
|
|||||||
tour.open()
|
tour.open()
|
||||||
checkUpdate(true)
|
checkUpdate(true)
|
||||||
FluEventBus.registerEvent(event_checkupdate)
|
FluEventBus.registerEvent(event_checkupdate)
|
||||||
setHitTestVisible(layout_back_buttons)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onDestruction: {
|
Component.onDestruction: {
|
||||||
|
@ -48,7 +48,6 @@ FluWindow {
|
|||||||
tour.open()
|
tour.open()
|
||||||
checkUpdate(true)
|
checkUpdate(true)
|
||||||
FluEventBus.registerEvent(event_checkupdate)
|
FluEventBus.registerEvent(event_checkupdate)
|
||||||
setHitTestVisible(layout_back_buttons)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onDestruction: {
|
Component.onDestruction: {
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 2613dd72fd9bf37758caaafb43531e858a337639
|
Subproject commit 694967e930d2dd9f15c5429674005cc0a4217060
|
@ -72,10 +72,10 @@ Rectangle{
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
property bool isRestore: win && Window.Maximized === win.visibility
|
property bool isRestore: win && Window.Maximized === win.visibility
|
||||||
property bool resizable: win && !(win.minimumHeight === win.maximumHeight && win.maximumWidth === win.minimumWidth)
|
property bool resizable: win && !(win.height === win.maximumHeight && win.height === win.minimumHeight && win.width === win.maximumWidth && win.width === win.minimumWidth)
|
||||||
}
|
}
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onTapped: if (tapCount === 2) btn_maximize.clicked()
|
onTapped: if (tapCount === 2 && d.resizable) btn_maximize.clicked()
|
||||||
gesturePolicy: TapHandler.DragThreshold
|
gesturePolicy: TapHandler.DragThreshold
|
||||||
}
|
}
|
||||||
DragHandler {
|
DragHandler {
|
||||||
|
@ -86,11 +86,6 @@ Item {
|
|||||||
return FluNavigationViewType.Open
|
return FluNavigationViewType.Open
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if(Window.window instanceof FluWindow){
|
|
||||||
Window.window.setHitTestVisible(backButton())
|
|
||||||
Window.window.setHitTestVisible(navButton())
|
|
||||||
Window.window.setHitTestVisible(logoButton())
|
|
||||||
}
|
|
||||||
timer_anim_delay.restart()
|
timer_anim_delay.restart()
|
||||||
}
|
}
|
||||||
Timer{
|
Timer{
|
||||||
|
@ -38,7 +38,7 @@ Window {
|
|||||||
property bool showMinimize: true
|
property bool showMinimize: true
|
||||||
property bool showMaximize: true
|
property bool showMaximize: true
|
||||||
property bool showStayTop: true
|
property bool showStayTop: true
|
||||||
readonly property bool useSystemAppBar: false
|
property bool useSystemAppBar: false
|
||||||
property var closeListener: function(event){
|
property var closeListener: function(event){
|
||||||
if(closeDestory){
|
if(closeDestory){
|
||||||
destoryOnClose()
|
destoryOnClose()
|
||||||
@ -49,6 +49,10 @@ Window {
|
|||||||
}
|
}
|
||||||
signal initArgument(var argument)
|
signal initArgument(var argument)
|
||||||
id:window
|
id:window
|
||||||
|
maximumWidth: useSystemAppBar&&fixSize ? width : 16777215
|
||||||
|
maximumHeight: useSystemAppBar&&fixSize ? height : 16777215
|
||||||
|
minimumWidth: useSystemAppBar&&fixSize ? width : 0
|
||||||
|
minimumHeight: useSystemAppBar&&fixSize ? height : 0
|
||||||
color:"transparent"
|
color:"transparent"
|
||||||
onStayTopChanged: {
|
onStayTopChanged: {
|
||||||
d.changedStayTop()
|
d.changedStayTop()
|
||||||
@ -214,15 +218,8 @@ Window {
|
|||||||
flags = flags | Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint
|
flags = flags | Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint
|
||||||
if(appBar){
|
if(appBar){
|
||||||
var appbar = window.appBar
|
var appbar = window.appBar
|
||||||
setTitleBarItem(appbar)
|
|
||||||
window.moveWindowToDesktopCenter()
|
window.moveWindowToDesktopCenter()
|
||||||
setHitTestVisible(appbar.minimizeButton())
|
|
||||||
setHitTestVisible(appbar.maximizeButton())
|
|
||||||
setHitTestVisible(appbar.closeButton())
|
|
||||||
setHitTestVisible(appbar.stayTopButton())
|
|
||||||
setHitTestVisible(appbar.darkButton())
|
|
||||||
setWindowFixedSize(fixSize)
|
setWindowFixedSize(fixSize)
|
||||||
appbar.maximizeButton.visible = !fixSize
|
|
||||||
if (blurBehindWindowEnabled)
|
if (blurBehindWindowEnabled)
|
||||||
window.background = undefined
|
window.background = undefined
|
||||||
}
|
}
|
||||||
@ -259,9 +256,6 @@ Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function setHitTestVisible(item){
|
|
||||||
framless_helper.setHitTestVisible(item)
|
|
||||||
}
|
|
||||||
function destoryOnClose(){
|
function destoryOnClose(){
|
||||||
lifecycle.onDestoryOnClose()
|
lifecycle.onDestoryOnClose()
|
||||||
}
|
}
|
||||||
|
@ -72,10 +72,10 @@ Rectangle{
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
property bool isRestore: win && Window.Maximized === win.visibility
|
property bool isRestore: win && Window.Maximized === win.visibility
|
||||||
property bool resizable: win && !(win.minimumHeight === win.maximumHeight && win.maximumWidth === win.minimumWidth)
|
property bool resizable: win && !(win.height === win.maximumHeight && win.height === win.minimumHeight && win.width === win.maximumWidth && win.width === win.minimumWidth)
|
||||||
}
|
}
|
||||||
TapHandler {
|
TapHandler {
|
||||||
onTapped: if (tapCount === 2) btn_maximize.clicked()
|
onTapped: if (tapCount === 2 && d.resizable) btn_maximize.clicked()
|
||||||
gesturePolicy: TapHandler.DragThreshold
|
gesturePolicy: TapHandler.DragThreshold
|
||||||
}
|
}
|
||||||
DragHandler {
|
DragHandler {
|
||||||
|
@ -87,11 +87,6 @@ Item {
|
|||||||
return FluNavigationViewType.Open
|
return FluNavigationViewType.Open
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if(Window.window instanceof FluWindow){
|
|
||||||
Window.window.setHitTestVisible(backButton())
|
|
||||||
Window.window.setHitTestVisible(navButton())
|
|
||||||
Window.window.setHitTestVisible(logoButton())
|
|
||||||
}
|
|
||||||
timer_anim_delay.restart()
|
timer_anim_delay.restart()
|
||||||
}
|
}
|
||||||
Timer{
|
Timer{
|
||||||
|
@ -37,7 +37,7 @@ Window {
|
|||||||
property bool showMinimize: true
|
property bool showMinimize: true
|
||||||
property bool showMaximize: true
|
property bool showMaximize: true
|
||||||
property bool showStayTop: true
|
property bool showStayTop: true
|
||||||
readonly property bool useSystemAppBar: false
|
property bool useSystemAppBar: false
|
||||||
property var closeListener: function(event){
|
property var closeListener: function(event){
|
||||||
if(closeDestory){
|
if(closeDestory){
|
||||||
destoryOnClose()
|
destoryOnClose()
|
||||||
@ -48,6 +48,10 @@ Window {
|
|||||||
}
|
}
|
||||||
signal initArgument(var argument)
|
signal initArgument(var argument)
|
||||||
id:window
|
id:window
|
||||||
|
maximumWidth: useSystemAppBar&&fixSize ? width : 16777215
|
||||||
|
maximumHeight: useSystemAppBar&&fixSize ? height : 16777215
|
||||||
|
minimumWidth: useSystemAppBar&&fixSize ? width : 0
|
||||||
|
minimumHeight: useSystemAppBar&&fixSize ? height : 0
|
||||||
color:"transparent"
|
color:"transparent"
|
||||||
onStayTopChanged: {
|
onStayTopChanged: {
|
||||||
d.changedStayTop()
|
d.changedStayTop()
|
||||||
@ -57,12 +61,6 @@ Window {
|
|||||||
initArgument(argument)
|
initArgument(argument)
|
||||||
d.changedStayTop()
|
d.changedStayTop()
|
||||||
if(useSystemAppBar){
|
if(useSystemAppBar){
|
||||||
if(fixSize){
|
|
||||||
maximumHeight = height
|
|
||||||
minimumHeight = height
|
|
||||||
maximumWidth = width
|
|
||||||
minimumWidth = width
|
|
||||||
}
|
|
||||||
window.moveWindowToDesktopCenter()
|
window.moveWindowToDesktopCenter()
|
||||||
window.visible = true
|
window.visible = true
|
||||||
}
|
}
|
||||||
@ -219,15 +217,8 @@ Window {
|
|||||||
flags = flags | Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint
|
flags = flags | Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint
|
||||||
if(appBar){
|
if(appBar){
|
||||||
var appbar = window.appBar
|
var appbar = window.appBar
|
||||||
setTitleBarItem(appbar)
|
|
||||||
window.moveWindowToDesktopCenter()
|
window.moveWindowToDesktopCenter()
|
||||||
setHitTestVisible(appbar.minimizeButton())
|
|
||||||
setHitTestVisible(appbar.maximizeButton())
|
|
||||||
setHitTestVisible(appbar.closeButton())
|
|
||||||
setHitTestVisible(appbar.stayTopButton())
|
|
||||||
setHitTestVisible(appbar.darkButton())
|
|
||||||
setWindowFixedSize(fixSize)
|
setWindowFixedSize(fixSize)
|
||||||
appbar.maximizeButton.visible = !fixSize
|
|
||||||
if (blurBehindWindowEnabled)
|
if (blurBehindWindowEnabled)
|
||||||
window.background = undefined
|
window.background = undefined
|
||||||
}
|
}
|
||||||
@ -264,9 +255,6 @@ Window {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function setHitTestVisible(item){
|
|
||||||
framless_helper.setHitTestVisible(item)
|
|
||||||
}
|
|
||||||
function destoryOnClose(){
|
function destoryOnClose(){
|
||||||
lifecycle.onDestoryOnClose()
|
lifecycle.onDestoryOnClose()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user