Skip to content
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

Support Dark Mode #407

Open
wayne-zhang opened this issue Jun 28, 2023 · 5 comments
Open

Support Dark Mode #407

wayne-zhang opened this issue Jun 28, 2023 · 5 comments

Comments

@wayne-zhang
Copy link
Contributor

Most of 'modern' applications supports application controlled/configured dark mode, such as Notepad++, Eclipse, Intellij IDEA. Notepad Next should support dark mode too.

Qt dark mode support for Windows has some issues but there are third party Qt dark mode support such as QDarkStyleSheet: https://github.com/ColinDuquesnoy/QDarkStyleSheet. I have done some investigation on QDarkStyleSheet, it seems possible to implement dark mode based on QDarkStyleSheet. I have tested it on Linux and the result is positive (I have trouble to install Qt on Windows and can't build Notepad Next on/for Windows, proxy issue).

I can contribute on the dark mode implementation

@inkydragon
Copy link
Contributor

I can contribute on the dark mode implementation

Go ahead and open a pr.

I guess it's fine to implement features for only some platforms.
After all, not everyone has devices for all platforms.

And I can test the build on windows.

xref: #288

@dail8859
Copy link
Owner

Dark mode is definitely desired but has been low on my list of priorities, especially since it is a relatively independent feature.

I think for now just the UI elements is worth focusing on. Having a dark theme for the language styles is a whole separate discussion because I think there are improvements to be made that would make implementing a dark style/theme much easier.

@wayne-zhang
Copy link
Contributor Author

Hi @dail8859, I have almost completed it, testing and change the language theme now. I don't know text colors (both background for foreground) before, it took me several days to find it finally. I have tried a lots to fix the issue why text color doesn't take effect by set default background/foreground (STYLE_DEFAULT).

I used different language folders (languages/dark) for the dark mode language themes, it's flexible to make it doesn't impact light/default theme. It can migrate to the your new language theme framework when it's ready.

Also, a question, how to build on MacOS? I hasn't found the document yet. I can build and test MacOS as I am working on MacOS ARM64 (with Linux VM). I have a Windows ARM VM too but haven't tested if Visual Studio works on Windows ARM yet.

@inkydragon
Copy link
Contributor

how to build on MacOS?

runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.config.qt_version }}
modules: ${{ matrix.config.modules }}
- name: Compile
run: |
mkdir build
cd build
qmake ../src/NotepadNext.pro
make -j$(sysctl -n hw.ncpu)
- name: Build DMG
run: |
cd build
make dmg

@wayne-zhang
Copy link
Contributor Author

I have implemented dark mode, both UI, editors and languages (Lua configuration).

Dark mode change requires application restart to take effect at the moment, will try to do enhancement without application bounce in the future.

Tested on Linux ARM64 and MacOS ARM64, haven't tested it on Windows.

I have created a PR, please review and test it on Windows.

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

No branches or pull requests

3 participants