Use native dark theme titlebar on Windows
This commit is contained in:
parent
b574ba531d
commit
23e3883ce0
43 changed files with 152 additions and 965 deletions
|
@ -22,7 +22,6 @@ function createIsPlatform(
|
|||
export type OSType = {
|
||||
getClassName: () => string;
|
||||
getName: () => string;
|
||||
hasCustomTitleBar: () => boolean;
|
||||
isLinux: (minVersion?: string) => boolean;
|
||||
isMacOS: (minVersion?: string) => boolean;
|
||||
isWindows: (minVersion?: string) => boolean;
|
||||
|
@ -33,10 +32,6 @@ export function getOSFunctions(osRelease: string): OSType {
|
|||
const isLinux = createIsPlatform('linux', osRelease);
|
||||
const isWindows = createIsPlatform('win32', osRelease);
|
||||
|
||||
// Windows 10 and above
|
||||
const hasCustomTitleBar = (): boolean =>
|
||||
isWindows('10.0.0') || Boolean(process.env.CUSTOM_TITLEBAR);
|
||||
|
||||
const getName = (): string => {
|
||||
if (isMacOS()) {
|
||||
return 'macOS';
|
||||
|
@ -60,7 +55,6 @@ export function getOSFunctions(osRelease: string): OSType {
|
|||
return {
|
||||
getClassName,
|
||||
getName,
|
||||
hasCustomTitleBar,
|
||||
isLinux,
|
||||
isMacOS,
|
||||
isWindows,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue