New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(windows): implement custom window controls and drag area #3909
Conversation
Note: Windows-only, but should work on macOS as well - Removes the default title bar - Replaces MoveWindowDetector to use `window_manager`'s equivalent widget `DragToMoveAre` 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`
|
How does it look with multiple tabs? I'm not a huge fan of this solution because of the window controls. As a windows user, I myself actually prefer the title bar, however it should follow theme of course. |
@Xazin for multiple tabs, you can see the video starting from 0:14. |
Well with Some reference: https://stackoverflow.com/questions/39261826/change-the-color-of-the-title-bar-caption-of-a-win32-application |
Thanks for the updates, I really appreciate this in-depth 👍 @annieappflowy - What do you think, which solution would you prefer? PS. I love the acrylic solution. |
Hey @damywise, do you want to give the custom rendered windows bar a go? I like the feel of the acrylic window, and of course we could go with that. But as you mentioned, we can't style it according to the theme, and in the end that flexibility would be very well liked. Let me know 🙏 |
Well, sure. Here you go. I'm not really sure if I like it compared to the macOS one, to be honest. |
- Disables the previous frameless window caption (not removed)
Ah yeah forgot to push, in case anyone wants to test it. |
Looks good, I want to see if I can optimise the looks with a built-in gradient modifier, I'll try to play with it. 🙏👍 |
I've implemented something similar to this PR. So will close it for now. Thanks a lot for the proof of concept! ✌️ |
Feature Preview
Note: Windows-only, but should work on macOS as well but I haven't setup AppFlowy on macOS.
window_manager
's equivalent widgetDragToMoveArea
which works on all desktop platforms.SkipLogInScreen
,DesktopSignInScreen
(no idea how to test this),HomeTopBar
(if tab bar is hidden), andTabsManager
.WindowDragStack
, which usesStack
and puts theMoveWindowDetector
behind the widget instead so it doesn't disrupt the buttons, textfields, and whatnot in front of it. Implemented in:SidebarTopMenu
,HomeTopBar
. Should fix [Bug] Invisible window top bar obstructs title editing on macOS #3314 (untested).TODO
FlowyOverlay
.window_manager
dependencyScreenshots
Before:
After:
Video:
2023-11-09.12-50-45-00.00.00.320-00.00.33.223.mp4
PR Checklist