mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-02 08:05:29 +08:00
update
This commit is contained in:
@ -15,14 +15,22 @@ Rectangle{
|
||||
|
||||
property string title: "标题"
|
||||
|
||||
property bool resizable: {
|
||||
if(Window.window == null){
|
||||
return false
|
||||
}
|
||||
return !(Window.window.minimumHeight === Window.window.maximumHeight && Window.window.maximumWidth === Window.window.minimumWidth)
|
||||
}
|
||||
|
||||
MouseArea{
|
||||
property var lastClickTime: new Date()
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: 5
|
||||
acceptedButtons: Qt.LeftButton
|
||||
hoverEnabled: true
|
||||
onPressed: Window.window.startSystemMove()
|
||||
onDoubleClicked: {
|
||||
toggleMaximized();
|
||||
if(resizable)
|
||||
toggleMaximized();
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,8 +42,6 @@ Rectangle{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
FluText {
|
||||
text: title
|
||||
anchors{
|
||||
@ -54,10 +60,10 @@ Rectangle{
|
||||
spacing: 5
|
||||
|
||||
TFpsMonitor{
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.rightMargin: 12
|
||||
Layout.topMargin: 5
|
||||
visible: FluApp.isFps
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.rightMargin: 12
|
||||
Layout.topMargin: 5
|
||||
visible: FluApp.isFps
|
||||
}
|
||||
|
||||
RowLayout{
|
||||
@ -91,6 +97,7 @@ Rectangle{
|
||||
return Window.Maximized === Window.window.visibility ? FluentIcons.FA_window_restore : FluentIcons.FA_window_maximize
|
||||
}
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
visible: resizable
|
||||
text:{
|
||||
if(Window.window == null)
|
||||
return ""
|
||||
|
@ -43,7 +43,7 @@ Rectangle {
|
||||
color : FluApp.isDark ? "#202020" : "#F3F3F3"
|
||||
|
||||
Component.onCompleted: {
|
||||
console.debug("Component.onCompleted:"+root.winId)
|
||||
|
||||
}
|
||||
|
||||
Connections{
|
||||
@ -58,11 +58,7 @@ Rectangle {
|
||||
if(maximumSize){
|
||||
helper.setMaximumSize(maximumSize)
|
||||
}
|
||||
if(maximumSize&&minimumSize){
|
||||
if(maximumSize.width === minimumSize.width && maximumSize.height === minimumSize.height){
|
||||
helper.disResizable()
|
||||
}
|
||||
}
|
||||
helper.refreshWindow()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user