Skip to content

Use native window and concentric pane corners on macOS 27 - #111

Open
PystoyPlayer wants to merge 9 commits into
TelegramMessenger:masterfrom
PystoyPlayer:codex/native-window-corners
Open

PystoyPlayer wants to merge 9 commits into
TelegramMessenger:masterfrom
PystoyPlayer:codex/native-window-corners

Conversation

@PystoyPlayer

@PystoyPlayer PystoyPlayer commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Key change

On macOS 27 with Swift 6.4+, use the system window corner and container-concentric corners at the 8-point inset for the chat list, folder rail and entertainment sidebar. Keep the native toolbar so AppKit positions traffic lights and its sharing indicator together. Older compilers keep the previous window-radius override and matching fixed pane radii together; older macOS paths are unchanged.

Reason

Continuation of #80 by @and2ey. Removing the window override without converting every pane leaves mismatched corners. The entertainment sidebar now follows the same radius callback as the left pane. The legacy compiler path no longer loses its matching outer radius.

Screenshot/video result (before/after)

Same wide window without folders, 1100×800 points. Direct 610×196 crops of the actual clients. The native sharing indicator remains visible; private chat content is outside the crop.

Before

Before: forced outer radius and fixed inset panel corners

After

After: native outer radius and container-concentric inset panel corners

The sharing-indicator regression from the earlier draft is also checked in an identical 1512×886-point window:

Before (earlier draft without native toolbar):

Earlier draft: sharing indicator shifted toward the corner

After (native toolbar retained):

Current: sharing indicator centered on the native window-control cluster

Confirmation

macOS 27.0.1 (26A434), Xcode 27.1, Telegram 13.1.0 (283357), Debug arm64. The retained native comparison above covers the wide window, native toolbar and sharing-indicator alignment. It predates the entertainment-pane follow-up. No compact account/chat images are linked here. The non-runnable evidence directory, including six compact images exposing account/chat fragments, has been removed from this branch; previously published immutable GitHub copies are not claimed erased.

The full Debug arm64 client workspace compiled successfully with these shipping sources and real native dependencies on macOS 27.0.1 / Xcode 27.1. It includes other pending changes and local SDK/profile overrides, so this is integration build coverage rather than an independent build of this PR alone.

A fresh run of the updated client opened Saved Messages and the entertainment sidebar, visually checked its outer corners, and closed it successfully. No messages were sent and no private screenshot was published.

Swift 6.3/Xcode 26 and another macOS version are unavailable, so the legacy compiler path was inspected but not runtime-tested. Fullscreen and secondary displays were not tested.

  • 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.
@PystoyPlayer
PystoyPlayer marked this pull request as ready for review October 26, 2026 21:49
@macosswift

Copy link
Copy Markdown
Collaborator

Issues:

  • MainViewController.swift:316-347: The private 28pt window-radius override is removed for every toolchain, but the concentric pane corners in MainController_View and LeftSidebarView exist only under #if compiler(>=6.4), so builds made with Xcode 26.x (Swift 6.3) on macOS 27 keep fixed 20pt pane corners, sized for the removed 28pt window, inside the system-chosen window corner.

  • EntertainmentSidebarController.swift:14-23: EntertainmentSidebarView keeps its fixed 20pt corner radius at an 8pt window inset, so on macOS 27 builds with Swift 6.4 the trailing emoji and sticker pane is no longer concentric with the native window corner and no longer matches the 8pt left panes this PR converts.

  • README.md:13: The six compact crops before-*-compact.png and after-*-compact.png show the account display name in the window title and part of a Saved Messages chat with message fragments, so account and chat content is committed to the repository; the wide, primary and sharing-indicator crops keep chat content outside the frame.

  • validation.json:6: The added tools/tests/native-window-corners evidence directory (16 screenshots, 2 JSON files, README) does not belong in the repository: tools/tests does not exist on master, nothing in it is runnable, validation.json cites two commits that do not exist in this repository and the README describes a setup helper that is not committed.

@macosswift

Copy link
Copy Markdown
Collaborator

Have you tested this on different versions of macOS with various chat folder settings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants