Skip to content

Commit

Permalink
[3578] Fix tooltip and menu visibility in a full screen mode
Browse files Browse the repository at this point in the history
Bug: #3578
Signed-off-by: Denis Nikiforov <[email protected]>
  • Loading branch information
AresEkb committed Sep 20, 2024
1 parent 7d14f99 commit 869968e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ As a result, the following maven modules have been deleted: `sirius-web-sample-a
- https://github.com/eclipse-sirius/sirius-web/issues/3920[#3920] [form] Fix DateTime widget default style not set
- https://github.com/eclipse-sirius/sirius-web/issues/3934[#3934] [diagram] Remove helper lines when moving pinned elements
- https://github.com/eclipse-sirius/sirius-web/issues/3907[#3907] [diagram] Fix bad state update in handleNodesChange
- https://github.com/eclipse-sirius/sirius-web/issues/3578[#3578] [diagram] Fix tooltip and menu visibility in a full screen mode

=== New Features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ export const baseTheme: Theme = createTheme({
},
});

function container() {
return document.fullscreenElement ?? document.body;
}

export const siriusWebTheme = createTheme(
{
components: {
Expand All @@ -79,7 +83,17 @@ export const siriusWebTheme = createTheme(
},
},
},
MuiMenu: {
defaultProps: {
container,
},
},
MuiTooltip: {
defaultProps: {
PopperProps: {
container,
},
},
styleOverrides: {
tooltip: {
backgroundColor: baseTheme.palette.common.black,
Expand Down
14 changes: 14 additions & 0 deletions vscode-extension/src/view/app/theme/siriusWebTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ export const baseTheme: Theme = createTheme({
},
});

function container() {
return document.fullscreenElement ?? document.body;
}

export const siriusWebTheme = createTheme(
{
components: {
Expand All @@ -79,7 +83,17 @@ export const siriusWebTheme = createTheme(
},
},
},
MuiMenu: {
defaultProps: {
container,
},
},
MuiTooltip: {
defaultProps: {
PopperProps: {
container,
},
},
styleOverrides: {
tooltip: {
backgroundColor: baseTheme.palette.common.black,
Expand Down

0 comments on commit 869968e

Please sign in to comment.