[PR #3909] [CLOSED] feat(windows): implement custom window controls and drag area #5943

Closed
opened 2026-03-23 22:21:00 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/3909
Author: @damywise
Created: 11/9/2023
Status: Closed

Base: mainHead: features/frameless-window-2


📝 Commits (4)

  • e32205d feat(windows): implement custom window controls and drag area
  • e87112f feat(windows): alternative window title bar (follows theme)
  • ddcaf9d Merge branch 'AppFlowy-IO:main' into features/frameless-window-2
  • 36d38b2 Merge branch 'AppFlowy-IO:main' into features/frameless-window-2

📊 Changes

9 files changed (+158 additions, -103 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/core/frameless_window.dart (+2 -51)
📝 frontend/appflowy_flutter/lib/startup/tasks/app_widget.dart (+34 -3)
📝 frontend/appflowy_flutter/lib/startup/tasks/windows.dart (+3 -0)
📝 frontend/appflowy_flutter/lib/user/presentation/screens/sign_in_screen/desktop_sign_in_screen.dart (+11 -3)
📝 frontend/appflowy_flutter/lib/user/presentation/screens/skip_log_in_screen.dart (+9 -7)
📝 frontend/appflowy_flutter/lib/workspace/presentation/home/home_stack.dart (+41 -17)
📝 frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar_top_menu.dart (+2 -2)
📝 frontend/appflowy_flutter/lib/workspace/presentation/home/tabs/tabs_manager.dart (+38 -20)
frontend/appflowy_flutter/lib/workspace/presentation/widgets/window_drag_stack.dart (+18 -0)

📄 Description

Feature Preview

Note: Windows-only, but should work on macOS as well but I haven't setup AppFlowy on macOS.

  • Removes the default title bar
  • Replaces MoveWindowDetector to use window_manager's equivalent widget DragToMoveArea which works on all desktop platforms.
  • Adds window controls to: SkipLogInScreen, DesktopSignInScreen (no idea how to test this), HomeTopBar (if tab bar is hidden), and TabsManager.
  • Implemented WindowDragStack, which uses Stack and puts the MoveWindowDetector behind the widget instead so it doesn't disrupt the buttons, textfields, and whatnot in front of it. Implemented in: SidebarTopMenu, HomeTopBar. Should fix #3314 (untested).

TODO

  • Drag window area when overlay is opened. No idea how I can approach this without modifying FlowyOverlay.
  • Update window_manager dependency
  • Test on macOS

Screenshots

Before:
image
After:
image
Video:

https://github.com/AppFlowy-IO/AppFlowy/assets/25608913/c6471fae-aba3-4787-94f1-054424725504


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/3909 **Author:** [@damywise](https://github.com/damywise) **Created:** 11/9/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `features/frameless-window-2` --- ### 📝 Commits (4) - [`e32205d`](https://github.com/AppFlowy-IO/AppFlowy/commit/e32205d15b74f979b9196ff63b2428645c4af720) feat(windows): implement custom window controls and drag area - [`e87112f`](https://github.com/AppFlowy-IO/AppFlowy/commit/e87112fe2f477d855a430ce127cd679cd6342711) feat(windows): alternative window title bar (follows theme) - [`ddcaf9d`](https://github.com/AppFlowy-IO/AppFlowy/commit/ddcaf9d18768e6f98546636f068d44a1970e1249) Merge branch 'AppFlowy-IO:main' into features/frameless-window-2 - [`36d38b2`](https://github.com/AppFlowy-IO/AppFlowy/commit/36d38b29aa388b0ffdfbdba21e38a0da0a61a616) Merge branch 'AppFlowy-IO:main' into features/frameless-window-2 ### 📊 Changes **9 files changed** (+158 additions, -103 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/core/frameless_window.dart` (+2 -51) 📝 `frontend/appflowy_flutter/lib/startup/tasks/app_widget.dart` (+34 -3) 📝 `frontend/appflowy_flutter/lib/startup/tasks/windows.dart` (+3 -0) 📝 `frontend/appflowy_flutter/lib/user/presentation/screens/sign_in_screen/desktop_sign_in_screen.dart` (+11 -3) 📝 `frontend/appflowy_flutter/lib/user/presentation/screens/skip_log_in_screen.dart` (+9 -7) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/home/home_stack.dart` (+41 -17) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/home/menu/sidebar/sidebar_top_menu.dart` (+2 -2) 📝 `frontend/appflowy_flutter/lib/workspace/presentation/home/tabs/tabs_manager.dart` (+38 -20) ➕ `frontend/appflowy_flutter/lib/workspace/presentation/widgets/window_drag_stack.dart` (+18 -0) </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> Note: Windows-only, but should work on macOS as well but I haven't setup AppFlowy on macOS. - Removes the default title bar - Replaces MoveWindowDetector to use `window_manager`'s equivalent widget `DragToMoveArea` which works on all desktop platforms. - Adds window controls to: `SkipLogInScreen`, `DesktopSignInScreen` (no idea how to test this), `HomeTopBar` (if tab bar is hidden), and `TabsManager`. - Implemented `WindowDragStack`, which uses `Stack` and puts the `MoveWindowDetector` *behind* the widget instead so it doesn't disrupt the buttons, textfields, and whatnot in front of it. Implemented in: `SidebarTopMenu`, `HomeTopBar`. Should fix #3314 (untested). #### TODO - [ ] Drag window area when overlay is opened. No idea how I can approach this without modifying `FlowyOverlay`. - [ ] Update `window_manager` dependency - [ ] Test on macOS #### Screenshots Before: ![image](https://github.com/AppFlowy-IO/AppFlowy/assets/25608913/cd2fdc9e-096e-4ea4-b7fb-f0100dd51cee) After: ![image](https://github.com/AppFlowy-IO/AppFlowy/assets/25608913/c2324fcf-2079-45bb-aded-1f4383c4f068) Video: https://github.com/AppFlowy-IO/AppFlowy/assets/25608913/c6471fae-aba3-4787-94f1-054424725504 --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [ ] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [ ] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:21:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#5943
No description provided.