Massive UI in VSCode 1.98

Is anybody else experiencing an absolutely massive UI in VSCode between versions 1.98.0 and 1.99.3? I can change the zoom level, but I can’t find any way to make the title bar smaller.

I’m on NixOS unstable with XFCE, with a separate home-manager install. As a workaround for now, I’ve just downgraded VSCode to 1.97.2. Here’s my home-manager flake, in case it’s useful to anybody else:

{
  description = "Home Manager configuration of zan";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    # ranger 1.9.4 crashes on :bulkrename
    # nixpkgs e89cf1c932006531f454de7d652163a9a5c86668
    #   ranger 1.9.3
    nixpkgs-ranger.url = "github:nixos/nixpkgs/e89cf1c932006531f454de7d652163a9a5c86668";
    # vscode 1.98.0 has huge UI
    # nixpkgs 2d068ae5c6516b2d04562de50a58c682540de9bf
    #   vscode 1.97.2
    nixpkgs-vscode.url = "github:nixos/nixpkgs/2d068ae5c6516b2d04562de50a58c682540de9bf";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, nixpkgs-ranger, nixpkgs-vscode, home-manager, ... }:
    let
      system = "x86_64-linux";
      pkgs-vscode = import nixpkgs-vscode {
        inherit system;
        config.allowUnfree = true;
      };
      overlays = [
        (final: prev: {
          ranger = nixpkgs-ranger.legacyPackages.${system}.ranger;
          vscode = pkgs-vscode.vscode;
        })
      ];
      pkgs = import nixpkgs {
        inherit overlays;
        inherit system;
      };
    in {
      homeConfigurations."zan" = home-manager.lib.homeManagerConfiguration {
        inherit pkgs;

        # Specify your home configuration modules here, for example,
        # the path to your home.nix.
        modules = [ ./home.nix ];

        # Optionally use extraSpecialArgs
        # to pass through arguments to home.nix
      };
    };
}

Seems to be to do with respecting environment variables:

VSCode 1.97.2

  • Respects GDK_SCALE
  • Respects GDK_DPI_SCALE

VSCode 1.98.0

  • Respects GDK_SCALE
  • Doesn’t respect GDK_DPI_SCALE

Found a vscode github issue for this: Regression: GDK_SCALE and GDK_DPI_SCALE environment variables are ignored · Issue #242970 · microsoft/vscode · GitHub

This is an issue with Chromium, which means it’s also an issue with electron and vscode. There’s no need to downgrade, it just needs the command line argument --force-device-scale-factor=2, similar to the fix for Chrome.

I’ve changed my home-manager flake output to something like this:

let
  system = "x86_64-linux";
  overlays = [
    (final: prev: {
      vscode = prev.vscode.override {
        commandLineArgs = "--force-device-scale-factor=2";
      };
    })
  ];
  pkgs = import nixpkgs {
    inherit overlays;
    inherit system;
  };
in {
  ...
};