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

Dark themes are not dark #109

Closed
arkenoi opened this issue Jun 6, 2019 · 18 comments
Closed

Dark themes are not dark #109

arkenoi opened this issue Jun 6, 2019 · 18 comments

Comments

@arkenoi
Copy link

arkenoi commented Jun 6, 2019

Expected vs. actual behavior

When you select a "dark" theme, only note text gets dark background. The menus are still black on white.

Specifications

@robert7
Copy link
Owner

robert7 commented Jun 6, 2019

Actually this works with some limitations.
See https://github.com/robert7/nixnote2/wiki/NixNote-Themes

@robert7 robert7 closed this as completed Jun 6, 2019
@arkenoi
Copy link
Author

arkenoi commented Jun 6, 2019

I am on Fedora, it is natively packaged and still does not work :-(

@robert7
Copy link
Owner

robert7 commented Jun 7, 2019

See wiki article - you need to find a way how to switch Qt into dark mode. Then Nixnote will be dark. Nixnote itself will not change the colors except for the note editor (html text).
See e.g. this link - https://www.linuxuprising.com/2018/05/get-qt5-apps-to-use-native-gtk-style-in.html
No idea what window manager you have and what configuration it may need.

Of course if someone will be willing to improve this, then pull request are welcome as always, but I don't have any time to improve it. So it is a "feature" how it is now..

@arkenoi
Copy link
Author

arkenoi commented Jun 7, 2019

I have adwaita-qt in place, maybe it needs more configuration tweaks.

@arkenoi
Copy link
Author

arkenoi commented Jun 7, 2019

QT_QPA_PLATFORMTHEME=qt5ct did it.

@Luvideria Luvideria mentioned this issue Jul 3, 2019
@luisgmuniz
Copy link

Fully working in Fedora 31:

$ sudo yum install -y kvantum
$ echo "QT_STYLE_OVERRIDE=kvantum" >> $HOME/.profile

Then, logout & login again.

(Some other Qt5 apps, like VLC, also changed the style, whereas others like Calibre or VirtualBox seems unaffected)

@robert7
Copy link
Owner

robert7 commented May 15, 2020

OK. Thanks for info

@vitaly-zdanevich
Copy link

vitaly-zdanevich commented Mar 27, 2023

In my ~/.bashrc I already have this:

export QT_STYLE_OVERRIDE=adwaita-dark

Also tried QT_STYLE_OVERRIDE=adwaita-dark nixnote

QT_QPA_PLATFORMTHEME=qt5ct nixnote

And no success with QT_STYLE_OVERRIDE=kvantum

And Wireshark (another QT app) became dark, but no the NixNote, in AppImage :(

And I cannot use ebuild without additional Gentoo overlay, because qt-webkit is not exists in Gentoo anymore :(

@boo-yee please, maybe you can fix something about dark theme in AppImage, and/or switch from qt-webkit to a modern qt-webengine?

@boo-yee
Copy link

boo-yee commented Apr 2, 2023

In my ~/.bashrc I already have this:

export QT_STYLE_OVERRIDE=adwaita-dark

Also tried QT_STYLE_OVERRIDE=adwaita-dark nixnote

QT_QPA_PLATFORMTHEME=qt5ct nixnote

And no success with QT_STYLE_OVERRIDE=kvantum

And Wireshark (another QT app) became dark, but no the NixNote, in AppImage :(

And I cannot use ebuild without additional Gentoo overlay, because qt-webkit is not exists in Gentoo anymore :(

@boo-yee please, maybe you can fix something about dark theme in AppImage, and/or #179?

@vitaly-zdanevich
darktheme.txt

You could append this attached text file's content which contains a new theme to the themes.ini file located in your app image folder first, and switch to some other theme, and switch to this new theme. Finally reboot Nixnote, then it will work. (On my machine, I have to switch to some other theme first, otherwise it will not be displayed normally.)

I set the main color to #939393(grey), you can change it as needed. No third party tool or other setting needed.

theme

@vitaly-zdanevich
Copy link

vitaly-zdanevich commented Apr 2, 2023

app image folder

Where is it?

themes.ini

I did a search on my machine - this file not exists.

@boo-yee
Copy link

boo-yee commented Apr 2, 2023

I did a search on my machine - this file not exists.

squash-root/usr/share/nixnote/themes.ini

@vitaly-zdanevich
Copy link

squash-root

There is no such folder in /

@boo-yee
Copy link

boo-yee commented Apr 2, 2023

squash-root

There is no such folder in /

Not in root, squash-root is the folder name of your AppImage after it is unzipped.

@vitaly-zdanevich
Copy link

after it is unzipped

and I will need to run another executable, from that unzipped folder?

@boo-yee
Copy link

boo-yee commented Apr 3, 2023

after it is unzipped

and I will need to run another executable, from that unzipped folder?

Sorry, I made a mistake, it is squashfs-root instead of squash-root, it is the foder where the executable(AppRun) is located.

Maybe you using the AppImage by mounting it without unzipping? If so, you have to unzip it first:
Nixnote2_x86_64.AppImage --appimage-extract
Then you will get the squashfs-root foder, and themes.ini is located in squashfs-root/usr/share/nixnote2.

After appending, run Nixnote by executing the AppRun, follow the instructions above, it will load the themes.

@vitaly-zdanevich
Copy link

Hm, is it a recommended way to use AppImage software - to extract it first? Maybe my Gentoo ebuild should unpack it on install...

@boo-yee
Copy link

boo-yee commented Apr 4, 2023

Hm, is it a recommended way to use AppImage software - to extract it first? Maybe my Gentoo ebuild should unpack it on install...

If so, your search for themes.ini should have succeeded. If you dislike this way, you might want to wait for the next release

@boo-yee
Copy link

boo-yee commented Apr 5, 2023

Hm, is it a recommended way to use AppImage software - to extract it first? Maybe my Gentoo ebuild should unpack it on install...

There is another way now: 1. unzip 2. append the new theme 3. re-package the squshfs-root folder as AppImage.

The package tool link: appimagetool
The package command is:
appimagetool-x86_64.AppImage squashfs-root NewAppImageName-x86_64.AppImage

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

5 participants