diff --git a/example/example.qrc b/example/example.qrc index 696c79bc..f69b7c55 100644 --- a/example/example.qrc +++ b/example/example.qrc @@ -180,7 +180,6 @@ qml/window/PageWindow.qml qml/page/T_StaggeredLayout.qml qml/page/T_Clip.qml - qml/page/T_3D.qml qml/page/T_Network.qml qml/page/T_ShortcutPicker.qml qml/chart/T_BarChart.qml diff --git a/example/example_en_US.ts b/example/example_en_US.ts index 7f61aa64..cc03fbcc 100644 --- a/example/example_en_US.ts +++ b/example/example_en_US.ts @@ -515,11 +515,6 @@ - 3D - - - - Test Crash diff --git a/example/example_zh_CN.ts b/example/example_zh_CN.ts index 950a363d..ab387f56 100644 --- a/example/example_zh_CN.ts +++ b/example/example_zh_CN.ts @@ -514,12 +514,11 @@ 热加载 - 3D - 3D + 3D - + Test Crash 测试崩溃 diff --git a/example/qml/global/ItemsOriginal.qml b/example/qml/global/ItemsOriginal.qml index 522b91b5..0479b746 100644 --- a/example/qml/global/ItemsOriginal.qml +++ b/example/qml/global/ItemsOriginal.qml @@ -483,12 +483,6 @@ FluObject{ FluRouter.navigate("/hotload") } } - FluPaneItem{ - title: qsTr("3D") - menuDelegate: paneItemMenu - url: "qrc:/example/qml/page/T_3D.qml" - onTap: { navigationView.push(url) } - } FluPaneItem{ title: qsTr("Test Crash") onTapListener: function(){ diff --git a/example/qml/page/T_3D.qml b/example/qml/page/T_3D.qml deleted file mode 100644 index 2757decd..00000000 --- a/example/qml/page/T_3D.qml +++ /dev/null @@ -1,116 +0,0 @@ -import QtQuick 2.15 -import QtQuick.Layouts 1.15 -import QtQuick.Controls 2.15 -import QtQuick.Window 2.15 -import Qt3D.Core 2.15 -import Qt3D.Render 2.15 -import Qt3D.Input 2.12 -import Qt3D.Extras 2.15 -import QtQuick.Scene3D 2.15 -import Qt.labs.platform 1.1 -import FluentUI 1.0 -import "../component" - -FluContentPage{ - - id:root - title:"3D" - - Scene3D{ - id:scene_3d - anchors.fill: parent - focus: true - aspects: ["input", "logic"] - cameraAspectRatioMode: Scene3D.AutomaticAspectRatio - Entity { - Camera { - id: camera - projectionType: CameraLens.PerspectiveProjection - fieldOfView: 22.5 - aspectRatio: scene_3d.width / scene_3d.height - nearPlane: 1 - farPlane: 1000.0 - viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) - upVector: Qt.vector3d( 0.0, 1.0, 0.0 ) - position: Qt.vector3d( 0.0, 0.0, 15.0 ) - } - FirstPersonCameraController { - linearSpeed: 100 - lookSpeed: 50 - camera: camera - } - components: [ - RenderSettings{ - activeFrameGraph: ForwardRenderer{ - clearColor: Qt.rgba(0,0,0,0); - camera: camera - } - }, - InputSettings{} - ] - Mesh { - id: mesh - source: "https://zhu-zichu.gitee.io/test.obj" - } - PhongMaterial { - id: material - ambient: color_picker.current - } - Transform{ - id:transform - scale: 1.0 - translation: Qt.vector3d(0, 0, 0) - rotation: fromEulerAngles(0, 0, 0) - property real hAngle:0.0 - NumberAnimation on hAngle{ - from:0 - to:360.0 - duration: 5000 - loops: Animation.Infinite - } - matrix:{ - var m=Qt.matrix4x4(); - m.rotate(hAngle,Qt.vector3d(0,1,0)); - m.translate(Qt.vector3d(0,0,0)); - return m; - } - } - Entity { - id: entity - components: [mesh, material,transform] - } - } - } - ColumnLayout{ - RowLayout{ - spacing: 10 - Layout.topMargin: 20 - FluText{ - text:"tintColor:" - Layout.alignment: Qt.AlignVCenter - } - FluColorPicker{ - id:color_picker - current: "gray" - } - } - - FluButton{ - text:"选择obj资源" - onClicked: { - file_dialog.open() - } - } - } - - FileDialog { - id: file_dialog - nameFilters: ["Obj files (*.obj)"] - folder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation) - onAccepted: { - var fileUrl = file_dialog.currentFile - mesh.source = fileUrl - } - } - -} diff --git a/src/FluFrameless.cpp b/src/FluFrameless.cpp index 4f3ba47f..e7737804 100644 --- a/src/FluFrameless.cpp +++ b/src/FluFrameless.cpp @@ -270,8 +270,10 @@ void FluFrameless::componentComplete() { auto geometry = window()->screen()->availableGeometry(); RECT rect; SystemParametersInfo(SPI_GETWORKAREA, 0, &rect, 0); - minmaxInfo->ptMinTrackSize.x = window()->minimumWidth() * pixelRatio + offsetXY.x(); - minmaxInfo->ptMinTrackSize.y = window()->minimumHeight() * pixelRatio + offsetXY.y() + _appbar->height() * pixelRatio; + if(!_fixSize){ + minmaxInfo->ptMinTrackSize.x = window()->minimumWidth() * pixelRatio + offsetXY.x(); + minmaxInfo->ptMinTrackSize.y = window()->minimumHeight() * pixelRatio + offsetXY.y() + _appbar->height() * pixelRatio; + } minmaxInfo->ptMaxPosition.x = rect.left - offsetXY.x(); minmaxInfo->ptMaxPosition.y = rect.top - offsetXY.x(); minmaxInfo->ptMaxSize.x = qRound(geometry.width() * pixelRatio) + offsetXY.x() * 2;