Skip to content

Commit

Permalink
Enable color for dark mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerd Müller committed Sep 21, 2023
1 parent c47e70c commit 1916280
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/MinimalWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class MinimalWindow extends Component {
}}
aria-label={label && ariaLabel ? t('window', { label }) : null}
>
<AppBar position="relative" color="default">
<AppBar position="relative" color="default" enableColorOnDark>
<Toolbar
disableGutters
className={cn(ns('window-top-bar'))}
Expand Down
8 changes: 7 additions & 1 deletion src/components/MiradorMenuButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ export function MiradorMenuButton(props) {
} = props;

const button = (
<IconButton {...iconButtonProps} size="large">
<IconButton
{...iconButtonProps}
sx={{
fill: 'currentcolor',
}}
size="large"
>
{badge
? (
<Badge
Expand Down
2 changes: 1 addition & 1 deletion src/components/WindowCanvasNavigationControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class WindowCanvasNavigationControls extends Component {
return (
<Paper
square
sx={theme => ({
sx={(theme) => ({
backgroundColor: alpha(theme.palette.background.paper, 0.5),
bottom: 0,
cursor: 'default',
Expand Down
8 changes: 4 additions & 4 deletions src/components/WindowSideBarButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function TabButton({ t, value, ...tabProps }) {
sx={{
'&.Mui-selected': {
borderRight: '2px solid',
borderRightColor: 'primary?.main',
borderRightColor: 'primary.main',
},
'&.MuiTab-root': {
'&:active': {
Expand Down Expand Up @@ -149,7 +149,7 @@ export class WindowSideBarButtons extends Component {
onKeyUp={this.handleKeyUp}
t={t}
icon={(
<Badge overlap="rectangular" sx={{ backgroundColor: 'notification.main' }} invisible={!hasAnnotations} variant="dot">
<Badge overlap="rectangular" sx={{ '.MuiBadge-badge': { backgroundColor: 'notification.main' } }} invisible={!hasAnnotations} variant="dot">
<AnnotationIcon />
</Badge>
)}
Expand All @@ -161,7 +161,7 @@ export class WindowSideBarButtons extends Component {
onKeyUp={this.handleKeyUp}
t={t}
icon={(
<Badge overlap="rectangular" sx={{ backgroundColor: 'notification.main' }} invisible={!hasSearchResults} variant="dot">
<Badge overlap="rectangular" sx={{ '.MuiBadge-badge': { backgroundColor: 'notification.main' } }} invisible={!hasSearchResults} variant="dot">
<SearchIcon />
</Badge>
)}
Expand All @@ -173,7 +173,7 @@ export class WindowSideBarButtons extends Component {
onKeyUp={this.handleKeyUp}
t={t}
icon={(
<Badge overlap="rectangular" sx={{ backgroundColor: 'notification.main' }} invisible={!hasCurrentLayers} variant="dot">
<Badge overlap="rectangular" sx={{ '.MuiBadge-badge': { backgroundColor: 'notification.main' } }} invisible={!hasCurrentLayers} variant="dot">
<LayersIcon />
</Badge>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/WindowTopBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class WindowTopBar extends Component {
} = this.props;

return (
<AppBar position="relative" color="default">
<AppBar position="relative" color="default" enableColorOnDark>
<nav aria-label={t('windowNavigation')}>
<Toolbar
disableGutters
Expand Down
2 changes: 1 addition & 1 deletion src/components/WorkspaceAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export class WorkspaceAdd extends Component {
right: '0',
})}
>
<AppBar position="absolute" color="primary" onClick={() => (this.setAddResourcesVisibility(false))}>
<AppBar position="absolute" color="primary" enableColorOnDark onClick={() => (this.setAddResourcesVisibility(false))}>
<Toolbar variant="dense">
<StyledMiradorMenuButton
aria-label={t('closeAddResourceForm')}
Expand Down
1 change: 1 addition & 0 deletions src/components/WorkspaceControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class WorkspaceControlPanel extends Component {
})}
className={classNames(ns('workspace-control-panel'))}
color="default"
enableColorOnDark
position="absolute"
component="nav"
aria-label={t('workspaceNavigation')}
Expand Down

0 comments on commit 1916280

Please sign in to comment.