Skip to content

VSCode not following dark theme on Fedora 36 #146804

Closed

Description

@joeljosedev

I have installed VSCode on Fedora Workstation 36 Beta with the system theme set to Dark mode. However, VSCode does not use dark colours for the window title bar and sub-menus.

image

I took this screenshot on opening VSCode for the first time, and I haven't installed any extensions. The desktop environment is GNOME 42 and I haven't installed any extensions on it either.

VSCode Info

Version: 1.66.0
Commit: e18005f0f1b33c29e81d732535d8c0e47cafb0b5
Date: 2022-03-30T05:50:41.156Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Linux x64 5.17.1-300.fc36.x86_64

OS Info

NAME="Fedora Linux"
VERSION="36 (Workstation Edition Prerelease)"
ID=fedora
VERSION_ID=36
VERSION_CODENAME=""
PLATFORM_ID="platform:f36"
PRETTY_NAME="Fedora Linux 36 (Workstation Edition Prerelease)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=36
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=36
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Activity

  1. aeschli commented on Apr 5, 2022

    @aeschli
    Contributor

    It depends if Electron supports dark/light mode for that distro.
    To get more information

    • git clone https://github.com/aeschli/electron-theme-test.git
    • cd electron-theme-test, npm i && npm start
    • a simple electron window opens
    • switch between light an dark in the OS an let me know how the Electron window looks like and what's printed to the terminal

    image

  2. added
    info-needed
    on Apr 5, 2022
  3. joeljosedev commented on Apr 5, 2022

    @joeljosedev
    ContributorAuthor

    I have cloned your repo, installed all dependencies and executed the start script. The window isn't following the system theme either.

    image

    Terminal output

    > [email protected] start
    > electron-forge start
    
    ✔ Checking your system
    ✔ Locating Application
    ✔ Preparing native dependencies
    ✔ Launching Application
    shouldUseDarkColors: false, shouldUseHighContrastColors: false, shouldUseInvertedColorScheme: false
    (node:9548) UnhandledPromiseRejectionWarning: TypeError: systemPreferences.getColor is not a function
        at showInfo (/home/joel/Documents/GitHub/electron-theme-test/main.js:28:38)
        at /home/joel/Documents/GitHub/electron-theme-test/main.js:35:3
    (Use `electron --trace-warnings ...` to show where the warning was created)
    (node:9548) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
    shouldUseDarkColors: false, shouldUseHighContrastColors: false, shouldUseInvertedColorScheme: false
    libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
    [9580:0405/163223.323933:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
    [9580:0405/163229.989177:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
    [9580:0405/163232.232303:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
    [9580:0405/163237.803082:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
    
  4. aeschli commented on Apr 5, 2022

    @aeschli
    Contributor

    Ok, the getColor call is not supported, but that's not important. I pushed a change to remove that call.
    Please do a git pull and try again

    • cd electron-theme-test, git pull , npm i && npm start
  5. joeljosedev commented on Apr 6, 2022

    @joeljosedev
    ContributorAuthor

    Ok Martin Aeschlimann (@aeschli), I've pulled your commit, installed all dependencies and run the start script.

    image

    Terminal output

    > [email protected] start
    > electron-forge start
    
    ✔ Checking your system
    ✔ Locating Application
    ✔ Preparing native dependencies
    ✔ Launching Application
    shouldUseDarkColors: false, shouldUseHighContrastColors: false, shouldUseInvertedColorScheme: false
    shouldUseDarkColors: false, shouldUseHighContrastColors: false, shouldUseInvertedColorScheme: false
    libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
    [4553:0406/110408.146875:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.
    [4553:0406/110412.166946:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
    [4553:0406/110449.772046:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
    [4553:0406/110449.783890:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
    
  6. aeschli commented on Apr 6, 2022

    @aeschli
    Contributor

    Thanks a lot. So yes, that confirms that Electron doesn't support OS themes on this platform.

    I filed electron/electron#33635. Please subscribe to that issue and provide more information there if you have anything more.

  7. vscode-triage-bot commented on Apr 13, 2022

    @vscode-triage-bot

    This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

    Happy Coding!

  8. garyvdm commented on May 11, 2022

    @garyvdm

    I was able fix in the following way:

    • Install gnome-tweaks
    • Tweaks -> Appearance -> Themes, Legacy Application -> Select Dark theme
  9. locked and limited conversation to collaborators on May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

info-needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions