mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-07 08:03:30 +08:00
Update v2proxy.py
This commit is contained in:
parent
6ba9d1622a
commit
596e8ade19
@ -131,14 +131,17 @@ class V2ProxySignInWindow(bui.Window):
|
|||||||
else:
|
else:
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(self._width * 0.5, self._height - 145),
|
position=(self._width * 0.5 - 200, self._height - 180),
|
||||||
size=(0, 0),
|
size=(button_width - 50, 50),
|
||||||
text=bui.Lstr(value=address_pretty),
|
text=bui.Lstr(value=address_pretty),
|
||||||
flatness=1.0,
|
flatness=1.0,
|
||||||
maxwidth=self._width,
|
maxwidth=self._width,
|
||||||
scale=0.75,
|
scale=0.75,
|
||||||
h_align='center',
|
h_align='center',
|
||||||
v_align='center',
|
v_align='center',
|
||||||
|
autoselect=True,
|
||||||
|
on_activate_call=bui.Call(self._copy_link, address_pretty),
|
||||||
|
selectable=True,
|
||||||
)
|
)
|
||||||
qroffs = 20.0
|
qroffs = 20.0
|
||||||
|
|
||||||
@ -231,5 +234,13 @@ class V2ProxySignInWindow(bui.Window):
|
|||||||
# We could do something smart like retry on exceptions here, but
|
# We could do something smart like retry on exceptions here, but
|
||||||
# this isn't critical so we'll just let anything slide.
|
# this isn't critical so we'll just let anything slide.
|
||||||
|
|
||||||
|
def _copy_link(self, link: str) -> None:
|
||||||
|
if bui.clipboard_is_supported():
|
||||||
|
bui.clipboard_set_text(link)
|
||||||
|
bui.screenmessage(
|
||||||
|
bui.Lstr(resource='copyConfirmText'),
|
||||||
|
color=(0, 1, 0)
|
||||||
|
)
|
||||||
|
|
||||||
def _done(self) -> None:
|
def _done(self) -> None:
|
||||||
bui.containerwidget(edit=self._root_widget, transition='out_scale')
|
bui.containerwidget(edit=self._root_widget, transition='out_scale')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user