aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2013-10-15 22:40:23 +0000
committernils <nils@34ebc366-c3a9-4b3c-9f84-69acf7962910>2013-10-15 22:40:23 +0000
commita3ab516186b0a3fbf242df24e516ec74fa2784a4 (patch)
tree7bdcf06c14a17eb78d54f93ccac67f828033143d
parentremoved key management and old key details dialog (diff)
downloadgpg4usb-a3ab516186b0a3fbf242df24e516ec74fa2784a4.tar.gz
gpg4usb-a3ab516186b0a3fbf242df24e516ec74fa2784a4.zip
beautified keydetail widget
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@1063 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r--gpg4usb.pro3
-rw-r--r--gpg4usb.qrc1
-rw-r--r--qml/Button.qml21
-rw-r--r--qml/keydetails.qml8
4 files changed, 27 insertions, 6 deletions
diff --git a/gpg4usb.pro b/gpg4usb.pro
index 3f29f7b..bba4bad 100644
--- a/gpg4usb.pro
+++ b/gpg4usb.pro
@@ -100,6 +100,7 @@ OTHER_FILES += \
qml/keydetails.qml \
qml/Button.qml \
qml/TextField.qml \
- qml/KeyInfoRow.qml
+ qml/KeyInfoRow.qml \
+ qml/ImageButton.qml
diff --git a/gpg4usb.qrc b/gpg4usb.qrc
index d1a4bbd..87d7448 100644
--- a/gpg4usb.qrc
+++ b/gpg4usb.qrc
@@ -54,5 +54,6 @@
<file>qml/Button.qml</file>
<file>qml/TextField.qml</file>
<file>qml/KeyInfoRow.qml</file>
+ <file>qml/ImageButton.qml</file>
</qresource>
</RCC>
diff --git a/qml/Button.qml b/qml/Button.qml
index 3c02dea..22469d1 100644
--- a/qml/Button.qml
+++ b/qml/Button.qml
@@ -4,9 +4,11 @@ import QtQuick 1.0
id: container
property variant text
+ property variant image
signal clicked
- height: text.height + 10; width: text.width + 20
+ height: buttonImage.height + 10;
+ width: text.width + buttonImage.width + 15
border.width: 1
radius: 4
smooth: true
@@ -30,11 +32,26 @@ import QtQuick 1.0
onClicked: container.clicked()
}
+ Image {
+ id: buttonImage
+ y: 5
+ x: 5
+ source: container.image
+ height: 25
+ width: 25
+ //anchors.horizontalCenter: parent.horizontalCenter
+ //anchors.fill: parent
+ }
+
Text {
id: text
- anchors.centerIn:parent
+ x: buttonImage.width +10
+ y: buttonImage.y
+ //anchors.centerIn:parent
font.pointSize: 10
text: parent.text
+ //anchors.verticalCenterOffset: 20
+ //anchors.horizontalCenterOffset: 59
color: activePalette.buttonText
}
}
diff --git a/qml/keydetails.qml b/qml/keydetails.qml
index 1a1517f..35bc67b 100644
--- a/qml/keydetails.qml
+++ b/qml/keydetails.qml
@@ -199,9 +199,10 @@ Rectangle {
Button {
id: exportPrivateKeyButton
- x: 316
+ x: 367
y: 392
text: qsTr("Export private key")
+ image: "qrc:/export_key_to_file.png"
onClicked: {
keydetails.exportPrivateKeyClicked();
}
@@ -210,9 +211,10 @@ Rectangle {
Button {
id: copyFingerprintButton
- x: 401
+ x: fingerprint.x + fingerprint.width + 10
y: 341
- text: qsTr("copy")
+ //text: qsTr("copy")
+ image: "qrc:/button_copy.png"
onClicked: {
fingerprint.selectAll();
fingerprint.copy();