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

fix: Screenshare UI for non-linux systems #568

Merged
merged 4 commits into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
29 changes: 16 additions & 13 deletions src/renderer/components/ScreenSharePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,15 @@ function StreamSettings({
);

return (
<div className="vcd-screen-picker-settings-grid">
<div className={isLinux ? "vcd-screen-picker-settings-grid" : ""}>
<div>
<Forms.FormTitle>What you're streaming</Forms.FormTitle>
<Card className="vcd-screen-picker-card vcd-screen-picker-preview">
<img src={thumb} alt="" />
<img
src={thumb}
alt=""
className={isLinux ? "vcd-screen-picker-preview-img-linux" : "vcd-screen-picker-preview-img"}
/>
<Text variant="text-sm/normal">{source.name}</Text>
</Card>

Expand Down Expand Up @@ -283,23 +287,22 @@ function StreamSettings({
</p>
</div>
</div>
{isWindows && (
<Switch
value={settings.audio}
onChange={checked => setSettings(s => ({ ...s, audio: checked }))}
hideBorder
className="vcd-screen-picker-audio"
>
Stream With Audio
</Switch>
)}
</section>
</div>
</Card>
</div>

<div>
{isWindows && (
<Switch
value={settings.audio}
onChange={checked => setSettings(s => ({ ...s, audio: checked }))}
hideBorder
className="vcd-screen-picker-audio"
>
Stream With Audio
</Switch>
)}

{isLinux && (
<AudioSourcePickerLinux
audioSource={settings.audioSource}
Expand Down
9 changes: 7 additions & 2 deletions src/renderer/components/screenSharePicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
grid-template-columns: 1fr 1fr;
}

.vcd-screen-picker-settings-grid > div {
.vcd-screen-picker-settings-grid>div {
display: flex;
flex-direction: column;
}
Expand Down Expand Up @@ -67,11 +67,16 @@
box-sizing: border-box;
}

.vcd-screen-picker-preview img {
.vcd-screen-picker-preview-img-linux {
width: 100%;
margin-bottom: 0.5em;
}

.vcd-screen-picker-preview-img {
width: 90%;
margin-bottom: 0.5em;
}

.vcd-screen-picker-preview {
display: flex;
flex-direction: column;
Expand Down
Loading