fix: add more changes for base

This commit is contained in:
helmisek 2024-09-19 02:03:31 +02:00
parent b07fbd627a
commit b638e890d5
No known key found for this signature in database
GPG key ID: 5DAEE2C2E5B20A63
3 changed files with 4 additions and 22 deletions

View file

@ -136,6 +136,6 @@ export function isWCOEnabled(): boolean {
// Returns the bounding rect of the titlebar area if it is supported and defined
// See docs at https://developer.mozilla.org/en-US/docs/Web/API/WindowControlsOverlay/getTitlebarAreaRect
export function getWCOBoundingRect(): DOMRect | undefined {
return (navigator as any)?.windowControlsOverlay?.getTitlebarAreaRect();
export function getWCOTitlebarAreaRect(targetWindow: Window): DOMRect | undefined {
return (targetWindow.navigator as any)?.windowControlsOverlay?.getTitlebarAreaRect();
}

View file

@ -11,7 +11,7 @@ import { $ } from 'vs/base/browser/dom';
import { IHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegate';
import { Button } from 'vs/base/browser/ui/button/button';
import { DisposableMap, DisposableStore } from 'vs/base/common/lifecycle';
import { getDefaultHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
import { createInstantHoverDelegate } from 'vs/base/browser/ui/hover/hoverDelegateFactory';
export interface IRadioStyles {
readonly activeForeground?: string;
@ -53,7 +53,7 @@ export class Radio extends Widget {
constructor(opts: IRadioOptions) {
super();
this.hoverDelegate = opts.hoverDelegate ?? getDefaultHoverDelegate('element');
this.hoverDelegate = opts.hoverDelegate ?? this._register(createInstantHoverDelegate());
this.domNode = $('.monaco-custom-radio');
this.domNode.setAttribute('role', 'radio');

View file

@ -217,24 +217,6 @@ export interface FileFilter {
name: string;
}
export interface OpenDevToolsOptions {
/**
* Opens the devtools with specified dock state, can be `left`, `right`, `bottom`,
* `undocked`, `detach`. Defaults to last used dock state. In `undocked` mode it's
* possible to dock back. In `detach` mode it's not.
*/
mode: ('left' | 'right' | 'bottom' | 'undocked' | 'detach');
/**
* Whether to bring the opened devtools window to the foreground. The default is
* `true`.
*/
activate?: boolean;
/**
* A title for the DevTools window (only in `undocked` or `detach` mode).
*/
title?: string;
}
interface InputEvent {
// Docs: https://electronjs.org/docs/api/structures/input-event