aboutsummaryrefslogtreecommitdiff
path: root/components/StandardButton.qml
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-04-25 13:05:54 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-04-25 13:05:54 -0500
commitfb4dfd0ea8a09999a7433e4d0d9ad1aa5009821d (patch)
treecbbe7fc3e3950354f7a4dcb925b6e1e9dc62efd8 /components/StandardButton.qml
parent358e1d23facbd10fefbb2bf04c45b98f0c728ad0 (diff)
parent42f7afaefddbf5a7929ddf88dbe7b27e7f40a669 (diff)
downloadmonzero-gui-fb4dfd0ea8a09999a7433e4d0d9ad1aa5009821d.tar.gz
monzero-gui-fb4dfd0ea8a09999a7433e4d0d9ad1aa5009821d.tar.xz
monzero-gui-fb4dfd0ea8a09999a7433e4d0d9ad1aa5009821d.zip
Merge pull request #2060
42f7afa White theme (xmrdsc)
Diffstat (limited to 'components/StandardButton.qml')
-rw-r--r--components/StandardButton.qml14
1 files changed, 9 insertions, 5 deletions
diff --git a/components/StandardButton.qml b/components/StandardButton.qml
index e9e9a92a..05ee16a0 100644
--- a/components/StandardButton.qml
+++ b/components/StandardButton.qml
@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import QtQuick 2.0
+import QtQuick 2.9
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -50,8 +50,7 @@ Item {
implicitHeight: height
implicitWidth: width
- function doClick() {
- // Android workaround
+ function doClick(){
releaseFocus();
clicked();
}
@@ -64,6 +63,7 @@ Item {
state: button.enabled ? "active" : "disabled"
Component.onCompleted: state = state
+
states: [
State {
name: "hover"
@@ -90,7 +90,9 @@ Item {
}
}
]
+
transitions: Transition {
+ enabled: appWindow.themeTransition
ColorAnimation { duration: 100 }
}
}
@@ -101,15 +103,16 @@ Item {
spacing: 11 * scaleRatio
anchors.centerIn: parent
- Text {
+ MoneroComponents.TextPlain {
id: label
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: button.fontSize
color: !buttonArea.pressed ? button.textColor : "transparent"
visible: text !== ""
+ themeTransition: false
- Text {
+ MoneroComponents.TextPlain {
anchors.centerIn: parent
color: button.textColor
font.bold: label.font.bold
@@ -117,6 +120,7 @@ Item {
font.pixelSize: label.font.pixelSize - 1
text: label.text
opacity: buttonArea.pressed ? 1 : 0
+ themeTransition: false
}
}