Skip to content

Commit 8d646e0

Browse files
committed
minor ui tweaks
1 parent de2e9d4 commit 8d646e0

File tree

4 files changed

+84
-36
lines changed

4 files changed

+84
-36
lines changed

gui-js/apps/minsky-electron/src/app/managers/CommandsManager.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,9 @@ export class CommandsManager {
603603
const type=await v.type();
604604
const local=await v.local();
605605
WindowManager.createPopupWindowWithRouting({
606-
width: 500,
607-
height: 650,
608-
title: `Edit ${name} || ''}`,
606+
width: 400,
607+
height: 500,
608+
title: `Edit ${name || ''}`,
609609
url: `#/headless/menu/insert/create-variable?type=${type}&name=${encodeURIComponent(name)||''}&isEditMode=true&local=${local}`,
610610
});
611611
}
@@ -615,11 +615,12 @@ export class CommandsManager {
615615
let width = 500;
616616
switch (classType) {
617617
case ClassType.Group:
618-
height = 240;
618+
width = 400;
619+
height = 130;
619620
break;
620621
case ClassType.Operation:
621-
height = 250;
622-
width = 350;
622+
height = 200;
623+
width = 300;
623624
break;
624625
case ClassType.UserFunction:
625626
height = 250;

gui-js/apps/minsky-electron/src/app/managers/ContextMenuManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,12 +590,12 @@ export class ContextMenuManager {
590590
let op=new OperationBase(minsky.canvas.item);
591591

592592
let portValues;
593-
op.portValues().
593+
await op.portValues().
594594
then((x)=>{portValues=x;}).
595595
catch((x)=>{portValues = 'unknown';});
596596

597597
let menuItems = [
598-
new MenuItem({ label: `Port values ${portValues}}` }),
598+
new MenuItem({ label: `Port values ${portValues}` }),
599599
new MenuItem({
600600
label: 'Edit',
601601
click: async () => {
Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
1-
<div class="form-wrapper">
2-
<br />
3-
4-
<form [formGroup]="form">
1+
<form [formGroup]="form">
2+
<div class="form-body">
53
<div class="form-control">
64
<label for="name">Name</label>
75
<input type="text" class="name" id="name" formControlName="name" />
86
</div>
97

108
<div class="form-control">
119
<label for="rotation">Rotation</label>
12-
<input
13-
type="text"
14-
class="rotation"
15-
id="rotation"
16-
formControlName="rotation"
17-
/>
10+
<input type="text" class="rotation" id="rotation" formControlName="rotation" />
1811
</div>
12+
</div>
1913

20-
<div class="form-buttons">
21-
<button mat-raised-button class="btn cancel-btn" (click)="closeWindow()">
22-
Cancel
23-
</button>
14+
<div class="form-buttons">
15+
<button
16+
mat-raised-button
17+
class="btn cancel-btn"
18+
(click)="closeWindow()"
19+
>
20+
Cancel
21+
</button>
2422

25-
<button
26-
mat-raised-button
27-
class="btn ok-btn submit"
28-
type="submit"
29-
(click)="handleSave()"
30-
>
31-
OK
32-
</button>
33-
</div>
34-
</form>
35-
</div>
23+
<button
24+
mat-raised-button
25+
class="btn ok-btn submit"
26+
type="submit"
27+
(click)="handleSave()"
28+
>
29+
OK
30+
</button>
31+
</div>
32+
</form>

gui-js/libs/ui-components/src/lib/edit-group/edit-group.component.scss

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,56 @@ select {
44
width: 125px;
55
}
66

7-
button {
8-
margin: $margin;
9-
}
7+
form {
8+
width: 100vw;
9+
height: 100vh;
10+
11+
overflow: hidden;
12+
13+
display: flex;
14+
flex-direction: column;
15+
justify-content: space-between;
16+
align-items: stretch;
17+
18+
.form-title {
19+
width: 100%;
20+
21+
padding: 10px;
22+
display: flex;
23+
justify-content: center;
24+
align-items: center;
25+
26+
font-weight: bold;
27+
}
28+
29+
.form-body {
30+
padding: 10px;
31+
32+
display: flex;
33+
flex-direction: column;
34+
justify-content: space-between;
35+
align-items: stretch;
36+
37+
overflow-x: hidden;
38+
overflow-y: auto;
39+
40+
.form-control {
41+
display: flex;
42+
flex-direction: row;
43+
justify-content: center;
44+
align-items: center;
45+
46+
* {
47+
flex: 1;
48+
max-width: 200px;
49+
}
50+
}
51+
}
52+
53+
.form-buttons {
54+
margin: 0px;
55+
button {
56+
margin: 5px;
57+
}
58+
}
59+
}

0 commit comments

Comments
 (0)