thamara / time-to-leave

Log work hours and get notified when it's time to leave the office and start to live.
http://timetoleave.app
GNU General Public License v3.0
463 stars 272 forks source link

TTL title bar should follow Windows colors #879

Open araujoarthur0 opened 2 years ago

araujoarthur0 commented 2 years ago

Describe the current limitation The TTL title bar is currently still white, while my App and system is in Dark mode. It would be great to have it also follow Windows colors like other native apps do.

image

If it matters, I installed using the stable .exe instead of the .msi as it didn't work.

Version: 2.0.1 Electron: 11.1.1 Chrome: 87.0.4280.88 Node.js: 12.18.3 OS: Windows_NT ia32 10.0.22623

thamara commented 2 years ago

Does it make a difference if installing vs. building locally? Anyway, I found this, which may be helpful: https://github.com/AlexTorresSk/custom-electron-titlebar

araujoarthur0 commented 2 years ago

Does it make a difference if installing vs. building locally?

I don't think it does.

araujoarthur0 commented 2 years ago

Found a way to do a very VSCode-like title bar without any extensions: https://github.com/binaryfunt/electron-seamless-titlebar-tutorial Adding the good-first-issue if it's mostly to follow a tutorial. Consider if this should be windows only. I don't know how VSCode does in Mac.

The-Gammelier commented 2 years ago

Hello,

If this issue is still open, I would like to take a crack at it (as it'd be my first issue with an open-source project).

araujoarthur0 commented 2 years ago

Thanks @The-Gammelier, just assigned it to you. Feel free to ask us if any questions come up.

The-Gammelier commented 2 years ago

I have run into a couple issues.

When running npm run lint-fix, I get an error for css/styles.css:

image

The first three are from following the tutorial, the last one is from previously existing code.

Next up, I have successfully implemented a custom title bar and working buttons, however setting the BrowserWindow frame to false removes the menu options from the window. I am unsure how to get those back while keeping the new custom title bar.

image

Finally, when scrolling down in the app, the month display will overflow onto the new title bar. I am also unsure how to fix that.

image

The-Gammelier commented 2 years ago

When looking for solutions to the above issues, I've found an article about electron being able to use light/dark/system settings natively. This may be a possible solution rather than making a custom title bar, however this is my first time working with electron and I'm not quite sure how to go about implementing this to see if it would work as the app checks for themes in several files/functions.

https://www.electronjs.org/docs/latest/tutorial/dark-mode

The-Gammelier commented 2 years ago

I've figured out a solution to the table-header overtaking the custom title bar. I'm still working on how to get the menu options to come back up.

araujoarthur0 commented 2 years ago

When looking for solutions to the above issues, I've found an article about electron being able to use light/dark/system settings natively. This may be a possible solution rather than making a custom title bar, however this is my first time working with electron and I'm not quite sure how to go about implementing this to see if it would work as the app checks for themes in several files/functions.

https://www.electronjs.org/docs/latest/tutorial/dark-mode

The tutorial is not really clear on the automatic opt-in for native interfaces. Perhaps it's only for MacOS?

araujoarthur0 commented 2 years ago

I've figured out a solution to the table-header overtaking the custom title bar. I'm still working on how to get the menu options to come back up.

Maybe there's a java script event being triggered that removes the menu options? You could try playing around with the watcher and debugger in DevTools.

ghost commented 1 year ago

Hi, is anyone still working on this issue? I would like to give this a try.

tupaschoal commented 1 year ago

I don't think anyone is @iknowtalha , feel free to take it.

ghost commented 1 year ago

ok

teezBlaze commented 1 year ago

Hello, is anyone still working on this issue? Just tried myself locally, and I think it's almost done. Just needed to do some finishing. See the attached video.

https://user-images.githubusercontent.com/131569178/234854880-9e93e71f-3ad6-4ed0-95eb-ac5eb82089e5.mp4

tupaschoal commented 1 year ago

I don't think anyone is working on it @teezBlaze

teezBlaze commented 1 year ago

@tupaschoal Then, please do assign this to me.

teezBlaze commented 1 year ago

I was able to change the theme color of the title bar. dark light

teezBlaze commented 1 year ago

Now have to bring back the menu bar. Before that I have few questions.

1. Where should I add the title bar codes?

Currently I added the codes in a titleBar.js file and added the script tag directly into the index.html. See the below image for reference. 1 Or, should I put the codes in any other place @tupaschoal ?

Bkmakwana2002 commented 1 year ago

Is this issue open? if yes I would like to take it. Since it is my first time contributing to open source.

career-yashaswee commented 1 month ago

If this issue is still open, I would love to work on it. I have recently started contributing to open source.

thamara commented 1 month ago

Hi, this is being handled in #1080. Thanks anyway!