-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Enhancement: Integrated title bar #9421
[WIP] Enhancement: Integrated title bar #9421
Conversation
@aitor-gamarra Thanks for your great work! Hi @MrWillCom , thanks for your contribution! Can you sign the Logseq CLA so we can introduce your code to the Logseq codebase? |
Okay, I've signed it. Thanks for making this cool feature come true! |
I checked this on my Windows 11. Nice work!
|
@aitor-gamarra Thanks a lot for this useful contribution! I would like to work on top of this, if that's OK with you. @logseq/core Please don't merge this yet. I am working on the following
|
Fine by me and thanks to you @sprocketc! Let me know if I can help with anything :) |
@sprocketc would it possible for the integrated title bar to follow them native buttons like how firefox does in linux? |
@senntore Those options depend on your DE, and might also allow customizing the location of those buttons (left/right). Unfortunately, that goes beyond the scope of this PR. It would be nice if something like the titleBarOverlay was supported across all operating systems, but I don't see that happening soon. |
Closing this in favor of #9442 |
Background Info
PR Info
This PR introduces an integrated title bar for the
Win32
platform, instead of the (arguably ugly and unfitting) native one.Approaches
There are several approaches for this like the mac-like traffic-lights-on-the-header-bar approach. However, I didn't find a way I liked to do that on windows, the buttons being on the top right and such. Feel free to suggest a desing tho!
Development
I am new to Clojure, so I hope I didn't do any stupid things 馃槄
win32-title-bar
Renderer$\rightarrow$ Electron: Via the ipc/ipc function, three events are sent when a button is clicked:
window-minimize
window-maximize-restore
window-close
These events are later handled at
electron/handler.cljs
.Electron$\rightarrow$ Renderer: Via the
web-contents.send
function (window.cljs
), full-screen and (un)maximize events are sent to the renderer, which are received atui.cljs
and update states accordingly.. These are needed so the renderer process knows if the app is full-screen and (un)maximized. Then, a suscription to an state is created viastate/sub
so components can react to changes in states.Images
Dark Mode
w/ Sidebar
w/o Sidebar
Light Mode
Light mode images
w/ Sidebar
w/o Sidebar
Next Steps?