Skip to content

Commit

Permalink
Merge bitcoin#17597: qt: Fix height of QR-less ReceiveRequestDialog
Browse files Browse the repository at this point in the history
73529f0 qt: Rename slot to updateDisplayUnit() (Hennadii Stepanov)
68288ef qt: Overhaul ReceiveRequestDialog (Hennadii Stepanov)

Pull request description:

  If master (89a1f7a) is compiled without QR support, the "Request payment to..." dialog looks ugly:

  ![Screenshot from 2019-11-25 19-58-59](https://user-images.githubusercontent.com/32963518/69566647-3d9c1c80-0fc0-11ea-8ff6-183cea9372c5.png)

  With this PR:

  ![Screenshot from 2019-12-26 00-42-46](https://user-images.githubusercontent.com/32963518/71451226-221c6100-277a-11ea-94ae-c19a5c6256f7.png)

  ![Screenshot from 2019-12-26 00-44-34](https://user-images.githubusercontent.com/32963518/71451228-29436f00-277a-11ea-8ac5-1bafe6d73b5c.png)

  ![Screenshot from 2019-12-26 00-48-51](https://user-images.githubusercontent.com/32963518/71451230-2e082300-277a-11ea-8c4c-726ca7b776e7.png)

  Other minor changes:
  - "URI" abbreviation is not translated now
  - wallet name is shown if available

ACKs for top commit:
  jonasschnelli:
    Tested ACK 73529f0

Tree-SHA512: 45f9a41d3c72978d78eb2e8ca98e274b8be5abf5352fd3e1f4f49514ce744994545fb3012e80600ded936ae41c6be4d4825a0c5f7bcb3db671d69e0299f0f65b
  • Loading branch information
jonasschnelli authored and knst committed Jan 2, 2024
1 parent e0b337c commit 70c62a9
Show file tree
Hide file tree
Showing 4 changed files with 289 additions and 116 deletions.
288 changes: 223 additions & 65 deletions src/qt/forms/receiverequestdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,233 @@
<rect>
<x>0</x>
<y>0</y>
<width>487</width>
<height>597</height>
<width>413</width>
<height>229</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QRImageWidget" name="lblQRCode">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>320</height>
</size>
</property>
<property name="toolTip">
<string>QR Code</string>
<property name="windowTitle">
<string>Request payment to ...</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item row="0" column="0" colspan="2" alignment="Qt::AlignHCenter">
<widget class="QRImageWidget" name="qr_code">
<property name="text">
<string notr="true">QR image</string>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="payment_header">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Payment information</string>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item row="2" column="0" alignment="Qt::AlignRight|Qt::AlignTop">
<widget class="QLabel" name="uri_tag">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">URI:</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item row="2" column="1" alignment="Qt::AlignTop">
<widget class="QLabel" name="uri_content">
<property name="text">
<string notr="true">bitcoin:BC1...</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="3" column="0" alignment="Qt::AlignRight|Qt::AlignTop">
<widget class="QLabel" name="address_tag">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Address:</string>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item>
<widget class="QTextEdit" name="outUri">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="tabChangesFocus">
<item row="3" column="1" alignment="Qt::AlignTop">
<widget class="QLabel" name="address_content">
<property name="text">
<string notr="true">bc1...</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="4" column="0" alignment="Qt::AlignRight|Qt::AlignTop">
<widget class="QLabel" name="amount_tag">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Amount:</string>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item row="4" column="1" alignment="Qt::AlignTop">
<widget class="QLabel" name="amount_content">
<property name="text">
<string notr="true">0.00000000 BTC</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="5" column="0" alignment="Qt::AlignRight|Qt::AlignTop">
<widget class="QLabel" name="label_tag">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Label:</string>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item row="5" column="1" alignment="Qt::AlignTop">
<widget class="QLabel" name="label_content">
<property name="text">
<string notr="true">label content</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="6" column="0" alignment="Qt::AlignRight|Qt::AlignTop">
<widget class="QLabel" name="message_tag">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Message:</string>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item row="6" column="1" alignment="Qt::AlignTop">
<widget class="QLabel" name="message_content">
<property name="text">
<string notr="true">message content</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="7" column="0" alignment="Qt::AlignRight|Qt::AlignTop">
<widget class="QLabel" name="wallet_tag">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Wallet:</string>
</property>
<property name="textInteractionFlags">
<set>Qt::NoTextInteraction</set>
</property>
</widget>
</item>
<item row="7" column="1" alignment="Qt::AlignTop">
<widget class="QLabel" name="wallet_content">
<property name="text">
<string notr="true">wallet name</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
<set>Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item>
<item row="8" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="btnCopyURI">
Expand Down Expand Up @@ -114,8 +279,11 @@
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
Expand All @@ -130,37 +298,27 @@
<header>qt/qrimagewidget.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>buttonBox</tabstop>
<tabstop>btnCopyURI</tabstop>
<tabstop>btnCopyAddress</tabstop>
<tabstop>btnSaveAs</tabstop>
</tabstops>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>ReceiveRequestDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>452</x>
<y>573</y>
</hint>
<hint type="destinationlabel">
<x>243</x>
<y>298</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>ReceiveRequestDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>452</x>
<y>573</y>
<x>135</x>
<y>230</y>
</hint>
<hint type="destinationlabel">
<x>243</x>
<y>298</y>
<x>135</x>
<y>126</y>
</hint>
</hints>
</connection>
Expand Down
Loading

0 comments on commit 70c62a9

Please sign in to comment.