Skip to content

fix(scanner): move the gallery button to the bottom-right - #1550

Closed
bmc08gt wants to merge 1 commit into
code/cashfrom
fix/scanner-gallery-button-placement
Closed

bmc08gt wants to merge 1 commit into
code/cashfrom
fix/scanner-gallery-button-placement

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

The gallery button sat in the scanner's top-right corner, clear of the status bar. The comment there explained the choice: the bottom belongs to the tab bar, which is hoisted into AppNavigationBar, so a control down there has to be positioned around a bar this screen does not own.

LocalTabBarPadding is that mechanism, and it already exists. NavTabBarInsetEntryDecorator provides it per tab-home entry from the bar's measured height, and WalletScreenContent, MenuScreenContent and ChatsScreen use it to clear the bar the same way.

So the button moves to Alignment.BottomEnd with both numbers read off the bar rather than picked:

  • end inset grid.x8, the horizontal margin AppNavigationBar draws NavigationBar with, which puts the button's end edge on the bar's;
  • bottom LocalTabBarPadding.current.calculateBottomPadding() + grid.x3, the bar's height plus the same gap the bar leaves below itself.

Measured on an emulator at 420dpi, the button and the bar's pill both end at x=975.

Nothing else about the button changes. It stays outside the permission when, since a picked photo needs no camera and someone who declined the camera is who it is for, and it stays hidden while a bill is up. Its haze source is still the inner preview Box, which the button is not inside, so the blur does not sample itself.

The button sat top-right because the bottom belongs to the tab bar, which is
hoisted into `AppNavigationBar` and so is not this screen's to position around.
`LocalTabBarPadding` is that mechanism: `NavTabBarInsetEntryDecorator` hands each
tab-home entry the bar's measured height, and `WalletScreenContent`,
`MenuScreenContent` and `ChatsScreen` already clear the bar with it.

So both numbers are read off the bar rather than picked. The end inset is
`grid.x8`, the horizontal margin `AppNavigationBar` draws `NavigationBar` with,
which puts the button's end edge on the bar's. The bottom is
`LocalTabBarPadding` plus `grid.x3`, the same gap the bar leaves below itself.

The button stays outside the permission `when` (a picked photo needs no camera)
and stays hidden while a bill is up. Its haze source is still the inner preview
Box, which the button is not inside, so the blur does not sample itself.
@bmc08gt bmc08gt self-assigned this Sep 24, 2026
@github-actions github-actions Bot added type: fix Bug fix area: scanner QR/Kikcode scanning, camera labels Sep 24, 2026
@bmc08gt bmc08gt closed this Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: scanner QR/Kikcode scanning, camera type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant