Warning, /education/marble/examples/qml/cloud-sync/Button.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 QtQuick 1.0 0007 0008 Rectangle { 0009 id: container 0010 0011 property alias label: buttonLabel.text 0012 property alias color: buttonLabel.color 0013 signal clicked 0014 0015 width: buttonLabel.width + 20; 0016 height: buttonLabel.height + 6 0017 smooth: true 0018 radius: 3 0019 border { 0020 width: 1 0021 color: "#aaaaaa" 0022 } 0023 0024 gradient: Gradient { 0025 GradientStop { 0026 position: 0.0 0027 color: mouseArea.pressed ? "#cccccc" : "#ffffff" 0028 } 0029 GradientStop { 0030 position: 1.0; 0031 color: "#cccccc" 0032 } 0033 } 0034 0035 MouseArea { 0036 id: mouseArea; 0037 anchors.fill: parent; 0038 onClicked: container.clicked() 0039 } 0040 0041 Text { 0042 id: buttonLabel; 0043 text: container.label; 0044 anchors.centerIn: container 0045 } 0046 }