From 62009c647e4b30cb797e011678d11b99d0694234 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 25 Mar 2022 11:45:49 +0100 Subject: [PATCH] add buttons in address drawers also copies two kivy icons to gui/icons --- electrum/gui/icons/globe.png | Bin 0 -> 5938 bytes electrum/gui/icons/mail_icon.png | Bin 0 -> 4548 bytes electrum/gui/qml/components/Addresses.qml | 82 ++++++++++++++++++---- 3 files changed, 69 insertions(+), 13 deletions(-) create mode 100644 electrum/gui/icons/globe.png create mode 100644 electrum/gui/icons/mail_icon.png diff --git a/electrum/gui/icons/globe.png b/electrum/gui/icons/globe.png new file mode 100644 index 0000000000000000000000000000000000000000..d56382d0c7a70f04c09eee651e3372eaa16d9d48 GIT binary patch literal 5938 zcmV-27tQF2P)WFU8GbZ8()Nlj2>E@cM* z02YQxL_t(|+U;Cja~#)kJ>7Q(SP&oxfCRzir$|te`5}q=q$FDwMI}x-RdJkDRFy}U zU-Fys;&PsnD(5BTiob2qwoJyhWSb&INt8&)q(l$|36KCtEOuwQ^RVZF7sCNaiHdBc zyj5EO7Q3@EeY;PeKHYc3-SL;l>JR;k3D$mOf1*X{1270+J%9lK!(~|x0LVfJT9#!Q zLbwIs27sFY=K1>qfDVAq%^X17NF& zYz8n)gE%jEiK}n?S@QQ7hJnWle8xxMdly9Hnwd?i>UjWf0XW5Q^gl-f34omd{u;nO zci#hGSVV%mTXK;%+#NL%o+6{ZC>b0k99i*UfC7h-~5N z8*##Dg!8I;48S`fg!v>Bd9upY)t*VdW0v0|Jm-#xlmH5M7gfz^tPv4;!pyd+>NtSo z0Di-B_{Ne4TC|L?oxddg&c=^p-l;4+%(nlASVweUo102|PF# zp%jrNcMkx1MP#eHkGT7=s`dl;6@crXB;-D+fz|=|nwcFHk%#$r3qYIr-~i0sO+0P61Z4DUsT z-}*=|m^gAC?+5&T|FjL%58$5w92Jp0A_8}x1aLxCUuCL22;e0V87KBQ@gb7FUI2qd zQ4C~R7U152NW9n*fb(xjjB`jt#)x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J;Poza@sxSy)PsZticoq@ z!VhNuqRru3EzYBrnj!E_5-CaM0Mb+^jGf~9jeOrx)pbE5Cp~2^7S&>aP#0h1!7{vf zt5LM!jbm-)|JUu9VnX+eQ3rK0v6CVZ^swBJ6``D(limUp)AteE)6FZin9v?G3z_^oer7-Aq78KnNCfA`=ps ikjR7}fkY+*Is6CYx0S+mH^ 0 } Label { color: Material.accentColor text: Config.baseUnit + ',' + visible: model.balance > 0 } Label { text: model.numtx + visible: model.numtx > 0 } Label { color: Material.accentColor text: qsTr('tx') + visible: model.numtx > 0 } } } @@ -123,13 +126,57 @@ Pane { id: drawer visible: false Layout.fillWidth: true - Layout.preferredHeight: 50 + Layout.preferredHeight: copyButton.height ToolButton { - icon.source: '../../icons/qrcode.png' + id: copyButton + icon.source: '../../icons/copy.png' + icon.color: 'transparent' + icon.width: constants.iconSizeMedium + icon.height: constants.iconSizeMedium + onClicked: console.log('TODO: copy address') + } + ToolButton { + icon.source: '../../icons/info.png' + icon.color: 'transparent' + icon.width: constants.iconSizeMedium + icon.height: constants.iconSizeMedium + onClicked: console.log('TODO: show details screen') + } + ToolButton { + icon.source: '../../icons/key.png' + icon.color: 'transparent' + icon.width: constants.iconSizeMedium + icon.height: constants.iconSizeMedium + onClicked: console.log('TODO: sign/verify dialog') + } + ToolButton { + icon.source: '../../icons/mail_icon.png' + icon.color: 'transparent' + icon.width: constants.iconSizeMedium + icon.height: constants.iconSizeMedium + onClicked: console.log('TODO: encrypt/decrypt message dialog') + } + ToolButton { + icon.source: '../../icons/globe.png' + icon.color: 'transparent' + icon.width: constants.iconSizeMedium + icon.height: constants.iconSizeMedium + onClicked: console.log('TODO: show on block explorer') + } + ToolButton { + icon.source: '../../icons/unlock.png' icon.color: 'transparent' icon.width: constants.iconSizeMedium icon.height: constants.iconSizeMedium + onClicked: console.log('TODO: freeze/unfreeze') + } + ToolButton { + icon.source: '../../icons/tab_send.png' + icon.color: 'transparent' + icon.width: constants.iconSizeMedium + icon.height: constants.iconSizeMedium + onClicked: console.log('TODO: spend from address') } } @@ -156,16 +203,25 @@ Pane { required property string section - GridLayout { + RowLayout { + x: constants.paddingMedium + width: parent.width - 2 * constants.paddingMedium + + Rectangle { + Layout.preferredHeight: 1 + Layout.fillWidth: true + color: Material.accentColor + } Label { - topPadding: constants.paddingMedium - bottomPadding: constants.paddingMedium + padding: constants.paddingMedium text: root.section + ' ' + qsTr('addresses') font.bold: true - font.pixelSize: constants.fontSizeLarge + font.pixelSize: constants.fontSizeMedium } - ToolButton { - + Rectangle { + Layout.preferredHeight: 1 + Layout.fillWidth: true + color: Material.accentColor } } }