mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
Simplify dive list items
- Replace the custom text items with the Components' label - Remove now unneeded properties The goal is to use less different font sizes, as to give the listview a calmer and more uniform look. Signed-off-by: Sebastian Kügler <sebas@kde.org>
This commit is contained in:
parent
95c5b35583
commit
78d5325dda
3 changed files with 24 additions and 35 deletions
|
@ -89,7 +89,7 @@ MobileComponents.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Label {
|
MobileComponents.Label {
|
||||||
text: "Location:"
|
text: "Location:"
|
||||||
}
|
}
|
||||||
TextField {
|
TextField {
|
||||||
|
@ -97,7 +97,7 @@ MobileComponents.Page {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
MobileComponents.Label {
|
||||||
text: "Air Temp:"
|
text: "Air Temp:"
|
||||||
}
|
}
|
||||||
TextField {
|
TextField {
|
||||||
|
@ -106,7 +106,7 @@ MobileComponents.Page {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
MobileComponents.Label {
|
||||||
text: "Water Temp:"
|
text: "Water Temp:"
|
||||||
}
|
}
|
||||||
TextField {
|
TextField {
|
||||||
|
@ -115,7 +115,7 @@ MobileComponents.Page {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
MobileComponents.Label {
|
||||||
text: "Suit:"
|
text: "Suit:"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ MobileComponents.Page {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
MobileComponents.Label {
|
||||||
text: "Buddy:"
|
text: "Buddy:"
|
||||||
}
|
}
|
||||||
TextField {
|
TextField {
|
||||||
|
@ -134,7 +134,7 @@ MobileComponents.Page {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
MobileComponents.Label {
|
||||||
text: "Dive Master:"
|
text: "Dive Master:"
|
||||||
}
|
}
|
||||||
TextField {
|
TextField {
|
||||||
|
@ -143,7 +143,7 @@ MobileComponents.Page {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
MobileComponents.Label {
|
||||||
text: "Notes:"
|
text: "Notes:"
|
||||||
}
|
}
|
||||||
TextEdit{
|
TextEdit{
|
||||||
|
|
|
@ -39,22 +39,15 @@ MobileComponents.Page {
|
||||||
stackView.push(detailsWindow)
|
stackView.push(detailsWindow)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Layout of the page: (mini profile, dive no, date at the top
|
|
||||||
//And other details at the bottom.
|
|
||||||
Item {
|
Item {
|
||||||
x: MobileComponents.Units.smallSpacing
|
x: -1 * MobileComponents.Units.smallSpacing
|
||||||
width: parent.width - MobileComponents.Units.smallSpacing * 2
|
width: parent.width - MobileComponents.Units.smallSpacing * 2
|
||||||
height: childrenRect.height + MobileComponents.Units.smallSpacing * 2
|
height: childrenRect.height - MobileComponents.Units.smallSpacing
|
||||||
//spacing: MobileComponents.Units.smallSpacing / 2
|
|
||||||
anchors.margins: MobileComponents.Units.smallSpacing
|
|
||||||
|
|
||||||
Text {
|
MobileComponents.Label {
|
||||||
id: locationText
|
id: locationText
|
||||||
text: location
|
text: location
|
||||||
color: MobileComponents.Theme.textColor
|
font.weight: Font.Light
|
||||||
//font.pointSize: Math.round(MobileComponents.Units.fontMetrics.pointSize * 1.2) // why this doesn't work is a mystery to me, so ...
|
|
||||||
scale: 1.2 // Let's see how this works, otherwise, we'll need the default point size somewhere
|
|
||||||
transformOrigin: Item.TopLeft
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
maximumLineCount: 1 // needed for elide to work at all
|
maximumLineCount: 1 // needed for elide to work at all
|
||||||
anchors {
|
anchors {
|
||||||
|
@ -63,16 +56,14 @@ MobileComponents.Page {
|
||||||
right: dateLabel.left
|
right: dateLabel.left
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text {
|
MobileComponents.Label {
|
||||||
id: dateLabel
|
id: dateLabel
|
||||||
text: date
|
text: date
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
color: MobileComponents.Theme.textColor
|
|
||||||
font.pointSize: subsurfaceTheme.smallPointSize
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
top: parent.top
|
top: parent.top
|
||||||
bottomMargin: MobileComponents.Units.smallSpacing / 2
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Row {
|
Row {
|
||||||
|
@ -82,36 +73,34 @@ MobileComponents.Page {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: numberText.bottom
|
bottom: numberText.bottom
|
||||||
}
|
}
|
||||||
Text {
|
MobileComponents.Label {
|
||||||
text: 'Depth: '
|
text: 'Depth: '
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
color: MobileComponents.Theme.textColor
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
Text {
|
MobileComponents.Label {
|
||||||
text: depth
|
text: depth
|
||||||
width: Math.max(MobileComponents.Units.gridUnit * 3, paintedWidth) // helps vertical alignment throughout listview
|
width: Math.max(MobileComponents.Units.gridUnit * 3, paintedWidth) // helps vertical alignment throughout listview
|
||||||
color: MobileComponents.Theme.textColor
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
Text {
|
MobileComponents.Label {
|
||||||
text: 'Duration: '
|
text: 'Duration: '
|
||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
color: MobileComponents.Theme.textColor
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
Text {
|
MobileComponents.Label {
|
||||||
text: duration
|
text: duration
|
||||||
color: MobileComponents.Theme.textColor
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text {
|
MobileComponents.Label {
|
||||||
id: numberText
|
id: numberText
|
||||||
text: "#" + diveNumber
|
text: "#" + diveNumber
|
||||||
color: MobileComponents.Theme.textColor
|
color: MobileComponents.Theme.textColor
|
||||||
scale: 1.2
|
font.pointSize: subsurfaceTheme.smallPointSize
|
||||||
transformOrigin: Item.BottomRight
|
opacity: 0.6
|
||||||
opacity: 0.4
|
|
||||||
anchors {
|
anchors {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
topMargin: MobileComponents.Units.smallSpacing
|
|
||||||
top: locationText.bottom
|
top: locationText.bottom
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ MobileComponents.ApplicationWindow {
|
||||||
QtObject {
|
QtObject {
|
||||||
id: subsurfaceTheme
|
id: subsurfaceTheme
|
||||||
property int titlePointSize: Math.round(fontMetrics.font.pointSize * 1.5)
|
property int titlePointSize: Math.round(fontMetrics.font.pointSize * 1.5)
|
||||||
property int smallPointSize: Math.round(fontMetrics.font.pointSize * 0.7)
|
property int smallPointSize: Math.round(fontMetrics.font.pointSize * 0.8)
|
||||||
property color accentColor: "#2d5b9a"
|
property color accentColor: "#2d5b9a"
|
||||||
property color accentTextColor: "#ececec"
|
property color accentTextColor: "#ececec"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue