Skip to content

Commit

Permalink
Updated tooltip / floating menu style to add a border for ease-of-vis…
Browse files Browse the repository at this point in the history
…ibility and accessibility (actualbudget#2779)

Changed:
- /packages/desktop-client/stc/style/style.ts
- /packages/desktop-client/src/components/tooltips.tsx

Updated to include a border:
- color: theme.menuItemBackgroundHover
  - Used this color since its clean and maches the overall theming regardless of color palette
- width: 2px
  - Not too thin, not too thick
- style: solid
  - So it actually displays

Changed color of tooltip to be more "vocal" against the background on all themes

Uses `theme.menuItemTextHeader` color now

Added whole style for 'tooltipXYZ' for each theme to add definition to colors (actualbudget#2779)
  • Loading branch information
VoltaicGRiD committed May 25, 2024
1 parent b803731 commit 4eb0582
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 4 deletions.
7 changes: 5 additions & 2 deletions packages/desktop-client/src/components/tooltips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,12 @@ export class Tooltip extends Component<TooltipProps> {
padding: 5,
width,
...styles.shadowLarge,
borderWidth: 2,
borderRadius: 4,
backgroundColor: theme.menuBackground,
color: theme.menuItemText,
borderStyle: 'solid',
borderColor: theme.tooltipBorder,
backgroundColor: theme.tooltipBackground,
color: theme.tooltipText,
// opacity: 0,
// transition: 'transform .1s, opacity .1s',
// transitionTimingFunction: 'ease-out'
Expand Down
7 changes: 5 additions & 2 deletions packages/desktop-client/src/style/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,12 @@ export const styles = {
tooltip: {
padding: 5,
...shadowLarge,
borderWidth: 2,
borderRadius: 4,
backgroundColor: theme.menuBackground,
color: theme.menuItemText,
borderStyle: 'solid',
borderColor: theme.tooltipBorder,
backgroundColor: theme.tooltipBackground,
color: theme.tooltipText,
overflow: 'auto',
},
// Dynamically set
Expand Down
4 changes: 4 additions & 0 deletions packages/desktop-client/src/style/themes/dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,7 @@ export const reportsBlue = colorPalette.blue400;
export const reportsGreen = colorPalette.green400;
export const reportsLabel = pageText;
export const reportsInnerLabel = colorPalette.navy800;

export const tooltipText = colorPalette.navy100;
export const tooltipBackground = colorPalette.navy600;
export const tooltipBorder = colorPalette.navy400;
4 changes: 4 additions & 0 deletions packages/desktop-client/src/style/themes/development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,7 @@ export const reportsBlue = colorPalette.blue400;
export const reportsGreen = colorPalette.green400;
export const reportsLabel = colorPalette.navy900;
export const reportsInnerLabel = colorPalette.navy800;

export const tooltipText = colorPalette.navy900;
export const tooltipBackground = colorPalette.navy50;
export const tooltipBorder = colorPalette.navy150;
4 changes: 4 additions & 0 deletions packages/desktop-client/src/style/themes/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,7 @@ export const reportsBlue = colorPalette.blue400;
export const reportsGreen = colorPalette.green400;
export const reportsLabel = colorPalette.navy900;
export const reportsInnerLabel = colorPalette.navy800;

export const tooltipText = colorPalette.navy900;
export const tooltipBackground = colorPalette.navy50;
export const tooltipBorder = colorPalette.navy150;
4 changes: 4 additions & 0 deletions packages/desktop-client/src/style/themes/midnight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,3 +193,7 @@ export const reportsBlue = colorPalette.blue400;
export const reportsGreen = colorPalette.green400;
export const reportsLabel = pageText;
export const reportsInnerLabel = colorPalette.navy800;

export const tooltipText = colorPalette.gray100;
export const tooltipBackground = colorPalette.gray600;
export const tooltipBorder = colorPalette.gray400;

0 comments on commit 4eb0582

Please sign in to comment.