Skip to content

Commit 425a6e3

Browse files
authored
Some More Assorted Themes Fixes (microsoft#10448)
* Fix function argument type display * Fix toolbox separator line * Change color of "Open in VS Code" button (and similarly, "Host multiplayer game") to match under-sim buttons. * Fix pxt.json edit page * Change textbox color to look less disabled * Theme workspace search * Fix foreground / background mismatch (target-background1 was using target-foreground2). No bug filed on this since target1 and target2 tend to have similar foregrounds, but it was obvious when I was working on the theme builder and I forgot to fix it until now.
1 parent 3c71945 commit 425a6e3

File tree

7 files changed

+64
-11
lines changed

7 files changed

+64
-11
lines changed

pxtblocks/plugins/functions/fields/fieldArgumentEditor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Blockly.Css.register(`
7878
}
7979
8080
.functioneditor i.argumentEditorTypeIcon {
81-
color: var(--pxt-primary-foreground);
81+
color: var(--pxt-target-foreground1);
8282
position: absolute;
8383
width: 24px;
8484
height: 24px;
@@ -97,4 +97,4 @@ Blockly.Css.register(`
9797
cursor: pointer;
9898
}
9999
100-
`)
100+
`)

pxtblocks/workspaceSearch.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,47 @@ export class PxtWorkspaceSearch extends WorkspaceSearch {
3636
}
3737

3838
Blockly.Css.register(`
39+
.blockly-ws-search {
40+
background: var(--pxt-neutral-background1);
41+
color: var(--pxt-neutral-foreground1);
42+
border: solid var(--pxt-neutral-alpha50) 1px;
43+
border-top: none;
44+
border-right: none;
45+
box-shadow: 0px 2px 15px var(--pxt-neutral-alpha50);
46+
}
47+
48+
.blockly-ws-search input {
49+
-webkit-tap-highlight-color: transparent;
50+
background: var(--pxt-neutral-background1);
51+
color: var(--pxt-neutral-foreground1);
52+
border: none;
53+
}
54+
55+
.blockly-ws-search input::-webkit-input-placeholder {
56+
color: var(--pxt-neutral-alpha50);
57+
}
58+
59+
.blockly-ws-search input::-moz-placeholder {
60+
color: var(--pxt-neutral-alpha50);
61+
}
62+
63+
.blockly-ws-search input::-ms-input-placeholder {
64+
color: var(--pxt-neutral-alpha50);
65+
}
66+
67+
.blockly-ws-search input:active,
68+
.blockly-ws-search input:focus {
69+
border-color: var(--pxt-neutral-alpha50);
70+
background: var(--pxt-neutral-background1);
71+
color: var(--pxt-neutral-foreground1);
72+
}
73+
74+
.blockly-ws-search input::selection {
75+
color: var(--pxt-neutral-foreground1);
76+
}
77+
3978
.blockly-ws-search button {
4079
padding-left: 6px;
4180
padding-right: 6px;
42-
}`);
81+
color: var(--pxt-neutral-foreground1);
82+
}`);

theme/blockly-core.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ i.icon.blocklyTreeButton {
180180
}
181181

182182
line.blocklyFlyoutLine {
183-
stroke: var(--pxt-neutral-stencil3);
183+
stroke: var(--pxt-neutral-foreground3);
184184
}
185185

186186

theme/color-themes/overrides/high-contrast-overrides.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
z-index: 1;
1010
}
1111

12-
.barcharticon {
12+
/*
13+
* Inverted image colors
14+
*/
15+
.barcharticon,
16+
.blockly-ws-search-next-btn,
17+
.blockly-ws-search-previous-btn,
18+
.blockly-ws-search-close-btn {
1319
filter: invert(1);
1420
}
1521

theme/home.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
margin: 0;
138138
padding-left: @carouselArrowSize;
139139
font-size: 20px;
140-
color: var(--pxt-target-foreground2);
140+
color: var(--pxt-target-foreground1);
141141
&.myproject-header {
142142
cursor: pointer;
143143
outline: none;

theme/semantic-ui-overrides.less

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ body.pxt-theme-root {
212212

213213
input {
214214
-webkit-tap-highlight-color: transparent;
215-
background: var(--pxt-neutral-background2);
216-
border: 1px solid var(--pxt-neutral-stencil2);
217-
color: var(--pxt-neutral-foreground2);
215+
background: var(--pxt-neutral-background1);
216+
border: 1px solid var(--pxt-neutral-stencil1);
217+
color: var(--pxt-neutral-foreground1);
218218

219219
&::-webkit-input-placeholder,
220220
&::-moz-placeholder,
@@ -240,6 +240,13 @@ body.pxt-theme-root {
240240
}
241241
}
242242

243+
.ui.segment {
244+
background: var(--pxt-neutral-background1);
245+
color: var(--pxt-neutral-foreground1);
246+
border: 1px solid var(--pxt-neutral-stencil1);
247+
box-shadow: 0 1px 2px 0 var(--pxt-neutral-alpha10);
248+
}
249+
243250
.ui.raised.segment, .ui.raised.segments {
244251
box-shadow: 0 2px 4px 0 var(--pxt-neutral-alpha10),0 2px 10px 0 var(--pxt-neutral-alpha10);
245252
}

webapp/src/sidepanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,10 @@ export class Sidepanel extends data.Component<SidepanelProps, SidepanelState> {
257257
{pxt.options.debug && <Button key="hwdebugbtn" className="tertiary" icon="xicon chip" text={"Dev Debug"} onClick={handleHardwareDebugClick} />}
258258
</div>
259259
<div className="ui item grid centered portrait hide hidefullscreen">
260-
{showOpenInVscodeButton && <Button className={"tertiary hostmultiplayergame-button"} icon={"icon share"} text={lf("Open in VS Code")} ariaLabel={lf("Open in Visual Studio Code for Web")} onClick={this.onOpenInVSCodeClick} />}
260+
{showOpenInVscodeButton && <Button className={"secondary hostmultiplayergame-button"} icon={"icon share"} text={lf("Open in VS Code")} ariaLabel={lf("Open in Visual Studio Code for Web")} onClick={this.onOpenInVSCodeClick} />}
261261
</div>
262262
<div className="ui item grid centered portrait hide hidefullscreen">
263-
{showHostMultiplayerGameButton && <Button className={"tertiary hostmultiplayergame-button"} icon={"xicon multiplayer"} text={lf("Host multiplayer game")} ariaLabel={lf("Host multiplayer game")} onClick={this.onHostMultiplayerGameClick} />}
263+
{showHostMultiplayerGameButton && <Button className={"secondary hostmultiplayergame-button"} icon={"xicon multiplayer"} text={lf("Host multiplayer game")} ariaLabel={lf("Host multiplayer game")} onClick={this.onHostMultiplayerGameClick} />}
264264
</div>
265265
{showSerialButtons && <div id="serialPreview" className="ui editorFloat portrait hide hidefullscreen">
266266
<serialindicator.SerialIndicator ref="simIndicator" isSim={true} onClick={this.handleSimSerialClick} parent={parent} />

0 commit comments

Comments
 (0)