electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 47e5bd653a749043ea6af3357247541e460474fd
parent 88c238dda7642206e0a011416780bdd02f55b5d3
Author: ThomasV <thomasv@electrum.org>
Date:   Sun, 15 Nov 2015 17:53:02 +0100

add a color pair for qr code

Diffstat:
Mgui/text.py | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gui/text.py b/gui/text.py @@ -35,6 +35,7 @@ class ElectrumGui: curses.use_default_colors() curses.init_pair(1, curses.COLOR_WHITE, curses.COLOR_BLUE) curses.init_pair(2, curses.COLOR_WHITE, curses.COLOR_CYAN) + curses.init_pair(3, curses.COLOR_BLACK, curses.COLOR_WHITE); self.stdscr.keypad(1) self.stdscr.border(0) self.maxy, self.maxx = self.stdscr.getmaxyx() @@ -181,12 +182,12 @@ class ElectrumGui: s = StringIO.StringIO() self.qr = qrcode.QRCode() self.qr.add_data(data) - self.qr.print_ascii(out=s, invert=True) + self.qr.print_ascii(out=s, invert=False) msg = s.getvalue() lines = msg.split('\n') for i, l in enumerate(lines): l = l.encode("utf-8") - self.stdscr.addstr(i+5, 5, l) + self.stdscr.addstr(i+5, 5, l, curses.color_pair(3)) def print_list(self, list, firstline = None): self.maxpos = len(list)