2017-04-27 20:30:36 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								// SPDX-License-Identifier: GPL-2.0
							 | 
						
					
						
							
								
									
										
										
										
											2017-10-29 08:44:06 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import QtQuick 2.6
							 | 
						
					
						
							
								
									
										
										
										
											2015-08-19 10:17:52 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import QtQuick.Window 2.2
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import QtQuick.Dialogs 1.2
							 | 
						
					
						
							
								
									
										
										
										
											2017-10-30 11:26:47 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import QtQuick.Layouts 1.2
							 | 
						
					
						
							
								
									
										
										
										
											2015-08-19 10:17:52 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import QtQuick.Window 2.2
							 | 
						
					
						
							
								
									
										
										
										
											2017-10-29 13:44:22 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import QtQuick.Controls 2.2
							 | 
						
					
						
							
								
									
										
										
										
											2015-08-19 10:17:52 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import org.subsurfacedivelog.mobile 1.0
							 | 
						
					
						
							
								
									
										
										
											
												QML UI: Kirigami to 2.2
When first tested this commit, especially the dive list was looking
terrible. However, after including newer SHA's from libkirigami, and
correcting lots of spacing/margin issue, a retest of this commit shows
no strange artifact any more, and the amount of warnings in the log
output is reduced significantly. So now, it appears save to
upgrade.
Notice that main.qml still uses Kirigami 2.0. and is not updated in
this commit. With version 2.2, there is a new way of theming, that
is not (yet) compatible with our current code. Blindly upgrading to
2.2 leads to a almost black dive list, wrong button colors, and
runtime errors in the log, due to the fact the direct setting from
QML Kirigami's Theme colors is not allowed any more.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
											
										 
										
											2017-10-14 21:13:01 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								import org.kde.kirigami 2.2 as Kirigami
							 | 
						
					
						
							
								
									
										
										
										
											2015-08-19 10:17:52 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2016-03-08 21:26:54 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								Kirigami.ScrollablePage {
							 | 
						
					
						
							
								
									
										
										
										
											2015-08-19 10:17:52 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									id: logWindow
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-23 10:02:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									width: subsurfaceTheme.columnWidth
							 | 
						
					
						
							
								
									
										
										
										
											2015-08-20 11:44:01 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									objectName: "Log"
							 | 
						
					
						
							
								
									
										
										
										
											2016-05-03 21:24:00 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									title: qsTr("Application Log")
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-16 11:17:20 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									background: Rectangle { color: subsurfaceTheme.backgroundColor }
							 | 
						
					
						
							
								
									
										
										
										
											2016-01-06 04:44:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-16 02:02:00 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									ListView {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										anchors.fill: parent
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										model: logModel
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										currentIndex: -1
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										boundsBehavior: Flickable.StopAtBounds
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										maximumFlickVelocity: parent.height * 5
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										cacheBuffer: Math.max(5000, parent.height * 5)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										focus: true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										clip: true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										delegate : Text {
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-17 14:06:06 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											width: logWindow.width
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-16 02:02:00 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											wrapMode: Text.WrapAtWordBoundaryOrAnywhere
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-21 15:47:29 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											color: Kirigami.Theme.textColor
							 | 
						
					
						
							
								
									
										
										
										
											2017-06-16 02:02:00 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											text : message
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-11 19:20:04 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											font.pointSize: subsurfaceTheme.smallPointSize
							 | 
						
					
						
							
								
									
										
										
										
											2018-02-23 10:02:15 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											leftPadding: Kirigami.Units.gridUnit / 2
							 | 
						
					
						
							
								
									
										
										
										
											2015-08-19 10:17:52 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |