Warning, /education/marble/examples/qml/explore/FloatButton.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org> 0004 // 0005 0006 import Qt 4.7 0007 0008 Rectangle { 0009 id: container 0010 0011 signal clicked 0012 property string image: "zoom-in.svg" 0013 0014 color: activePalette.button; smooth: true 0015 width: buttonImage.width; height: buttonImage.height 0016 border.width: 1; border.color: "black"; radius: 8; 0017 anchors.margins: 10; 0018 0019 gradient: Gradient { 0020 GradientStop { 0021 position: 0.0 0022 color: if (mouseArea.pressed) { activePalette.light } else { "transparent" } 0023 } 0024 GradientStop { 0025 position: 1.0; 0026 color: if (mouseArea.pressed) { activePalette.light } else { activePalette.light } 0027 } 0028 } 0029 0030 MouseArea { id: mouseArea; anchors.fill: parent; onClicked: container.clicked() } 0031 0032 Image { 0033 id: buttonImage 0034 source: container.image 0035 } 0036 }