Skip to content

Round the Stars action buttons into capsules like the iOS client - #138

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

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

Conversation

@CraftStick

@CraftStick CraftStick commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Key change

Round the five 40 pt action buttons of the Stars windows into capsules by changing their corner radius from 10 to 20 (half of the button height):

  • the "Buy More Stars" and withdraw buttons on the My Stars screen (Star_ListScreen.swift)
  • the pay button of the Stars purchase window (Star_PurchaseInApp.swift)
  • the send button of the Stars reactions window (Star_ReactionsController.swift)
  • the "raise bid" button of the auction list (Star_AuctionListController.swift)

Reason

In the Telegram iOS client these buttons are ButtonComponent buttons in the .glass style, and ButtonComponent draws every glass button as a capsule: the corner radius is availableSize.height * 0.5 unless a custom radius is passed (submodules/TelegramUI/Components/ButtonComponent/Sources/ButtonComponent.swift, lines 756-758). The iOS Stars transaction screen uses this style for its main and cancel buttons.

The macOS client already follows this rule for the buttons of its modal windows (acceptView.layer?.cornerRadius = acceptRect.height / 2 in Modal.swift). The Stars windows drew their own buttons with a fixed radius of 10, so they looked squarish next to the capsule buttons of the modal windows. The same fixed radius of 10 is also used by the Premium buttons (PremiumBoardingController.swift, PremiumLimitController.swift) and by the Boost and Stars withdrawal buttons (BoostChannelModalController.swift, the monetization withdrawal inputs); those are changed in #139 and #142. Until they are merged too, the Stars buttons will differ from them.

All five buttons are 40 pt high, so a fixed 20 is exactly half of the height. Buttons of other packages with the same fixed radius (PremiumUI, BoostUI, MonetizationUI) are not touched, to keep this change to one window family.

Screenshot/video result (before/after)

My Stars window, same account and same scroll position. Left: before (radius 10). Right: after (radius 20). The transaction history is cropped out of the screenshot.

Before and after: the Buy More Stars button

Confirmation

Tested on macOS 26.7.1 (25G241), Apple M2, with local Debug builds of master at e188309 without and with this commit.

  1. Opened Settings > My Stars on both builds. Expected: only the corners of the "Buy More Stars" button differ. Actual: the button is a capsule after the change, everything else is identical.

Testing limitations:

  • Only the "Buy More Stars" button on My Stars was checked in the app. The withdraw button of the same screen, the pay button of the purchase window, the send button of the Stars reactions window and the "raise bid" button of the auction list were not opened. They are the same one-line change on controls of the same height, and I checked their heights in code.

  • 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.

@CraftStick

Copy link
Copy Markdown
Contributor Author

Thanks, updated the description: the Premium and Boost buttons that still have radius 10 are changed in #139 and #142, so the three match once all of them are merged.

@macosswift
macosswift merged commit 3462c32 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