1
0
Commit Graph

28 Commits

Author SHA1 Message Date
SomberNight
a3fc43cc2d qml: remove dependency "Pillow" (and its transitive deps)
closes https://github.com/spesmilo/electrum/issues/9572
2025-02-20 18:53:08 +00:00
SomberNight
72c664856d qt gui: qrcodewidget: default size smaller for large codes
and use default sizing when displaying PSBTs.

Prior to this, when displaying a large PSBT (that should still fit within a QR),
the default window size was too small, and the user had to manually resize the window.
2025-02-10 18:32:09 +00:00
Sander van Grieken
19cd408f98 organize import, whitespace 2025-01-23 12:58:28 +01:00
SomberNight
cfe8502f96 qt desktop gui: upgrade qt5->qt6
closes https://github.com/spesmilo/electrum/issues/8007
2024-09-18 15:48:38 +00:00
ThomasV
8b0a6940bc receive tab: disable widgets if request has expired, instead of applying red stylesheet 2023-03-19 11:13:45 +01:00
SomberNight
824ce64e66 qt gui: display nice error if QR code data overflows
there is existing handler-code at e.g.
1a7634e615/electrum/gui/qt/transaction_dialog.py (L309)
but we should make sure setData() always raises the exc when needed,
as paintEvent() is too late for nice handling.

closes https://github.com/spesmilo/electrum/issues/4288
closes https://github.com/spesmilo/electrum/issues/4280
2023-01-02 13:38:05 +00:00
SomberNight
95a8df69b4 qt wizard: (fix) during 2fa wallet creation, shared QR to be drawn
This was a regression from 2a31f80d09,
before which, when using the default `QRCodeWidget()` constructor,
there had been a min size set on the widget. I like that old behaviour:
reasonable size should be set by default, and if you want to set the
size manually, opt-in to that.

fixes https://github.com/spesmilo/electrum/issues/8071
2022-11-17 03:58:32 +00:00
SomberNight
1e97491124 qt QRDialog: make dialog usefully resizeable
In commit 9bba65199e,
the QRCodeWidget was put inside a BoxLayout as a workaround to avoid the "copy to clipboard" and
"save as file" functionality grabbing extra whitespace/stretch/padding and putting it into the
exported image.

However, in turn that commit introduced a bug, where making the dialog larger does not make the
QRCodeWidget larger (which worked prior).

This commit tries to fix the regression and also the original bug.
2022-07-12 19:26:01 +02:00
SomberNight
430a61eb42 qt QRDialog: try to fix layout-sizing issues
related https://github.com/spesmilo/electrum/pull/7218
closes https://github.com/spesmilo/electrum/pull/7223
2022-07-12 16:50:49 +02:00
ThomasV
2a31f80d09 QRCodeWidget: add margin of 1 block, remove fixedSize parameter 2022-05-23 11:38:09 +02:00
ThomasV
3b44646bd1 QRCodeWidget: show warning in GUI 2022-05-23 10:11:35 +02:00
ThomasV
ad70659a66 qr code widget: set margin to zero, print warning if cannot draw 2022-05-06 11:33:10 +02:00
Benoit Verret
2cc16f8ed4 Avoid hiding QR codes with help_text
In some situations, if a QR code's data and help_text were too long,
the QR code was unscannable.
2021-04-17 22:54:37 -04:00
Benoit Verret
f731c38293 Minor style changes 2021-03-21 00:36:23 -04:00
SomberNight
b28b3994c7 qt: move window.get{Open,Save}FileName to util
Sometimes we want its "remember path" behaviour but it does not make sense to
parent the dialog from main window. When so, caller code no longer needs to
get a reference to a main window.

Also rm last usages of get_parent_main_window().
2020-12-20 15:25:35 +01:00
SomberNight
9bba65199e Qt QR code: when saving QR code as image file, don't include stretch
The stretch to the right of the QR was included in the image previously.
This resolves the FIXME.
2020-09-06 17:55:11 +02:00
SomberNight
182c192558 qt: easier import/export of channel backups 2020-06-19 04:48:20 +02:00
ThomasV
661ecb2cf5 add help text to channel backup QR code 2020-06-16 18:48:04 +02:00
SomberNight
d0ab003978 qt qrcode: fix DeprecationWarning (float->int conversion)
...\electrum\electrum\gui\qt\qrcodewidget.py:88: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  qp.drawRect(left+c*boxsize, top+r*boxsize, boxsize - 1, boxsize - 1)
2020-06-07 03:10:27 +02:00
SomberNight
04edad9984 config: no longer singleton. it is passed to Wallet.__init__
The few other cases that used SimpleConfig.get_instance() now
either get passed a config instance, or they try to get a reference
to something else that has a reference to a config.
(see lnsweep, qt/qrcodewidget, qt/qrtextedit)
2019-09-22 20:46:01 +02:00
SomberNight
b2920db8b8 config: enforce that SimpleConfig is singleton
related: #5629
2019-09-10 18:01:10 +02:00
zebra-lucky
93724ba33a qt gui: fix qrcodewidget pen for retina display 2019-08-10 03:18:15 +03:00
SomberNight
c776af41f6 qt: allow QR codes to store a bit more data
by decreasing error correction (about ~26% larger max payload)
2019-05-26 02:13:02 +02:00
SomberNight
bf1c1c2a11 qt qrcodewidget: on MacOS, was grabbing whole screen
from Electron-Cash/Electron-Cash@61d46989e6
2019-03-04 04:24:45 +01:00
SomberNight
026448837f no more "import *"
fixes #5101
fixes #5105
2019-02-11 20:21:24 +01:00
ThomasV
f994cd4a5d draw qrcode with fixed framesize 2019-01-23 16:56:29 +01:00
SomberNight
33d14e4238 some import clean-up in qt 2018-09-25 18:15:28 +02:00
Janus
097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00