| 
									
										
										
										
											2019-07-07 23:52:41 -04:00
										 |  |  | // Copyright 2019 miruka
 | 
					
						
							|  |  |  | // This file is part of harmonyqml, licensed under LGPLv3.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-17 10:54:55 -04:00
										 |  |  | import QtQuick 2.7 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | HLabel { | 
					
						
							| 
									
										
										
										
											2019-04-20 17:45:51 -04:00
										 |  |  |     id: label | 
					
						
							| 
									
										
										
										
											2019-04-17 10:54:55 -04:00
										 |  |  |     textFormat: Text.RichText | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     MouseArea { | 
					
						
							| 
									
										
										
										
											2019-04-20 17:45:51 -04:00
										 |  |  |         id: mouseArea | 
					
						
							| 
									
										
										
										
											2019-04-17 10:54:55 -04:00
										 |  |  |         anchors.fill: parent | 
					
						
							|  |  |  |         hoverEnabled: true | 
					
						
							| 
									
										
										
										
											2019-07-04 19:23:40 -04:00
										 |  |  |         propagateComposedEvents: true | 
					
						
							| 
									
										
										
										
											2019-04-17 10:54:55 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-05 01:54:29 -04:00
										 |  |  |         onPositionChanged: function (mouse) { | 
					
						
							|  |  |  |             mouse.accepted = false | 
					
						
							|  |  |  |             cursorShape = label.linkAt(mouse.x, mouse.y) ? | 
					
						
							| 
									
										
										
										
											2019-04-17 10:54:55 -04:00
										 |  |  |                           Qt.PointingHandCursor : Qt.ArrowCursor | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-05 01:54:29 -04:00
										 |  |  |         onClicked: function(mouse) { | 
					
						
							|  |  |  |             var link = label.linkAt(mouse.x, mouse.y) | 
					
						
							|  |  |  |             mouse.accepted = Boolean(link) | 
					
						
							| 
									
										
										
										
											2019-04-17 10:54:55 -04:00
										 |  |  |             if (link) { Qt.openUrlExternally(link) } | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |