Skip to content

Commit e714c23

Browse files
authored
Improve styling of the link editor (#110)
* Improve styling of the link editor * Use splitpanel instead of boxpanel * update snapshots
1 parent 5be22a4 commit e714c23

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

Diff for: src/linkPanel/linkEditor.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { BoxPanel, Widget } from '@lumino/widgets';
1+
import { SplitPanel, Widget } from '@lumino/widgets';
22

33
import { IGlueSessionSharedModel } from '../types';
44
import { LinkEditorModel } from './model';
@@ -10,9 +10,9 @@ import { Message } from '@lumino/messaging';
1010
/**
1111
* The link editor widget.
1212
*/
13-
export class LinkEditor extends BoxPanel {
13+
export class LinkEditor extends SplitPanel {
1414
constructor(options: LinkWidget.IOptions) {
15-
super({ direction: 'left-to-right' });
15+
super({});
1616
this._sharedModel = options.sharedModel;
1717
this.addClass('glue-linkEditor');
1818
this.title.label = 'Link Data';
@@ -31,8 +31,8 @@ export class LinkEditor extends BoxPanel {
3131
this.addWidget(linking);
3232
this.addWidget(summary);
3333

34-
BoxPanel.setStretch(linking, 3);
35-
BoxPanel.setStretch(summary, 2);
34+
SplitPanel.setStretch(linking, 3);
35+
SplitPanel.setStretch(summary, 2);
3636
}
3737

3838
get sharedModel(): IGlueSessionSharedModel {

Diff for: style/base.css

+13-11
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@
213213
flex-direction: row-reverse;
214214
}
215215

216+
.glue-Session-panel {
217+
background-color: var(--jp-layout-color2);
218+
}
219+
216220
.glue-LinkEditor-deleteButton:hover {
217221
background-color: none !important;
218222
}
@@ -259,6 +263,10 @@
259263
width: 40%;
260264
}
261265

266+
.glue-LinkEditor-identity {
267+
background-color: var(--jp-layout-color0);
268+
}
269+
262270
.glue-LinkEditor-identity table tr td:last-child {
263271
text-align: right;
264272
}
@@ -284,21 +292,14 @@
284292
flex-direction: column;
285293
}
286294

287-
.glue-LinkEditor-widget:first-child {
288-
border-right: solid 2px var(--jp-layout-color2);
289-
}
290-
291-
.glue-LinkEditor-widget:last-child {
292-
border-left: solid 2px var(--jp-layout-color2);
293-
}
294-
295295
.glue-LinkEditor-widget > :last-child {
296296
flex-grow: 1;
297297
}
298298

299299
.glue-LinkEditor-header {
300300
width: 100%;
301-
background-color: var(--jp-layout-color3);
301+
background-color: var(--jp-layout-color0);
302+
border-bottom: solid 3px var(--jp-layout-color2);
302303
display: flex;
303304
align-items: center;
304305
}
@@ -339,6 +340,7 @@
339340

340341
.glue-LinkEditor-linkingDatasetsPanel {
341342
width: 30%;
343+
background-color: var(--jp-layout-color0);
342344
}
343345

344346
.glue-LinkEditor-linkingAttributesPanel {
@@ -347,11 +349,11 @@
347349
}
348350

349351
.glue-LinkEditor-linkingAttributesPanel.firstAttributePanel {
350-
border-right: solid var(--jp-toolbar-border-color);
352+
border-right: 1px solid var(--jp-toolbar-border-color);
351353
}
352354

353355
.glue-LinkEditor-linkingAttributesPanel.secondAttributePanel {
354-
border-left: solid var(--jp-toolbar-border-color);
356+
border-left: 1px solid var(--jp-toolbar-border-color);
355357
}
356358

357359
.glue-LinkEditor-summaryHeader {
7.33 KB
Loading

0 commit comments

Comments
 (0)