-
Notifications
You must be signed in to change notification settings - Fork 41
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
Sublime Text disrespect OS dark mode for its title bar in GNOME 44 #5966
Comments
I experience the same issue where the color scheme does not follow the OS settings. I'm using KDE on Arch Linux as well. I wrote a plugin which solves this by making use of dbus and the xdg-portal-api. It's still awaiting approval. It's my first time writing a plugin, so any suggestions would be welcome. |
Server-side window decorations under GNOME/GTK3 have the following behavior: When the ST theme is light (eg. the Default theme) and the GNOME is light then the title bar is light. When either ST or GNOME are dark then the title bar is also dark. This is under GNOME 45 and working as expected. My guess is the theme you're using is not configured to be a dark theme, which theme are you using? |
TL;DR: You are correct - it seems to be caused by the custom theme that I am using (ayu-mirage). Hey @BenjaminSchaaf, I wanted to clarify something following your comments. Initially, I had my operating system set to dark mode, as mentioned in my issue title and the steps to reproduce the problem. Your feedback made me revisit my report. You stated:
I hadn't considered this before, but I use a custom theme, My understanding of how themes interact with Sublime Text is limited. If the title bar color is, in fact, determined by the theme, then my bug report might be invalid and should be closed. However, if themes are supposed to default to a setting provided by Sublime Text (as suggested by your statement "when either ST or GNOME are dark then the title bar is also dark") and that mechanism is failing, there could still be an underlying issue to address. Disclaimer: (this response was created with the help of ChatGPT) |
Whether the title bar is themed as dark is determined by the theme, eg:
So yea this issue is invalid. |
Description of the bug
Cheers!
I am using Linux with GNOME 44 and Wayland. I have the
gtk_client_side_window_decorations
option set tofalse
. Judging from the name of the option, I would assume that sublime would use server-side window decorations from now on, but this doesn't seem to be the case (although I am not really an expert in that domain).From what I understand, GNOME 44 uses GTK4 to render the default window decorations for applications that do not have client side decorations (used to be GTK3). And I can verify that this is the case for numerous apps (including, e.g., Thunderbird and VS code).
However, Sublime Text seems to continue to be using client side decorations. At least from what I see, the title bar is rendered as part of the application (and not applied by gnome-shell/mutter) and it also seems to (continue) to use GTK 3. This is essentially fine, if it wasn't for a regression that causes the title bar to ignore the operating systems dark-theme setting.
This is how the titlebar of Sublime Text is now rendered (since the GNOME 44 upgrade):
![Screenshot from 2023-05-10 10-36-09](https://private-user-images.githubusercontent.com/3457747/237329147-3fc5ba26-9c7f-4307-a7d4-e7a2f577cb05.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MDM4MDEsIm5iZiI6MTczODkwMzUwMSwicGF0aCI6Ii8zNDU3NzQ3LzIzNzMyOTE0Ny0zZmM1YmEyNi05YzdmLTQzMDctYTdkNC1lN2EyZjU3N2NiMDUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDQ0NTAxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjgwMzQzN2I5NjdkNmViMDM4ZjM2YzU2ZjVkYzljODYwOTdjODkwNjI0ZGJhMzlkNTYwZmVkNGI5YzY4NDVmMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.d7ig3bLoPb5DAeuES-6tIGeC3HOamFbyt-IAHSkYtiA)
And this is how it used to be rendered (simulated by enabling the
![Screenshot from 2023-05-10 10-36-13](https://private-user-images.githubusercontent.com/3457747/237329150-de0df333-a28e-40d8-b936-95b5221f922a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MDM4MDEsIm5iZiI6MTczODkwMzUwMSwicGF0aCI6Ii8zNDU3NzQ3LzIzNzMyOTE1MC1kZTBkZjMzMy1hMjhlLTQwZDgtYjkzNi05NWI1MjIxZjkyMmEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDQ0NTAxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmY1OWQ3NzlkMzc3OTFjZWUzOTdmMjhjYzYxMDQyOWY5ZGMwYjg0MTIyNGZlZmYzNGJiMDgwMDViZWZmYjg2YSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.RBDPiuosvLo6oCrhklAxdmDbIizZ7BphA2KFvk8apOA)
dark variant
toggle):(FYI: I've started Subnlime via
GTK_DEBUG=interactive subl
for the screenshots above)Steps to reproduce
Settings > Appearance > Style: Dark
"gtk_client_side_window_decorations": false
Expected behavior
Title bar should respect OS dark mode setting.
Actual behavior
Title bar is always rendered in "light" theme.
Sublime Text build number
4143
Operating system & version
ArchLinux
(Linux) Desktop environment and/or window manager
Gnome
Additional information
No response
OpenGL context information
No response
The text was updated successfully, but these errors were encountered: