Simulink colors inconsistent with dark desktop color scheme

19 visualizzazioni (ultimi 30 giorni)
I'm using Matlab 2019b on Linux. My desktop color scheme is dark (KDE/Qt), so mostly light text on dark background. Simulink tries to match that for parts of the user interface, which is nice, but it doesn't get it quite right. I get light text on light background and dark text on dark background in some places, which is near unreadable or entirely unreadable (see screenshot, notice the search box, the dropdown menu with search results as well as the navigation bars on top and left of the canvas).
I don't really care too much whether simulink matches my desktop colors or not, but I don't want to change my desktop colors and I would like readable text in Simulink. Simulink appears to have no color scheme settings and is unaffected by color scheme settings in MATLAB.
  3 Commenti
Malte Eggers
Malte Eggers il 1 Set 2022
Spostato: Adam Danz il 15 Mag 2024
No.
2022a has the same issue.
Loïc Alexandre
Loïc Alexandre il 8 Ott 2023
Spostato: Adam Danz il 15 Mag 2024
Still the same problem for me with matlab 2023b. Have you found a solution ?

Accedi per commentare.

Risposte (1)

Franklin Ronald
Franklin Ronald il 15 Mag 2024
Hi.
I'm using environment variables to set a light theme to MATLAB only.
XDG_CURRENT_DESKTOP=GNOME
GTK_THEME=Adwaita:light
And Simulink is light but usable.
  2 Commenti
Devin
Devin il 18 Mar 2025
Hi all,
This fix does work great but if you launch MATLAB through the GUI like I do you can apply this fix permanetly by editing MATLAB's .desktop file.
Find MATLAB’s .desktop file (Usually in /usr/share/applications/matlab.desktop or ~/.local/share/applications/matlab.desktop).
Edit it using a text editor:
nano ~/.local/share/applications/matlab.desktop
Find the line starting with Exec= and modify it like this:
Exec=env XDG_CURRENT_DESKTOP=GNOME GTK_THEME=Adwaita:light matlab -desktop
depending on how your .desktop is set up it may be the directory to the MATLAB launcher and in that case, put
env XDG_CURRENT_DESKTOP=GNOME GTK_THEME=Adwaita:light
before the dierctory like so.
Exec=env XDG_CURRENT_DESKTOP=GNOME GTK_THEME=Adwaita:light /usr/local/MATLAB/R2024b/bin/matlab -desktop
Save and exit, then refresh the desktop database:
update-desktop-database ~/.local/share/applications
Now, MATLAB should always launch with these environment variables, even from the GUI.
Martino
Martino il 3 Giu 2025
Hello, I can confirm that the issue is still present on Fedora 42 (KDE 6.3.5) with MATLAB 2025a.
Forcing the default Gnome GTK theme for MATLAB by adding these environment variables to the .desktop file is still a good workaround
XDG_CURRENT_DESKTOP=GNOME GTK_THEME=Adwaita:light
(although we shouldn't still need to use a workaround after 5 years of this issue being reported).

Accedi per commentare.

Categorie

Scopri di più su Interactive Model Editing in Help Center e File Exchange

Prodotti


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by