Skip to content

Commit 8783259

Browse files
committed
fix: toolbar button color when using light theme
1 parent 705be82 commit 8783259

2 files changed

Lines changed: 48 additions & 41 deletions

File tree

extension/webview.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class PanelProvider implements vscode.WebviewViewProvider, vscode.Disposable {
189189
this.postEvent({ type: 'oj:samples-fetched' });
190190
const res = await vscode.window.showErrorMessage('Failed to fetch samples', 'Copy Details');
191191
if (res === 'Copy Details')
192-
vscode.env.clipboard.writeText(e instanceof Error && e.stack || String(e));
192+
vscode.env.clipboard.writeText(e instanceof Error && e.stack ? e.stack : String(e));
193193
}
194194
}
195195
}

src/components/Toolbar.vue

Lines changed: 47 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import '@vscode-elements/elements/dist/vscode-badge';
1313
import '@vscode-elements/elements/dist/vscode-button';
1414
import '@vscode-elements/elements/dist/vscode-option';
1515
import '@vscode-elements/elements/dist/vscode-single-select';
16+
import '@vscode-elements/elements/dist/vscode-button-group';
1617
1718
export type ToolbarStatus = 'idle' | 'disabled' | 'running' | 'cancelling';
1819
@@ -62,40 +63,50 @@ function gotoSource() {
6263
</vscode-option>
6364
</vscode-single-select>
6465

65-
<vscode-button
66-
v-if="currentTaskCompilable"
67-
title="Compile"
68-
:disabled="status !== 'idle'"
69-
@click="$emit('run', 'compile')"
70-
>
71-
<IconExtensions />
72-
</vscode-button>
73-
74-
<vscode-button
75-
title="Run"
76-
:disabled="status !== 'idle'"
77-
@click="$emit('run', 'execute')"
78-
>
79-
<IconDebugStart />
80-
</vscode-button>
81-
82-
<vscode-button
83-
v-if="currentTaskCompilable"
84-
title="Compile & Run"
85-
:disabled="status !== 'idle'"
86-
@click="$emit('run', 'compile-execute')"
87-
>
88-
<IconRunAll />
89-
</vscode-button>
90-
91-
<vscode-button
92-
:style="{ cursor: status === 'cancelling' ? 'progress' : undefined }"
93-
title="Stop"
94-
:disabled="status !== 'running'"
95-
@click="$emit('cancel')"
96-
>
97-
<IconDebugStop />
98-
</vscode-button>
66+
<vscode-button-group>
67+
<vscode-button
68+
v-if="currentTaskCompilable"
69+
secondary
70+
icon-only
71+
title="Compile"
72+
:disabled="status !== 'idle'"
73+
@click="$emit('run', 'compile')"
74+
>
75+
<IconExtensions />
76+
</vscode-button>
77+
78+
<vscode-button
79+
secondary
80+
icon-only
81+
title="Run"
82+
:disabled="status !== 'idle'"
83+
@click="$emit('run', 'execute')"
84+
>
85+
<IconDebugStart />
86+
</vscode-button>
87+
88+
<vscode-button
89+
v-if="currentTaskCompilable"
90+
secondary
91+
icon-only
92+
title="Compile & Run"
93+
:disabled="status !== 'idle'"
94+
@click="$emit('run', 'compile-execute')"
95+
>
96+
<IconRunAll />
97+
</vscode-button>
98+
99+
<vscode-button
100+
:style="{ cursor: status === 'cancelling' ? 'progress' : undefined }"
101+
secondary
102+
icon-only
103+
title="Stop"
104+
:disabled="status !== 'running'"
105+
@click="$emit('cancel')"
106+
>
107+
<IconDebugStop />
108+
</vscode-button>
109+
</vscode-button-group>
99110
</header>
100111
</template>
101112

@@ -129,15 +140,11 @@ vscode-single-select {
129140
}
130141
131142
vscode-button {
132-
--vscode-button-background: transparent;
133-
--vscode-button-hoverBackground: rgba(90, 93, 94, 0.31);
143+
/* --vscode-button-background: transparent; */
144+
/* --vscode-button-hoverBackground: rgba(90, 93, 94, 0.31); */
134145
border: none;
135146
font-size: medium;
136147
width: 20px;
137148
margin: 0 2px;
138149
}
139-
140-
vscode-button svg {
141-
margin-left: -6px;
142-
}
143150
</style>

0 commit comments

Comments
 (0)