Skip to content

Commit

Permalink
fix: Garbled text in sidebar and dropdown menus on Linux
Browse files Browse the repository at this point in the history
Linux users with Intel GPUs have been reporting issues with garbled
or ghosting text in the sidebar nav and header dropdown menu.

The exact cause is unknown but likely a Electron rendering issue with
Intel GPUs when opacity is set with the icons and text elements.

To workaround the problem we can set an element that will change the
stacking context directly on the problem elements.

Fixes: #7233
  • Loading branch information
cas-- authored and logseq-cldwalker committed May 3, 2023
1 parent ae68315 commit 02e8dba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/frontend/components/container.css
Expand Up @@ -226,7 +226,7 @@
li {
margin: 0;
}

a {
width: 100%;
padding: 4px 24px;
Expand Down Expand Up @@ -624,6 +624,13 @@ html[data-theme='dark'] {
}
}

/* Workaround for Linux Intel GPU text rendering issue GH#7233 */
.is-electron.is-linux .cp__menubar-repos {
#repo-switch, .nav-header .flex-1 {
position: relative;
}
}

@supports not (overflow-y: overlay) {
.scrollbar-spacing {
overflow-y: auto;
Expand Down
5 changes: 5 additions & 0 deletions src/main/frontend/components/header.css
Expand Up @@ -128,6 +128,11 @@
padding-left: 1rem;
}

/* Workaround for Linux Intel GPU text rendering issue GH#7233 */
.is-electron.is-linux .cp__header .dropdown-wrapper .title-wrap {
position: relative;
}

.cp__header a, .cp__header svg {
-webkit-app-region: no-drag;
}
Expand Down

0 comments on commit 02e8dba

Please sign in to comment.