Skip to content

Commit

Permalink
fixed inbox spacing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
efroemling committed Jan 13, 2025
1 parent 764c2c5 commit 206e3d7
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 33 deletions.
48 changes: 24 additions & 24 deletions .efrocachemap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.7.37 (build 22181, api 9, 2025-01-11)
### 1.7.37 (build 22184, api 9, 2025-01-13)
- Bumping api version to 9. As you'll see below, there's some UI changes that
will require a bit of work for any UI mods to adapt to. If your mods don't
touch UI stuff at all you can simply bump your api version and call it a day.
Expand Down
2 changes: 1 addition & 1 deletion src/assets/ba_data/python/baenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 22181
TARGET_BALLISTICA_BUILD = 22184
TARGET_BALLISTICA_VERSION = '1.7.37'


Expand Down
23 changes: 17 additions & 6 deletions src/assets/ba_data/python/bauiv1lib/inbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ def __init__(
parent=self._root_widget,
size=(
self._width - 60,
self._height - (170 if uiscale is bui.UIScale.SMALL else 70),
self._height - (170 if uiscale is bui.UIScale.SMALL else 80),
),
position=(
30,
(110 if uiscale is bui.UIScale.SMALL else 30) + yoffs,
(110 if uiscale is bui.UIScale.SMALL else 34) + yoffs,
),
capture_arrows=True,
simple_culling_v=200,
Expand Down Expand Up @@ -472,10 +472,19 @@ def _on_inbox_request_response(
bui.spinnerwidget(edit=self._loading_spinner, visible=False)
bui.textwidget(edit=self._infotext, text='')

uiscale = bui.app.ui_v1.uiscale

margin_top = 0.0 if uiscale is bui.UIScale.SMALL else 10.0
margin_v = 0.0 if uiscale is bui.UIScale.SMALL else 5.0

# Need this to avoid the dock blocking access to buttons on our
# bottom message.
margin_bottom = 60.0 if uiscale is bui.UIScale.SMALL else 10.0

# Even though our window size varies with uiscale, we want
# notifications to target a fixed width.
sub_width = 400.0
sub_height = 0.0
sub_height = margin_top

# Construct entries for everything we'll display.
for i, wrapper in enumerate(response.wrappers):
Expand Down Expand Up @@ -558,7 +567,9 @@ def _on_inbox_request_response(
color=color,
)
)
sub_height += total_height
sub_height += margin_v + total_height

sub_height += margin_bottom

subcontainer = bui.containerwidget(
id='inboxsub',
Expand All @@ -575,7 +586,7 @@ def _on_inbox_request_response(
assert bui.app.classic is not None

buttonrows: list[list[bui.Widget]] = []
y = sub_height
y = sub_height - margin_top
for i, _wrapper in enumerate(response.wrappers):
entry_display = self._entry_displays[i]
entry_display_weak = weakref.ref(entry_display)
Expand Down Expand Up @@ -681,7 +692,7 @@ def _on_inbox_request_response(

buttonrows.append(buttonrow)

y -= entry_display.total_height
y -= margin_v + entry_display.total_height

uiscale = bui.app.ui_v1.uiscale
above_widget = (
Expand Down
2 changes: 1 addition & 1 deletion src/ballistica/shared/ballistica.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
namespace ballistica {

// These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 22181;
const int kEngineBuildNumber = 22184;
const char* kEngineVersion = "1.7.37";
const int kEngineApiVersion = 9;

Expand Down

0 comments on commit 206e3d7

Please sign in to comment.