Skip to content

Round the monetization balance buttons into capsules - #149

Merged
macosswift merged 1 commit into
TelegramMessenger:masterfrom
CraftStick:feat/balance-buttons-capsule
Oct 29, 2026
Merged

macosswift merged 1 commit into
TelegramMessenger:masterfrom
CraftStick:feat/balance-buttons-capsule

Conversation

@CraftStick

Copy link
Copy Markdown
Contributor

Key change

Round the two buttons of the monetization balance row ("Withdraw via Fragment" and "Buy Ads") into capsules by changing their corner radius from 10 to 20, half of their 40 pt height. Both buttons are instances of the same WithdrawAction control in Fragment_BalanceRowItem.swift, so this is one line.

Reason

This is a consistency change inside the macOS client, not a copy of iOS. On iOS the same two buttons are drawn by MonetizationBalanceItem with a default ButtonComponent.Background, that is in the .legacy style with a radius of 10, so they match what macOS had before this change.

The macOS client now draws its other action buttons as capsules: the modal buttons (acceptView.layer?.cornerRadius = acceptRect.height / 2 in Modal.swift) and, in the related open pull requests, the Stars (#138), Premium (#139), Boost and withdrawal (#142) buttons, which follow the iOS .glass style (ButtonComponent uses height * 0.5 for it). The balance row is the one remaining place where two big blue buttons keep a radius of 10, inside a card that is much rounder than they are (more so if the list block radius in #143 is accepted). If you would rather keep this screen identical to iOS, this change can simply be closed; nothing else depends on it.

Screenshot/video result (before/after)

The "Available balance" block of the Stars statistics of a channel, the same block on both builds. Top: before (radius 10). Bottom: after (radius 20). The card, the amount and the spacing do not change.

Before and after: the balance buttons

Confirmation

Tested on macOS 26.7.1 (25G241), Apple M2, with local Debug builds of master at e188309. The "before" screenshot comes from the same build line without this commit.

  1. Opened the Stars statistics of a channel and looked at the balance block. Expected: only the corners of the two buttons differ. Actual: both buttons are capsules, the rest of the block is identical.

Testing limitations:

  • Only the Stars balance block with two buttons was checked. The variant with a countdown and a lock icon inside the withdraw button (shown while a withdrawal is not available yet) uses the same control and the same radius but was not opened, and neither was the TON balance block.

  • Only macOS 26.7.1 was available. No other macOS version, no Intel machine, no dark theme.

  • I built with the Postbox assert in OrderedItemListTable.replaceItems disabled (-assert-config Release), because a Debug build traps on my account at launch on a duplicate recent inline bot entry. This is unrelated to the change.

  • I confirm that I have tested the affected behavior and verified that it works properly, or verified the content and links for a documentation-only change.

@macosswift
macosswift merged commit 6293afd into TelegramMessenger:master Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants