Skip to content

Commit

Permalink
[ui] Replacement of Controls1 SplitView to Controls2 SplitView
Browse files Browse the repository at this point in the history
  • Loading branch information
Just-Kiel committed Sep 17, 2024
1 parent 34e3847 commit ccd88c4
Show file tree
Hide file tree
Showing 8 changed files with 187 additions and 193 deletions.
343 changes: 170 additions & 173 deletions meshroom/ui/qml/Application.qml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion meshroom/ui/qml/GraphEditor/ChunksListView.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls 1.4 as Controls1 // SplitView
import QtQuick.Layouts 1.11
import MaterialIcons 2.2
import Controls 1.0
Expand Down
2 changes: 1 addition & 1 deletion meshroom/ui/qml/GraphEditor/NodeChunks.qml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ListView {
}

orientation: ListView.Horizontal
implicitWidth: 100

// If we have enough space, add one pixel margin between chunks
spacing: modelIsBig ? 0 : 1
delegate: Rectangle {
Expand Down
3 changes: 1 addition & 2 deletions meshroom/ui/qml/GraphEditor/NodeEditor.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls 1.4 as Controls1 // SplitView
import QtQuick.Layouts 1.11
import MaterialIcons 2.2
import Controls 1.0
Expand Down Expand Up @@ -254,7 +253,7 @@ Panel {
Component {
id: editor_component

Controls1.SplitView {
SplitView {
anchors.fill: parent

// The list of chunks
Expand Down
1 change: 0 additions & 1 deletion meshroom/ui/qml/GraphEditor/NodeStatistics.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls 1.4 as Controls1 // SplitView
import QtQuick.Layouts 1.11
import MaterialIcons 2.2
import Controls 1.0
Expand Down
7 changes: 3 additions & 4 deletions meshroom/ui/qml/Homepage.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls 1.4 as Controls1 // For SplitView
import QtQuick.Layouts 1.11
import Utils 1.0
import MaterialIcons 2.2
Expand All @@ -16,7 +15,7 @@ Page {
}
}

Controls1.SplitView {
SplitView {
id: splitView
anchors.fill: parent

Expand All @@ -25,8 +24,8 @@ Page {
id: leftColumn
height: parent.height

Layout.minimumWidth: 200
Layout.maximumWidth: 300
SplitView.minimumWidth: 200
SplitView.maximumWidth: 300

AnimatedImage {
id: logo
Expand Down
1 change: 0 additions & 1 deletion meshroom/ui/qml/Viewer3D/Viewer3D.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls 1.4 as Controls1
import QtQuick.Layouts 1.11
import QtQml.Models 2.15
import QtQuick.Scene3D 2.15
Expand Down
22 changes: 12 additions & 10 deletions meshroom/ui/qml/WorkspaceView.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Controls 1.4 as Controls1 // For SplitView
import QtQuick.Layouts 1.11
import Qt.labs.platform 1.0 as Platform
import ImageGallery 1.0
Expand All @@ -26,11 +25,9 @@ Item {
readonly property Viewer2D viewer2D: viewer2D
readonly property alias imageGallery: imageGallery

implicitWidth: 300
implicitHeight: 400
// Use settings instead of visible property as property changes are not propagated
visible: settingsUILayout.showImageGallery || settingsUILayout.showImageViewer || settingsUILayout.showViewer3D || settingsUILayout.showLiveReconstruction


// Load a 3D media file in the 3D viewer
function load3DMedia(filepath, label = undefined) {
if (panel3dViewerLoader.active) {
Expand Down Expand Up @@ -62,10 +59,12 @@ Item {

SystemPalette { id: activePalette }

Controls1.SplitView {
SplitView {
id: mainSplitView
anchors.fill: parent

Controls1.SplitView {
SplitView {
id: leftSplitView
visible: settingsUILayout.showImageGallery || settingsUILayout.showLiveReconstruction
orientation: Qt.Vertical
Layout.fillHeight: true
Expand Down Expand Up @@ -96,6 +95,7 @@ Item {
}
}
LiveSfmView {
id: liveSfmView
visible: settingsUILayout.showLiveReconstruction
reconstruction: root.reconstruction
Layout.fillWidth: true
Expand All @@ -104,6 +104,7 @@ Item {
}

Panel {
id: imageViewer
title: "Image Viewer"
visible: settingsUILayout.showImageViewer
implicitWidth: Math.round(parent.width * 0.35)
Expand Down Expand Up @@ -190,6 +191,7 @@ Item {
}

Item {
id: viewer3DContainer
visible: settingsUILayout.showViewer3D
Layout.minimumWidth: 20
Layout.minimumHeight: 80
Expand All @@ -213,15 +215,15 @@ Item {

property alias viewer3D: c_viewer3D

Controls1.SplitView {
SplitView {
id: c_viewer3DSplitView
anchors.fill: parent
Viewer3D {
id: c_viewer3D

Layout.fillWidth: true
Layout.fillHeight: true
Layout.minimumWidth: 20
SplitView.fillWidth: true
SplitView.fillHeight: true
SplitView.minimumWidth: 20

DropArea {
anchors.fill: parent
Expand Down

0 comments on commit ccd88c4

Please sign in to comment.