microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
161.63k stars 28.4k forks source link

Support `window.activeBorder` natively #153222

Open MikeTheGreat opened 2 years ago

MikeTheGreat commented 2 years ago

Issue Type: Bug

Does this issue occur when all extensions are disabled?: Yes

Windows 11 has these snazzy new rounded borders that are interfering with the window.activeBorder setting in settings.json.

Back on Windows 10 these settings worked fine: my window's border was set to the color indicated.

workbench.colorCustomizations": {
        // Default border windows (since I mostly like dark themes)
        "window.activeBorder": "#66ffff",
        "window.inactiveBorder": "#fcfcfc",
        // Some dark/light window borders, in case I delete/lose the above ones:
        "[Solarized Dark]": {
            "window.activeBorder": "#66ffff",
            "window.inactiveBorder": "#fcfcfc"
        },
        "[Solarized Light]": {
            "window.activeBorder": "#000000",
            "window.inactiveBorder": "#737373"
        },
        "[Base16 Ocean Deep]": {
            "editorError.background": "#7c0b0b8c",
            "editorError.foreground": "#ffffff"
        }
    },

On Windows 11 VSCode is trying to set the border color, but Win11's rounded window edges appear to be obscuring it in an unpredictable pattern:

To reproduce: 1) edit settings.json to include the above snippet. 2) Resize the window to make it smaller 3) Notice that the window borders are NOT the indicated color image

4) Resize the window to make it bigger 5) Notice that the window border DOES change, but only on the bottom and right edges: image

Here's an animated gif showing the unpredictable nature of the border-hiding:

activeWindow_border_bug

VS Code version: Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-14T12:48:58.283Z) OS version: Windows_NT x64 10.0.22000 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 1805)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.73GB (18.68GB free)| |Process Argv|--crash-reporter-id 6eb40b8f-3477-4175-8780-b523dc07d617| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vslsvsres303:30308271 pythonvspyl392:30443607 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 pythondataviewer:30285071 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 vscscmwlcmt:30465135 cppdebug:30492333 vsclangdc:30486549 ```
bpasero commented 2 years ago

I think in order to fix this we should start thinking about a native solution that works across all OS and does not suffer from DPI scaling issues.

Related issues:

MikeTheGreat commented 2 years ago

Quick Note: This does appear to work correctly on Mac (12.4)

schoebey commented 1 month ago

still no resolution to this apart from the workaround with setting the window title bar style to 'native'? How does MS teams do it? Teams doesn't feature a native title bar, yet the border is drawn just like in native windows (though the top border is missing there...).