mcuntz / ncvue

A minimal GUI for a quick view of netcdf files. Aiming to be a drop-in replacement for ncview.
https://mcuntz.github.io/ncvue/
Other
68 stars 5 forks source link

MacOS darkmode not supported #4

Closed StephanThober closed 10 months ago

StephanThober commented 2 years ago

Hi Matthias,

thanks for putting this great tool together. I use MacOS dark-mode by default, but in ncvue, the button colors are not changed correctly, i.e., ncvue shows white symbols on white background, see screenshot attached. Did I set something not correctly or is this an issue?

Best, Stephan

Screenshot 2022-05-10 at 14 18 38
mcuntz commented 2 years ago

Thanks @StephanThober

This is strange because this always worked for me on Mac (see below).

What macOS version, Python version and matplotlib version are you using:

uname -r
python --version
python -c "import matplotlib as mpl ; print(mpl.__version__)"

Note that I also install a new Tcl/Tk when setting up a new macOS. Search for "tcl" in https://github.com/mcuntz/setup_mac. Try to install version 8.6 if your macOS comes with 8.5: python -c "import tkinter as tk ; print(tk.TkVersion)" My best bet is actually that you use an old Tcl/Tk version.

Kind regards, Matthias

Screen Shot 2022-05-10 at 16 56 37

StephanThober commented 2 years ago

Hi Matthias,

thanks for the fast reply. Here is the info from the command line:

uname -r
21.4.0
python --version
Python 3.10.4
python -c "import matplotlib as mpl ; print(mpl.__version__)"
3.5.2
python -c "import tkinter as tk ; print(tk.TkVersion)"
8.6

So this looks fine, doesn't it? I followed the conda install. There TCL seems to be not installed, only TK. I am not sure if this is an issue. If I try to install this package https://anaconda.org/intel/tcl , then conda runs into conflicts :(. Does the darkmode work for you in a conda environment?

Thanks, Stephan

mcuntz commented 2 years ago

Hey @StephanThober ,

I simply don't know if there are different widgets of the Navigation bar for Light mode and for Dark mode. Could you try the following please:

Then ncvue changes to Dark Mode as well.

Another thing is how you actually install Python, not a virtual environment with conda, e.g. I use Tcl/Tk from homebrew brew install tcl-tk And then I use it when installing Python itself

env PYTHON_CONFIGURE_OPTS="--with-tcltk-includes='-I${HOMEBREW_PREFIX}/opt/tcl-tk/include' \
    --with-tcltk-libs='-L${HOMEBREW_PREFIX}/opt/tcl-tk/lib -ltcl8.6 -ltk8.6' \
    --enable-framework" \
    CFLAGS="-I$(brew --prefix xz)/include" LDFLAGS="-L$(brew --prefix xz)/lib" \
    PKG_CONFIG_PATH="$(brew --prefix xz)/lib/pkgconfig" \
    pyenv install 3.9.9

Any virtual environement uses this tagged Python then.

I do not know how to do it with the anaconda command line installer. Of course, if you'd use pyenv to install anaconda or miniconda ... ;-)

StephanThober commented 2 years ago

Hi Matthias,

if I start ncvue in light mode and switch to dark mode, the issue persists.

I will try your way of installation and get back to you then. Thank you for your help!