mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
QML UI, cleanup: do not use iconSizes for unrelated sizing
A very unimportant change, but found when looking through the code for places where size of icons where used. The one changed here has nothing to do with icon related placement of a string, so its replaced by a way more logical placement of the affected string. Simply center the "no dives in the dive list" for an empty logbook on the screen, instead of at some random place in the upper left corner. Like I said: very unimportant, but it just looks nicer in the UI. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
parent
0422cd3662
commit
bce952615c
1 changed files with 4 additions and 8 deletions
|
@ -372,14 +372,10 @@ Kirigami.ScrollablePage {
|
|||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
// make sure this gets pushed far enough down so that it's not obscured by the page title
|
||||
// it would be nicer to use Controls.Label, but due to a QML bug that isn't possible with a
|
||||
// weird "component versioning" error
|
||||
// using this property means that we require Qt 5.6 / QtQuick2.6
|
||||
topPadding: Kirigami.Units.iconSizes.large
|
||||
leftPadding: Kirigami.Units.iconSizes.large
|
||||
|
||||
Controls.Label {
|
||||
anchors.fill: parent
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
text: qsTr("No dives in dive list")
|
||||
visible: diveListView.visible && diveListView.count === 0
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue