mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-03 14:03:18 +08:00
Latest public/internal sync.
This commit is contained in:
parent
7df55ecd14
commit
ffa75ac4d1
@ -48,7 +48,10 @@ class _HostLookupThread(Thread):
|
|||||||
try:
|
try:
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
result = [item[-1][0] for item in socket.getaddrinfo(self.name, self._port)][0]
|
result = [
|
||||||
|
item[-1][0]
|
||||||
|
for item in socket.getaddrinfo(self.name, self._port)
|
||||||
|
][0]
|
||||||
except Exception:
|
except Exception:
|
||||||
result = None
|
result = None
|
||||||
bui.pushcall(
|
bui.pushcall(
|
||||||
@ -212,15 +215,19 @@ class ManualGatherTab(GatherTab):
|
|||||||
inactive_color = (0.5, 0.4, 0.5)
|
inactive_color = (0.5, 0.4, 0.5)
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._join_by_address_text,
|
edit=self._join_by_address_text,
|
||||||
color=active_color
|
color=(
|
||||||
if value is SubTabType.JOIN_BY_ADDRESS
|
active_color
|
||||||
else inactive_color,
|
if value is SubTabType.JOIN_BY_ADDRESS
|
||||||
|
else inactive_color
|
||||||
|
),
|
||||||
)
|
)
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._favorites_text,
|
edit=self._favorites_text,
|
||||||
color=active_color
|
color=(
|
||||||
if value is SubTabType.FAVORITES
|
active_color
|
||||||
else inactive_color,
|
if value is SubTabType.FAVORITES
|
||||||
|
else inactive_color
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Clear anything existing in the old sub-tab.
|
# Clear anything existing in the old sub-tab.
|
||||||
@ -354,9 +361,7 @@ class ManualGatherTab(GatherTab):
|
|||||||
self._height = (
|
self._height = (
|
||||||
578
|
578
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 670
|
else 670 if uiscale is bui.UIScale.MEDIUM else 800
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 800
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self._scroll_width = self._width - 130 + 2 * x_inset
|
self._scroll_width = self._width - 130 + 2 * x_inset
|
||||||
@ -375,16 +380,12 @@ class ManualGatherTab(GatherTab):
|
|||||||
b_height = (
|
b_height = (
|
||||||
107
|
107
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 142
|
else 142 if uiscale is bui.UIScale.MEDIUM else 190
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 190
|
|
||||||
)
|
)
|
||||||
b_space_extra = (
|
b_space_extra = (
|
||||||
0
|
0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else -2
|
else -2 if uiscale is bui.UIScale.MEDIUM else -5
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else -5
|
|
||||||
)
|
)
|
||||||
|
|
||||||
btnv = (
|
btnv = (
|
||||||
@ -392,9 +393,7 @@ class ManualGatherTab(GatherTab):
|
|||||||
- (
|
- (
|
||||||
48
|
48
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 45
|
else 45 if uiscale is bui.UIScale.MEDIUM else 40
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 40
|
|
||||||
)
|
)
|
||||||
- b_height
|
- b_height
|
||||||
)
|
)
|
||||||
@ -513,9 +512,7 @@ class ManualGatherTab(GatherTab):
|
|||||||
scale=(
|
scale=(
|
||||||
1.8
|
1.8
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.55
|
else 1.55 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
size=(c_width, c_height),
|
size=(c_width, c_height),
|
||||||
transition='in_scale',
|
transition='in_scale',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user