Skip to content

Commit

Permalink
fix: get rid of title view jank on latest beta
Browse files Browse the repository at this point in the history
  • Loading branch information
AAGaming00 committed Nov 9, 2023
1 parent 44e6f03 commit 29d651b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
21 changes: 7 additions & 14 deletions frontend/src/components/PluginView.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
import {
ButtonItem,
Focusable,
PanelSection,
PanelSectionRow,
joinClassNames,
scrollClasses,
staticClasses,
} from 'decky-frontend-lib';
import { ButtonItem, Focusable, PanelSection, PanelSectionRow } from 'decky-frontend-lib';
import { VFC, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { FaEyeSlash } from 'react-icons/fa';
Expand Down Expand Up @@ -36,10 +28,7 @@ const PluginView: VFC = () => {
return (
<Focusable onCancelButton={closeActivePlugin}>
<TitleView />
<div
className={joinClassNames(staticClasses.TabGroupPanel, scrollClasses.ScrollPanel, scrollClasses.ScrollY)}
style={{ height: '100%' }}
>
<div style={{ height: '100%', paddingTop: '16px' }}>
{(visible || activePlugin.alwaysRender) && activePlugin.content}
</div>
</Focusable>
Expand All @@ -48,7 +37,11 @@ const PluginView: VFC = () => {
return (
<>
<TitleView />
<div className={joinClassNames(staticClasses.TabGroupPanel, scrollClasses.ScrollPanel, scrollClasses.ScrollY)}>
<div
style={{
paddingTop: '16px',
}}
>
<PanelSection>
{pluginList
.filter((p) => p.content)
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/components/TitleView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const titleStyles: CSSProperties = {
display: 'flex',
paddingTop: '3px',
paddingRight: '16px',
position: 'sticky',
top: '0px',
};

const TitleView: VFC = () => {
Expand Down

0 comments on commit 29d651b

Please sign in to comment.