Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MM-60605] Fix the Download button being hidden on Windows/Linux #3148

Merged
merged 6 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/renderer/components/MainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,9 @@ class MainPage extends React.PureComponent<Props, State> {
developerMode={this.state.developerMode}
/>
{downloadsDropdownButton}
{window.process.platform !== 'darwin' &&
<span style={{width: `${window.innerWidth - (window.navigator.windowControlsOverlay?.getTitlebarAreaRect().width ?? 0)}px`}}/>
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would there be any overlap in full screen due to the condition below?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh...why does full screen mode have to exist...
Seems like it's causing some weird behaviour, i'll fix that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay I've fixed it for Windows and "fixed" it for Linux.
Unfortunately full screen on Linux really doesn't work very well, so we'll need to address that separately. See: #3143

{window.process.platform !== 'darwin' && this.state.fullScreen &&
<span className='title-bar-btns'>
<div
Expand Down
6 changes: 6 additions & 0 deletions src/types/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,10 @@ declare global {
};
};
}

interface Navigator {
windowControlsOverlay?: {
getTitlebarAreaRect: () => DOMRect;
};
}
}
Loading