Skip to content

Remove native title bar in favor of in-app header - #24

Closed
so1ve with Copilot wants to merge 2 commits into
mainfrom
copilot/remove-title-bar
Closed

so1ve with Copilot wants to merge 2 commits into
mainfrom
copilot/remove-title-bar

Conversation

Copilot AI commented Oct 30, 2026 •

Copy link
Copy Markdown

The window renders a redundant native OS title bar (with its own min/max/close controls) above the in-app header, which already provides a close button. This makes the window borderless and keeps it movable via in-app drag surfaces.

Changes

  • Window setup (app.rs): set decorations: false in window::Settings so the native title bar is not rendered.

  • Window dragging (app.rs): added a DragWindow message handled via window::drag(id), plus an App::drag() helper returning the message when a window exists. A borderless window has no native drag handle, so dragging must be initiated in-app:

Message::DragWindow => {
    if let Some(id) = self.window_id {
        return window::drag(id);
    }
}
  • Drag surfaces:
    • components/header.rs — main header row (title, status badge, settings, ×) wrapped in a mouse_area that starts the drag; child buttons still capture their own presses, so 设置 and × keep working.
    • components/dialog.rs — dialog::header now accepts a drag: Option<Message> applied to the title strip only, excluding the close button so its click isn't swallowed by the drag.
    • views/settings.rs, views/update.rs, components/feedback.rs — pass app.drag() through to their dialog headers (settings, update, and notice dialogs all draggable).

Closing behavior is unchanged: the in-app × button, Esc, and tray menu still close the window to the tray.

Copilot AI linked an issue Oct 30, 2026 that may be closed by this pull request
Set `decorations: false` on the window so the redundant native title bar
is removed; the in-app header already provides the close button. Add
`window::drag` handling so the borderless window stays movable by dragging
the main header or dialog title strips.

Closes #23

Co-authored-by: so1ve <58381667+so1ve@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove unexpected title bar from UI Remove native title bar in favor of in-app header Oct 30, 2026
Copilot AI requested a review from so1ve October 30, 2026 15:56
@so1ve so1ve closed this Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] Unexcepted title bar / 应该移除的标题栏

2 participants