Skip to content

Commit

Permalink
QML cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Aug 12, 2024
1 parent 8b6200f commit 21d95b6
Show file tree
Hide file tree
Showing 28 changed files with 246 additions and 56 deletions.
1 change: 0 additions & 1 deletion qml/Application.qml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ ApplicationWindow {

Item {
id: appContent

anchors.top: parent.top
anchors.left: appSidebar.right
anchors.right: parent.right
Expand Down
31 changes: 29 additions & 2 deletions qml/MediaDetailDetails.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Item {
Text {
height: 32
text: shot.camera
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentBig
Expand All @@ -55,12 +56,14 @@ Item {
Text {
width: infosDetails.legendWidth
text: qsTr("Protune")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentSmall
}
Text {
text: shot.protune
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContent
}
Expand All @@ -70,12 +73,14 @@ Item {
Text {
width: infosDetails.legendWidth
text: qsTr("Cam RAW")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentSmall
}
Text {
text: shot.cam_raw
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContent
}
Expand All @@ -85,12 +90,14 @@ Item {
Text {
width: infosDetails.legendWidth
text: qsTr("Broadcast range")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentSmall
}
Text {
text: shot.broadcast_range
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContent
}
Expand All @@ -100,12 +107,14 @@ Item {
Text {
width: infosDetails.legendWidth
text: qsTr("Lens type")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentSmall
}
Text {
text: shot.lens_type
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContent
}
Expand All @@ -115,12 +124,14 @@ Item {
Text {
width: infosDetails.legendWidth
text: qsTr("video_mode_fov")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentSmall
}
Text {
text: shot.video_mode_fov
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContent
}
Expand All @@ -130,12 +141,14 @@ Item {
Text {
width: infosDetails.legendWidth
text: qsTr("Low light")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentSmall
}
Text {
text: shot.lowlight
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContent
}
Expand All @@ -145,12 +158,14 @@ Item {
Text {
width: infosDetails.legendWidth
text: qsTr("Superview")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentSmall
}
Text {
text: shot.superview
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContent
}
Expand All @@ -160,12 +175,14 @@ Item {
Text {
width: infosDetails.legendWidth
text: qsTr("Sharpening")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentSmall
}
Text {
text: shot.sharpening
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContent
}
Expand All @@ -175,12 +192,14 @@ Item {
Text {
width: infosDetails.legendWidth
text: qsTr("Media type")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentSmall
}
Text {
text: shot.media_type_str
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContent
}
Expand All @@ -192,12 +211,14 @@ Item {
Text {
width: infosDetails.legendWidth
text: qsTr("EIS")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContentSmall
}
Text {
text: shot.eis
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContent
}
Expand Down Expand Up @@ -252,6 +273,7 @@ Item {
anchors.top: parent.top

text: qsTr("Folder:")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContent
Expand All @@ -265,6 +287,7 @@ Item {
anchors.bottom: parent.bottom

text: shot.folder
textFormat: Text.PlainText
color: Theme.colorText
elide: Text.ElideLeft
font.pixelSize: Theme.fontSizeContent
Expand All @@ -290,6 +313,7 @@ Item {
anchors.rightMargin: Theme.componentMargin

text: (shot.fileCount > 1) ? qsTr("Files:") : qsTr("File:")
textFormat: Text.PlainText
color: Theme.colorText
font.bold: true
font.pixelSize: Theme.fontSizeContent
Expand All @@ -309,9 +333,8 @@ Item {
model: shot.filesShot
delegate: Item {
id: dlv
width: ListView.view.width
height: 32
anchors.left: parent.left
anchors.right: parent.right

////////

Expand Down Expand Up @@ -346,6 +369,7 @@ Item {
Text {
anchors.verticalCenter: parent.verticalCenter
text: modelData.width + "x" + modelData.height
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
}
Expand All @@ -355,6 +379,7 @@ Item {
id: fileSize
anchors.verticalCenter: parent.verticalCenter
text: UtilsString.bytesToString(modelData.size)
textFormat: Text.PlainText
color: Theme.colorSubText
font.pixelSize: Theme.fontSizeContentSmall
}
Expand All @@ -366,13 +391,15 @@ Item {
Text {
id: filePath
text: modelData.directory
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
visible: ((filePath.contentWidth + fileName.contentWidth) < (dlv.width - 48 - fileSize.width - rowRight.width))
}
Text {
id: fileName
text: modelData.name + "." + modelData.ext
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
}
Expand Down
19 changes: 19 additions & 0 deletions qml/MediaDetailOverview.qml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter

text: shot.location
textFormat: Text.PlainText
wrapMode: Text.WordWrap
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
Expand All @@ -257,6 +258,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter

text: shot.date.toUTCString()
textFormat: Text.PlainText
wrapMode: Text.WordWrap
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
Expand All @@ -280,6 +282,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter

color: Theme.colorText
textFormat: Text.PlainText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
}
Expand All @@ -302,6 +305,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter

text: shot.camera
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -324,6 +328,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter

text: UtilsString.bytesToString_short(shot.datasize)
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -345,6 +350,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -371,6 +377,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter

text: shot.width + "x" + shot.height + " (" + UtilsMedia.varToString(shot.width, shot.height) + ")"
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -393,6 +400,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter

text: shot.widthVisible + "x" + shot.heightVisible + " (" + UtilsMedia.varToString(shot.widthVisible, shot.heightVisible) + ") [rotated]"
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -416,6 +424,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter

text: UtilsMedia.orientationQtToString(shot.transformation)
textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand Down Expand Up @@ -446,6 +455,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -467,6 +477,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -488,6 +499,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -509,6 +521,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -530,6 +543,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand Down Expand Up @@ -563,6 +577,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -584,6 +599,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -605,6 +621,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -626,6 +643,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand All @@ -647,6 +665,7 @@ Item {
anchors.leftMargin: Theme.componentMargin
anchors.verticalCenter: parent.verticalCenter

textFormat: Text.PlainText
color: Theme.colorText
font.pixelSize: Theme.fontSizeContentSmall
verticalAlignment: Text.AlignVCenter
Expand Down
Loading

0 comments on commit 21d95b6

Please sign in to comment.