Skip to content
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
12 changes: 0 additions & 12 deletions theme/pxtjson.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,4 @@
display: flex;
flex-direction: column;
gap: 0.5rem;
}

.pxt-json-simulator-theme {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 0.3rem;

label {
font-size: 14px;
font-weight: 600;
}
}
14 changes: 3 additions & 11 deletions webapp/src/pxtjson.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,6 @@ export class Editor extends srceditor.Editor {
const projectSimulatorThemePreference = accountSimulatorTheme
? simulatorTheme.getProjectSimulatorThemePreference(c.theme, simulatorThemePresets, accountSimulatorTheme)
: undefined;
const simulatorThemePresetId = projectSimulatorThemePreference?.presetId;
const hasCustomSimulatorTheme = simulatorThemePresetId === "custom";
const selectedSimulatorThemeName = !c.theme
? lf("Use account theme")
: hasCustomSimulatorTheme
? lf("Custom")
: pxt.Util.rlf(`{id:simulator-theme-name}${simulatorThemePresets.find(preset => preset.id === simulatorThemePresetId)?.name}`);

return (
<><div className="ui content">
Expand Down Expand Up @@ -269,13 +262,12 @@ export class Editor extends srceditor.Editor {
resize="vertical"
/>
}
{simulatorThemesEnabled && <div className="pxt-json-simulator-theme">
<label htmlFor="projectSimulatorTheme">{lf("Simulator theme")}</label>
{simulatorThemesEnabled && <div>
<Button
id="projectSimulatorTheme"
className="primary"
title={lf("Choose simulator theme")}
label={selectedSimulatorThemeName}
title={lf("Simulator Theme")}
label={lf("Simulator Theme")}
ariaHasPopup="dialog"
ariaExpanded={this.simulatorThemePickerOpen}
onClick={this.showSimulatorThemePicker} />
Expand Down
Loading