Merge pull request #2606 from alicevision/fix/uiFixes

[ui] Minor UI stabilization fixes for Qt 6
This commit is contained in:
Fabien Castan 2024-11-25 23:07:29 +01:00 committed by GitHub
commit 648b0950b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 34 additions and 18 deletions

View file

@ -22,21 +22,24 @@ GroupBox {
topPadding: label.height + padding topPadding: label.height + padding
background: Item {} background: Item {}
MouseArea {
parent: paneLabel
anchors.fill: parent
onClicked: function(mouse) {
expandButton.checked = !expandButton.checked
}
}
label: Pane { label: Pane {
id: paneLabel
padding: 2
width: root.width
background: Rectangle { background: Rectangle {
id: labelBg id: labelBg
color: palette.base color: palette.base
opacity: 0.8 opacity: 0.8
MouseArea {
anchors.fill: parent
onClicked: {
expandButton.checked = !expandButton.checked
} }
}
}
padding: 2
width: root.width
RowLayout { RowLayout {
width: parent.width width: parent.width

View file

@ -120,7 +120,7 @@ Item {
iconText: MaterialIcons.loop iconText: MaterialIcons.loop
label: (root.iteration + 1) + "/" + root.loopSize + " " label: (root.iteration + 1) + "/" + root.loopSize + " "
color: palette.base labelIconColor: palette.base
ToolTip.text: "Foreach Loop" ToolTip.text: "Foreach Loop"
} }

View file

@ -239,10 +239,15 @@ Page {
} }
MaterialToolLabelButton { MaterialToolLabelButton {
Layout.topMargin: 10
Layout.bottomMargin: 10 Layout.bottomMargin: 10
Layout.fillWidth: true Layout.alignment: Qt.AlignHCenter
labelItem.horizontalAlignment: Text.AlignHCenter label: "Support AliceVision"
label: MaterialIcons.favorite + " Support AliceVision" iconText: MaterialIcons.favorite
// Slightly "extend" the clickable area for the button while preserving the centered layout
iconItem.leftPadding: 15
labelItem.rightPadding: 15
onClicked: Qt.openUrlExternally("https://alicevision.org/association/#donate") onClicked: Qt.openUrlExternally("https://alicevision.org/association/#donate")
} }
@ -347,6 +352,7 @@ Page {
ToolTip.visible: hovered ToolTip.visible: hovered
ToolTip.text: modelData["path"] ? modelData["path"] : "Open browser to select a project file" ToolTip.text: modelData["path"] ? modelData["path"] : "Open browser to select a project file"
font.family: MaterialIcons.fontFamily
font.pointSize: 24 font.pointSize: 24
text: modelData["path"] ? (modelData["thumbnail"] ? "" : MaterialIcons.description) : MaterialIcons.folder_open text: modelData["path"] ? (modelData["thumbnail"] ? "" : MaterialIcons.description) : MaterialIcons.folder_open

View file

@ -12,7 +12,7 @@ Item {
property alias iconText: iconItem.text property alias iconText: iconItem.text
property alias iconSize: iconItem.font.pointSize property alias iconSize: iconItem.font.pointSize
property alias label: labelItem.text property alias label: labelItem.text
property var color: palette.text property var labelIconColor: palette.text
implicitWidth: childrenRect.width implicitWidth: childrenRect.width
implicitHeight: childrenRect.height implicitHeight: childrenRect.height
anchors.rightMargin: 5 anchors.rightMargin: 5
@ -24,12 +24,12 @@ Item {
font.pointSize: 13 font.pointSize: 13
padding: 0 padding: 0
text: "" text: ""
color: color color: labelIconColor
} }
Label { Label {
id: labelItem id: labelItem
text: "" text: ""
color: color color: labelIconColor
} }
} }

View file

@ -5,6 +5,8 @@ import QtQuick.Layouts
import AliceVision 1.0 as AliceVision import AliceVision 1.0 as AliceVision
import Charts 1.0 import Charts 1.0
import Controls 1.0
import Utils 1.0
FloatingPane { FloatingPane {
id: root id: root

View file

@ -5,6 +5,8 @@ import QtQuick.Layouts
import AliceVision 1.0 as AliceVision import AliceVision 1.0 as AliceVision
import Charts 1.0 import Charts 1.0
import Controls 1.0
import Utils 1.0
FloatingPane { FloatingPane {

View file

@ -1,6 +1,5 @@
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Controls.Material 2.12
import QtQuick.Layouts import QtQuick.Layouts
import Qt3D.Core 2.6 import Qt3D.Core 2.6
import Qt3D.Render 2.6 import Qt3D.Render 2.6
@ -229,6 +228,7 @@ FloatingPane {
Label { Label {
text: resectionIdSlider.value + "/" + Viewer3DSettings.resectionIdCount text: resectionIdSlider.value + "/" + Viewer3DSettings.resectionIdCount
color: palette.text
visible: Viewer3DSettings.displayResectionIds visible: Viewer3DSettings.displayResectionIds
} }
} }
@ -252,6 +252,7 @@ FloatingPane {
return 0 return 0
} }
labelIconColor: palette.text
ToolTip.text: "Number Of Cameras In Current Resection Group" ToolTip.text: "Number Of Cameras In Current Resection Group"
visible: Viewer3DSettings.displayResectionIds visible: Viewer3DSettings.displayResectionIds
} }
@ -269,6 +270,7 @@ FloatingPane {
return currentCameras return currentCameras
} }
labelIconColor: palette.text
ToolTip.text: "Number Of Cumulated Cameras" ToolTip.text: "Number Of Cumulated Cameras"
visible: Viewer3DSettings.displayResectionIds visible: Viewer3DSettings.displayResectionIds
} }
@ -285,6 +287,7 @@ FloatingPane {
return totalCameras return totalCameras
} }
labelIconColor: palette.text
ToolTip.text: "Total Number Of Cameras" ToolTip.text: "Total Number Of Cameras"
visible: Viewer3DSettings.displayResectionIds visible: Viewer3DSettings.displayResectionIds
} }

View file

@ -258,7 +258,7 @@ Item {
Inspector3D { Inspector3D {
id: inspector3d id: inspector3d
SplitView.preferredWidth: 220 SplitView.preferredWidth: 220
SplitView.minimumWidth: 10 SplitView.minimumWidth: 100
mediaLibrary: c_viewer3D.library mediaLibrary: c_viewer3D.library
camera: c_viewer3D.mainCamera camera: c_viewer3D.mainCamera