Skip to content

Commit

Permalink
simplify Windows titlebar color
Browse files Browse the repository at this point in the history
  • Loading branch information
samthor committed Jun 18, 2018
1 parent 131234a commit be4adea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 29 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pwacompat",
"version": "2.0.4",
"version": "2.0.5",
"description": "library to bring Web App Manifest contents to non-compliant browsers",
"main": "pwacompat.min.js",
"module": "pwacompat.js",
Expand Down
27 changes: 2 additions & 25 deletions pwacompat.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,31 +255,8 @@
console.debug('found Windows, could not fetch titleBar')
return;
}

const foreground = colorToWindowsRGBA(themeIsLight ? 'black' : 'white');
const background = colorToWindowsRGBA(color);

t.foregroundColor = foreground;
t.backgroundColor = background;

t.buttonForegroundColor = foreground;
t.buttonBackgroundColor = background;

t.inactiveForegroundColor = foreground;
t.inactiveBackgroundColor = background;

t.buttonInactiveForegroundColor = foreground;
t.buttonInactiveBackgroundColor = background;

// TODO(samthor): Left out for now to determine Windows defaults.
// t.buttonHoverForegroundColor = background; // inverted
// t.buttonHoverBackgroundColor = foreground;
//
// t.buttonPressedForegroundColor = background; // inverted
// t.buttonPressedBackgroundColor = foreground;
//
// t.buttonInactiveHoverForegroundColor = background; // inverted
// t.buttonInactiveHoverBackgroundColor = foreground;
t.foregroundColor = colorToWindowsRGBA(themeIsLight ? 'black' : 'white');
t.backgroundColor = colorToWindowsRGBA(color);
}
}

Expand Down
6 changes: 3 additions & 3 deletions pwacompat.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit be4adea

Please sign in to comment.