| 
									
										
										
										
											2017-07-24 19:54:34 +02:00
										 |  |  | // SPDX-License-Identifier: GPL-2.0
 | 
					
						
							| 
									
										
										
										
											2017-10-29 08:44:06 +01:00
										 |  |  | import QtQuick 2.6 | 
					
						
							| 
									
										
										
										
											2017-07-24 19:54:34 +02:00
										 |  |  | import QtQuick.Controls 2.2 | 
					
						
							| 
									
										
										
										
											2018-09-27 22:09:26 +02:00
										 |  |  | import org.kde.kirigami 2.4 as Kirigami | 
					
						
							| 
									
										
										
										
											2017-07-24 19:54:34 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | Switch { | 
					
						
							|  |  |  | 	id: root | 
					
						
							|  |  |  | 	indicator: Rectangle { | 
					
						
							| 
									
										
										
										
											2018-10-21 16:55:41 +02:00
										 |  |  | 		implicitWidth: 36 * PrefDisplay.mobile_scale | 
					
						
							|  |  |  | 		implicitHeight: 12 * PrefDisplay.mobile_scale | 
					
						
							| 
									
										
										
										
											2017-07-24 19:54:34 +02:00
										 |  |  | 		x: root.leftPadding | 
					
						
							|  |  |  | 		y: parent.height / 2 - height / 2 | 
					
						
							|  |  |  | 		radius: height / 2 | 
					
						
							|  |  |  | 		color: root.checked ? | 
					
						
							|  |  |  | 			subsurfaceTheme.lightPrimaryColor : subsurfaceTheme.backgroundColor | 
					
						
							|  |  |  | 		border.color: subsurfaceTheme.darkerPrimaryColor | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 		Rectangle { | 
					
						
							|  |  |  | 			x: root.checked ? parent.width - width : 0 | 
					
						
							|  |  |  | 			y: parent.height / 2 - height / 2 | 
					
						
							| 
									
										
										
										
											2018-10-21 16:55:41 +02:00
										 |  |  | 			width: 20 * PrefDisplay.mobile_scale | 
					
						
							|  |  |  | 			height: 20 * PrefDisplay.mobile_scale | 
					
						
							| 
									
										
										
										
											2017-07-24 19:54:34 +02:00
										 |  |  | 			radius: height / 2 | 
					
						
							|  |  |  | 			color: root.down || root.checked ? | 
					
						
							|  |  |  | 				subsurfaceTheme.primaryColor : subsurfaceTheme.lightPrimaryColor | 
					
						
							|  |  |  | 			border.color: subsurfaceTheme.darkerPrimaryColor | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } |