-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GUI] Adds copy button to proposal recipient address #2798
Conversation
As an aside, copying the proposal name is displaying an incorrect status message of Index: src/qt/pivx/proposalinfodialog.cpp
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/qt/pivx/proposalinfodialog.cpp b/src/qt/pivx/proposalinfodialog.cpp
--- a/src/qt/pivx/proposalinfodialog.cpp (revision 72057a0898a3f7672585f1ca472ea301c5c3349a)
+++ b/src/qt/pivx/proposalinfodialog.cpp (date 1675498390982)
@@ -27,19 +27,19 @@
connect(ui->btnEsc, &QPushButton::clicked, this, &ProposalInfoDialog::close);
connect(ui->pushCopy, &QPushButton::clicked, [this](){
GUIUtil::setClipboard(QString::fromStdString(info.id.GetHex()));
- inform("ID copied to clipboard");
+ inform(tr("ID copied to clipboard"));
});
connect(ui->btnUrlCopy, &QPushButton::clicked, [this](){
GUIUtil::setClipboard(QString::fromStdString(info.url));
- inform("URL copied to clipboard");
+ inform(tr("URL copied to clipboard"));
});
connect(ui->btnNameCopy, &QPushButton::clicked, [this](){
GUIUtil::setClipboard(QString::fromStdString(info.name));
- inform("URL copied to clipboard");
+ inform(tr("Proposal name copied to clipboard"));
});
connect(ui->btnRecipientCopy, &QPushButton::clicked, [this]() {
GUIUtil::setClipboard(QString::fromStdString(info.recipientAdd));
- inform("Recipient copied to clipboard");
+ inform(tr("Recipient copied to clipboard"));
});
}
|
Alternative alternative design; this one moves the "Amount" details down to be included in the next UI row: Patch for this change (replaces previous UI patch): Index: src/qt/pivx/forms/proposalinfodialog.ui
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/qt/pivx/forms/proposalinfodialog.ui b/src/qt/pivx/forms/proposalinfodialog.ui
--- a/src/qt/pivx/forms/proposalinfodialog.ui (revision 72057a0898a3f7672585f1ca472ea301c5c3349a)
+++ b/src/qt/pivx/forms/proposalinfodialog.ui (date 1675522139250)
@@ -422,112 +422,90 @@
</widget>
</item>
<item>
- <widget class="QWidget" name="gridRecipient" native="true">
- <layout class="QGridLayout" name="contentRecipient">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <item row="2" column="0">
- <widget class="QLabel" name="textRecipient">
- <property name="text">
- <string notr="true">N/A</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="labelAmount">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Amount</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QLabel" name="textAmount">
- <property name="text">
- <string notr="true">N/A</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QPushButton" name="btnRecipientCopy">
- <property name="minimumSize">
- <size>
- <width>34</width>
- <height>34</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>34</width>
- <height>34</height>
- </size>
- </property>
- <property name="focusPolicy">
- <enum>Qt::NoFocus</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="iconSize">
- <size>
- <width>24</width>
- <height>24</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="labelRecipient">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Recipient</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QWidget" name="contentRecipient" native="true">
+ <layout class="QHBoxLayout" name="horizontalLayout_303" stretch="0,0">
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" name="vboxRecipient">
+ <item>
+ <widget class="QLabel" name="labelRecipient">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Recipient</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="textRecipient">
+ <property name="text">
+ <string notr="true">N/A</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnRecipientCopy">
+ <property name="minimumSize">
+ <size>
+ <width>34</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>34</width>
+ <height>34</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::NoFocus</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>24</width>
+ <height>24</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
</item>
<item>
<widget class="QLabel" name="labelDividerRecipient">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>1</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">background-color:#bababa;</string>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>1</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color:#bababa;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
</item>
<item>
<widget class="QWidget" name="gridConfDateStatus" native="true">
@@ -538,28 +516,34 @@
<property name="rightMargin">
<number>0</number>
</property>
- <item row="1" column="0">
- <widget class="QLabel" name="textDate">
+ <item row="0" column="0">
+ <widget class="QLabel" name="labelDate">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>16777215</height>
+ </size>
+ </property>
<property name="text">
- <string notr="true">N/A</string>
+ <string>Start Block</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLabel" name="textEndDate">
+ <item row="1" column="0">
+ <widget class="QLabel" name="textDate">
<property name="text">
<string notr="true">N/A</string>
</property>
<property name="alignment">
- <set>Qt::AlignCenter</set>
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="labelDate">
+ <item row="0" column="1">
+ <widget class="QLabel" name="labelEndDate">
<property name="maximumSize">
<size>
<width>16777215</width>
@@ -567,14 +551,24 @@
</size>
</property>
<property name="text">
- <string>Start Block</string>
+ <string>End Block</string>
</property>
<property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+ <set>Qt::AlignCenter</set>
</property>
</widget>
</item>
- <item row="0" column="3">
+ <item row="1" column="1">
+ <widget class="QLabel" name="textEndDate">
+ <property name="text">
+ <string notr="true">N/A</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
<widget class="QLabel" name="labelStatus">
<property name="maximumSize">
<size>
@@ -586,28 +580,38 @@
<string>Status</string>
</property>
<property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLabel" name="textStatus">
+ <property name="text">
+ <string notr="true">N/A</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QLabel" name="labelEndDate">
+ <item row="0" column="3">
+ <widget class="QLabel" name="labelAmount">
<property name="maximumSize">
<size>
<width>16777215</width>
- <height>16777215</height>
+ <height>16777215</height>
</size>
</property>
<property name="text">
- <string>End Block</string>
+ <string>Amount</string>
</property>
<property name="alignment">
- <set>Qt::AlignCenter</set>
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
- </item>
+ </item>
<item row="1" column="3">
- <widget class="QLabel" name="textStatus">
+ <widget class="QLabel" name="textAmount">
<property name="text">
<string notr="true">N/A</string>
</property>
|
That is the solution I suggested originally. I think it works best. Another option is to drop the new copy button, and just make the address text selectable. Currently, it can't be highlighted with a mouse click etc. |
Please see the screenshot for a suggested layout, giving more importance to the amount field and grouping relevant fields together. (quick mockup - not a final design file) Reducing the contrast of the divider lines should also help the user focus on the content easier. Spacing can also be reduced between each section and font size reduced 1 or 2px's (still easy to read) to save space and prevent any extra scrolling. |
Revisiting here to update based upon feedback. This is the current look that I can push, it has the "Amount" field underneath "Recipient" I can still adjust it similarly to @shrnkld suggested, but as I was moving the puzzle pieces around this seemed to feel better. Agreed or go with the above from @shrnkld to move it lower? Also once settled I have the Proposal name copy fixes staged as well. |
circling back around to this one. I'm okay with how it is now for the purpose of achieving what the PR set out to do. Only thing I'd really request at this point is to just squash the 4 commits down into 1 commit |
Absolutely. Squashing them now, just as long as were good I can tidy it up for a final bit |
66a68d2
to
2c7af22
Compare
Resolved, squashed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 2c7af22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK 2c7af22
…UTH peers (PIVX-Project#2798) * Pass CNode* to IsMasternodeQuorumNode and let it also check verifiedProRegTxHash This makes IsMasternodeQuorumNode return true on incoming peer connections as well. * Let GetMasternodeQuorumNodes also take verifiedProRegTxHash into account This makes it return NodeIds for incoming peer connections as well. * Remove AddParticipatingNode and the need for it This was needed in the past when we were unable to identify incoming connections from other quorum members. Now that we have MNAUTH, we can easily identify all connected members. * Don't track interestedIn quorums in CSigSharesNodeState anymore Same as with the previous commit, we're now able to easily identify which nodes to announce sig shares to. * Remove unused CConnman::GetMasternodeQuorumAddresses
…UTH peers (PIVX-Project#2798) * Pass CNode* to IsMasternodeQuorumNode and let it also check verifiedProRegTxHash This makes IsMasternodeQuorumNode return true on incoming peer connections as well. * Let GetMasternodeQuorumNodes also take verifiedProRegTxHash into account This makes it return NodeIds for incoming peer connections as well. * Remove AddParticipatingNode and the need for it This was needed in the past when we were unable to identify incoming connections from other quorum members. Now that we have MNAUTH, we can easily identify all connected members. * Don't track interestedIn quorums in CSigSharesNodeState anymore Same as with the previous commit, we're now able to easily identify which nodes to announce sig shares to. * Remove unused CConnman::GetMasternodeQuorumAddresses
…UTH peers (PIVX-Project#2798) * Pass CNode* to IsMasternodeQuorumNode and let it also check verifiedProRegTxHash This makes IsMasternodeQuorumNode return true on incoming peer connections as well. * Let GetMasternodeQuorumNodes also take verifiedProRegTxHash into account This makes it return NodeIds for incoming peer connections as well. * Remove AddParticipatingNode and the need for it This was needed in the past when we were unable to identify incoming connections from other quorum members. Now that we have MNAUTH, we can easily identify all connected members. * Don't track interestedIn quorums in CSigSharesNodeState anymore Same as with the previous commit, we're now able to easily identify which nodes to announce sig shares to. * Remove unused CConnman::GetMasternodeQuorumAddresses
…UTH peers (PIVX-Project#2798) * Pass CNode* to IsMasternodeQuorumNode and let it also check verifiedProRegTxHash This makes IsMasternodeQuorumNode return true on incoming peer connections as well. * Let GetMasternodeQuorumNodes also take verifiedProRegTxHash into account This makes it return NodeIds for incoming peer connections as well. * Remove AddParticipatingNode and the need for it This was needed in the past when we were unable to identify incoming connections from other quorum members. Now that we have MNAUTH, we can easily identify all connected members. * Don't track interestedIn quorums in CSigSharesNodeState anymore Same as with the previous commit, we're now able to easily identify which nodes to announce sig shares to. * Remove unused CConnman::GetMasternodeQuorumAddresses
901976a Stop tracking interested/participating nodes and send/announce to MNAUTH peers (#2798) (Alexander Block) 59dfdc2 update bestChainLockWithKnownBlock in AcceptedBlockHeader (Alessandro Rezzi) bd0a3f8 Introduce "qsendrecsigs" to indicate that plain recovered sigs should be sent (#2783) (Alexander Block) 846fd9a Make LLMQ/InstantSend/ChainLocks code less spammy (#2781) (Alexander Block) 1a52ad0 Fix LogPrintf call in ::DoInvalidateBlock (Alessandro Rezzi) e3c5eef Multiple fixes/refactorings for ChainLocks (#2765) (Alexander Block) 9dda5d2 Implement LLMQ based InstantSend (#2735) (Alexander Block) 149e3e3 Various small cleanups (#2761) (UdjinM6) cc7450d Use ReleaseNodeVector and CopyNodeVector in PIVX specific code (Alessandro Rezzi) ed463a6 Do not hold cs_vNodes in CSigSharesManager::SendMessages() for too long (#2758) (UdjinM6) cd1809f Implement persistence for LLMQ based InstantSend (#2756) (Alexander Block) 924ee8f Don't be too harsh for invalid CLSIGs (#2742) (Alexander Block) f255314 Fix banning when local node doesn't have the vvec (#2739) (Alexander Block) Pull request description: each commit backports a different PR. The PR number is in the commit message. There are also 3 extra (trivial) commits added by me ACKs for top commit: 901976a Duddino: utACK 901976a Liquid369: uTACK 901976a Tree-SHA512: 70b53ae3fc014c23964cae3452f6c8270d96b3b375c0f172e04039ba6f3b537d56c38677e5e4005c8b810a82b447a64fc978c2d63344b9e9736ceff7db162a18
Solves Issue #2792
A button is added to the proposal card screen to copy to clipboard the recievers address for any type of cehcking a user may want to do