Skip to content

Commit

Permalink
[1155] Adjust colors and add accent on the selected icon
Browse files Browse the repository at this point in the history
Bug: #1155
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
  • Loading branch information
pcdavid committed Apr 15, 2022
1 parent 4dc1b46 commit 354df1a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
6 changes: 5 additions & 1 deletion frontend/src/theme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2021 Obeo.
* Copyright (c) 2021, 2022 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand All @@ -13,6 +13,10 @@
import { createTheme, responsiveFontSizes } from '@material-ui/core/styles';

const fallbackTheme = createTheme({
navigation: {
leftBackground: '#BE1A7880',
rightBackground: '#261E5880',
},
typography: {
h1: {
fontSize: '4rem',
Expand Down
17 changes: 12 additions & 5 deletions frontend/src/workbench/Site.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,17 @@ const useSiteStyles = makeStyles((theme) => ({
background: theme.navigation.rightBackground,
},
viewSelectorIcon: {
color: theme.palette.common.white,
color: theme.palette.text.disabled,
},
viewSelectorIconSelected: {
color: theme.palette.secondary.main,
viewSelectorIconSelectedLeft: {
color: theme.palette.primary.main,
borderLeft: 'solid 2px',
borderRadius: 0,
},
viewSelectorIconSelectedRight: {
color: theme.palette.primary.main,
borderRight: 'solid 2px',
borderRadius: 0,
},
viewIcon: {
padding: theme.spacing(1),
Expand All @@ -59,7 +66,6 @@ const useSiteStyles = makeStyles((theme) => ({
flexGrow: 1,
display: 'flex',
flexDirection: 'column',
overflow: 'auto',
},
viewHeader: {
display: 'flex',
Expand Down Expand Up @@ -87,7 +93,8 @@ export const Site = ({ editingContextId, selection, setSelection, readOnly, side
const icon = contribution.props.icon;
let iconClassName = classes.viewSelectorIcon;
if (index === selectedViewIndex) {
iconClassName = classes.viewSelectorIconSelected;
iconClassName =
side === 'left' ? classes.viewSelectorIconSelectedLeft : classes.viewSelectorIconSelectedRight;
}
return (
<Tooltip enterDelay={250} title={title} key={index} className={classes.viewIcon}>
Expand Down

0 comments on commit 354df1a

Please sign in to comment.