Skip to content

Commit 465789d

Browse files
committed
Group editor and terminal settings in stack layout
1 parent 9bab7b9 commit 465789d

File tree

1 file changed

+51
-49
lines changed

1 file changed

+51
-49
lines changed

apps/desktop/src/components/profileSettings/GeneralSettings.svelte

Lines changed: 51 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -191,56 +191,58 @@
191191
{/if}
192192
<Spacer />
193193

194-
<SectionCard orientation="row" centerAlign>
195-
{#snippet title()}
196-
Default code editor
197-
{/snippet}
198-
{#snippet actions()}
199-
<Select
200-
value={$userSettings.defaultCodeEditor.schemeIdentifer}
201-
options={editorOptionsForSelect}
202-
onselect={(value) => {
203-
const selected = editorOptions.find((option) => option.schemeIdentifer === value);
204-
if (selected) {
205-
userSettings.update((s) => ({ ...s, defaultCodeEditor: selected }));
206-
}
207-
}}
208-
>
209-
{#snippet itemSnippet({ item, highlighted })}
210-
<SelectItem
211-
selected={item.value === $userSettings.defaultCodeEditor.schemeIdentifer}
212-
{highlighted}
213-
>
214-
{item.label}
215-
</SelectItem>
216-
{/snippet}
217-
</Select>
218-
{/snippet}
219-
</SectionCard>
194+
<div class="stack-v">
195+
<SectionCard orientation="row" centerAlign roundedBottom={false}>
196+
{#snippet title()}
197+
Default code editor
198+
{/snippet}
199+
{#snippet actions()}
200+
<Select
201+
value={$userSettings.defaultCodeEditor.schemeIdentifer}
202+
options={editorOptionsForSelect}
203+
onselect={(value) => {
204+
const selected = editorOptions.find((option) => option.schemeIdentifer === value);
205+
if (selected) {
206+
userSettings.update((s) => ({ ...s, defaultCodeEditor: selected }));
207+
}
208+
}}
209+
>
210+
{#snippet itemSnippet({ item, highlighted })}
211+
<SelectItem
212+
selected={item.value === $userSettings.defaultCodeEditor.schemeIdentifer}
213+
{highlighted}
214+
>
215+
{item.label}
216+
</SelectItem>
217+
{/snippet}
218+
</Select>
219+
{/snippet}
220+
</SectionCard>
220221

221-
<SectionCard orientation="row" centerAlign>
222-
{#snippet title()}
223-
Default terminal
224-
{/snippet}
225-
{#snippet actions()}
226-
<Select
227-
value={$userSettings.defaultTerminal.appName}
228-
options={terminalOptionsForSelect}
229-
onselect={(value) => {
230-
const selected = terminalOptions.find((option) => option.appName === value);
231-
if (selected) {
232-
userSettings.update((s) => ({ ...s, defaultTerminal: selected }));
233-
}
234-
}}
235-
>
236-
{#snippet itemSnippet({ item, highlighted })}
237-
<SelectItem selected={item.value === $userSettings.defaultTerminal.appName} {highlighted}>
238-
{item.label}
239-
</SelectItem>
240-
{/snippet}
241-
</Select>
242-
{/snippet}
243-
</SectionCard>
222+
<SectionCard orientation="row" centerAlign roundedTop={false}>
223+
{#snippet title()}
224+
Default terminal
225+
{/snippet}
226+
{#snippet actions()}
227+
<Select
228+
value={$userSettings.defaultTerminal.appName}
229+
options={terminalOptionsForSelect}
230+
onselect={(value) => {
231+
const selected = terminalOptions.find((option) => option.appName === value);
232+
if (selected) {
233+
userSettings.update((s) => ({ ...s, defaultTerminal: selected }));
234+
}
235+
}}
236+
>
237+
{#snippet itemSnippet({ item, highlighted })}
238+
<SelectItem selected={item.value === $userSettings.defaultTerminal.appName} {highlighted}>
239+
{item.label}
240+
</SelectItem>
241+
{/snippet}
242+
</Select>
243+
{/snippet}
244+
</SectionCard>
245+
</div>
244246

245247
<SectionCard labelFor="disable-auto-checks" orientation="row">
246248
{#snippet title()}

0 commit comments

Comments
 (0)