Skip to content

Commit 88d9a93

Browse files
committed
various debugger style tweaks
1 parent a8bd27d commit 88d9a93

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

lib/debugger/toolbar.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ export class DebuggerToolbar {
88
this.subs = new CompositeDisposable()
99

1010
let group = document.createElement('div')
11-
group.classList.add('btn-group', 'btn-group-sm')
11+
group.classList.add('btn-group', 'btn-group-sm', 'ink-btn-group-variable-width')
1212
buttons.forEach((b) => group.appendChild(this.buttonView(b)))
1313

1414
this.view = document.createElement('div')
1515
this.view.className = 'ink-debug-toolbar'
1616
this.view.appendChild(group)
1717
}
1818

19-
buttonView ({icon, text, tooltip, command}) {
19+
buttonView ({icon, text, tooltip, command, color}) {
2020
let btn = document.createElement('button')
21-
btn.classList.add('btn', 'btn-primary')
21+
btn.classList.add('btn', 'ink-btn-variable-width')
2222
if (text) btn.innerText = text
2323
if (icon) btn.classList.add(`icon-${icon}`)
24+
if (color) btn.classList.add(`btn-color-${color}`)
2425
btn.onclick = () => atom.commands.dispatch(atom.views.getView(atom.workspace), command)
2526
this.subs.add(atom.tooltips.add(btn, {
2627
title: tooltip,

styles/debugger.less

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@
3131
.toolbar {
3232
padding: 0em 1em 0.5em 1em;
3333
line-height: 2.6em;
34+
.ink-debug-toolbar {
35+
width: 100%;
36+
37+
.ink-btn-group-variable-width {
38+
width: 100%;
39+
40+
.ink-btn-variable-width {
41+
width: 14%;
42+
min-width: 3em;
43+
}
44+
}
45+
}
3446

3547
.inner-toolbar {
3648
display: flex;

styles/ink.less

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@
77
@import "ui-variables";
88
@import "syntax-variables";
99

10+
11+
.btn {
12+
&.btn-color-primary {}
13+
&.btn-color-info {
14+
color: @background-color-info;
15+
}
16+
&.btn-color-success {
17+
color: @background-color-success;
18+
}
19+
&.btn-color-warning {
20+
color: @background-color-warning;
21+
}
22+
&.btn-color-error {
23+
color: @background-color-error;
24+
}
25+
}
26+
1027
.ink .markdown {
1128
font-family: 'BlinkMacSystemFont', 'Lucida Grande', 'Segoe UI', Ubuntu, Cantarell, sans-serif;
1229

0 commit comments

Comments
 (0)