x4js 2.3.22 → 2.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/aicontext.md +31 -1
- package/package.json +1 -1
- package/src/components/btngroup/btngroup.module.scss +1 -1
- package/src/components/btngroup/btngroup.ts +6 -1
- package/src/components/button/button.module.scss +4 -4
- package/src/components/button/button.ts +20 -0
- package/src/components/calendar/calendar.module.scss +2 -1
- package/src/components/calendar/calendar.ts +2 -1
- package/src/components/chart/chart.module.scss +4 -4
- package/src/components/checkbox/checkbox.module.scss +2 -1
- package/src/components/checkbox/checkbox.ts +1 -0
- package/src/components/colorpicker/colorpicker.module.scss +0 -1
- package/src/components/dialog/dialog.module.scss +4 -4
- package/src/components/dialog/dialog.ts +1 -0
- package/src/components/dockingview/dockingview.module.scss +9 -11
- package/src/components/dockingview/dockingview.ts +1 -0
- package/src/components/form/form.module.scss +2 -2
- package/src/components/form/form.ts +1 -1
- package/src/components/gauge/gauge.module.scss +2 -2
- package/src/components/gridview/gridview.module.scss +0 -1
- package/src/components/input/input.module.scss +2 -2
- package/src/components/input/input.ts +3 -0
- package/src/components/keyboard/keyboard.ts +11 -1
- package/src/components/label/label.module.scss +3 -3
- package/src/components/listbox/listbox.module.scss +6 -3
- package/src/components/listbox/listbox.ts +2 -0
- package/src/components/menu/menu.module.scss +1 -2
- package/src/components/messages/messages.module.scss +18 -17
- package/src/components/messages/messages.ts +70 -12
- package/src/components/messages/pen-field.svg +1 -1
- package/src/components/panel/panel.module.scss +4 -3
- package/src/components/panel/panel.ts +1 -0
- package/src/components/popup/popup.module.scss +2 -3
- package/src/components/popup/popup.ts +1 -0
- package/src/components/propgrid/progrid.module.scss +4 -4
- package/src/components/radio/radio.module.scss +9 -3
- package/src/components/radio/radio.ts +7 -1
- package/src/components/select/select.module.scss +17 -12
- package/src/components/select/select.ts +9 -0
- package/src/components/settingsview/settingsview.module.scss +1 -4
- package/src/components/spreadsheet/spreadsheet.module.scss +0 -1
- package/src/components/switch/switch.module.scss +3 -2
- package/src/components/switch/switch.ts +1 -0
- package/src/components/tabs/tabs.module.scss +6 -3
- package/src/components/tabs/tabs.ts +3 -0
- package/src/components/tag/tag.module.scss +1 -1
- package/src/components/textarea/textarea.module.scss +8 -1
- package/src/components/textarea/textarea.ts +3 -0
- package/src/components/themes.scss +79 -12
- package/src/components/tickline/tickline.module.scss +1 -1
- package/src/components/tooltips/tooltips.scss +4 -3
- package/src/components/tooltips/tooltips.ts +1 -0
- package/src/components/treeview/treeview.module.scss +6 -2
- package/src/components/treeview/treeview.ts +1 -0
- package/src/core/core_application.ts +47 -0
- package/src/core/core_colors.ts +112 -17
package/aicontext.md
CHANGED
|
@@ -285,6 +285,9 @@ static instance<P extends Application>(): P
|
|
|
285
285
|
setEnv(name: string, value: any): void
|
|
286
286
|
getEnv(name: string, def_value?: any): any
|
|
287
287
|
static fireGlobal(msg: string, params?: any): void
|
|
288
|
+
static setTheme(name: string): void // the class x4theme-<name> on <html>: "" the light theme (default, no class),
|
|
289
|
+
// "dark" the dark theme of x4, another name a theme of the application
|
|
290
|
+
static getTheme(): string // "" for the light theme, "dark", or the name given to setTheme
|
|
288
291
|
focusNext(next: boolean): boolean
|
|
289
292
|
addShortcut(keys: string | string[], callback: (ev: KeyboardEvent) => void, options?: ShortcutOptions): void // see Shortcuts
|
|
290
293
|
setupSocketMessaging(path?: string, looseCallback?: () => void): void
|
|
@@ -1030,6 +1033,8 @@ interface ButtonProps extends ComponentProps {
|
|
|
1030
1033
|
tabindex?: number | boolean
|
|
1031
1034
|
autorepeat?: number | boolean // true=200ms; number=interval (first fire after 500ms)
|
|
1032
1035
|
click?: EventCallback<EvClick>
|
|
1036
|
+
menu?: MenuElement[] | (() => MenuElement[]) // a click opens this Menu under the button, in place of the click event;
|
|
1037
|
+
// a function is called at each click; the button gets the class "with-menu"
|
|
1033
1038
|
}
|
|
1034
1039
|
class Button extends Component {
|
|
1035
1040
|
click(): void // simulate a click
|
|
@@ -1508,6 +1513,24 @@ isLanguage(name: string): boolean
|
|
|
1508
1513
|
|
|
1509
1514
|
---
|
|
1510
1515
|
|
|
1516
|
+
## Theme (`themes.scss`)
|
|
1517
|
+
|
|
1518
|
+
```css
|
|
1519
|
+
--color-primary-a0 … --color-primary-a100 /* the scale: a0 the background, a100 the text, the accent between */
|
|
1520
|
+
/* the globals the components use: --background-primary / -secondary / -ternary / -hover / -active / -input,
|
|
1521
|
+
--text-primary / -secondary / -ternary, --border / -light / -hover / -focus, --accent-background / -hover /
|
|
1522
|
+
-focus / -active / -light, --accent-color (the text on the accent), --disabled-*, --icon-color / -active,
|
|
1523
|
+
--alert-*, --warning-*, --success-* */
|
|
1524
|
+
```
|
|
1525
|
+
// The greys are mixes of a0 and a100: a theme that reverses the scale gets them light on dark.
|
|
1526
|
+
// Each component reads its own variables (the @cssvar of its class), which point to these globals:
|
|
1527
|
+
// a theme redefines the globals, or one variable of a component.
|
|
1528
|
+
// Themes: Application.setTheme(name) puts the class x4theme-<name> on <html>. "" is the light theme (by default),
|
|
1529
|
+
// "dark" the dark theme of x4 (the colours of VS Code Dark Modern). An application adds its own theme in its css,
|
|
1530
|
+
// html.x4theme-pink { --color-primary-a0: ...; ... }, then Application.setTheme("pink").
|
|
1531
|
+
|
|
1532
|
+
---
|
|
1533
|
+
|
|
1511
1534
|
## Utilities (`core_tools`)
|
|
1512
1535
|
|
|
1513
1536
|
```ts
|
|
@@ -1531,8 +1554,15 @@ class Timer { setTimeout; clearTimeout; setInterval; clearInterval; clearAllTime
|
|
|
1531
1554
|
|
|
1532
1555
|
class Color {
|
|
1533
1556
|
// new Color(value) | new Color(r,g,b,a?) a: 0..1, default 1
|
|
1557
|
+
// value: "#rgb", "#rrggbb", "#rrggbbaa", "rgb()", "rgba()", a name ("cyan", "transparent"), "var(--name)",
|
|
1558
|
+
// and any other colour the browser knows (hsl(), oklch(), color-mix()), read from the pixel it paints
|
|
1534
1559
|
setValue(value): this; setRgb(r,g,b,a?): this; setHsv(h,s,v,a?): this; setAlpha(a): this
|
|
1535
|
-
getAlpha(): number
|
|
1560
|
+
getAlpha(): number
|
|
1561
|
+
lighten(percent): this; darken(percent): this // toward white / black, 0-100, each component rounded
|
|
1562
|
+
mix(other: Color, amount): this // amount 0-1: 0 keeps this color, 1 gives the other one; alpha too
|
|
1563
|
+
luminance(): number // WCAG relative luminance, 0 (black) to 1 (white); alpha not used
|
|
1564
|
+
contrast(other: Color): number // WCAG ratio, 1 to 21
|
|
1565
|
+
textColor(light?: Color, dark?: Color): Color // a copy of the one of the two that contrasts most with this color; white and black by default
|
|
1536
1566
|
isInvalid(): boolean // the last setValue could not be read (the color is red); setRgb/setHsv make it valid
|
|
1537
1567
|
toHexString(): string; toNumber(): number
|
|
1538
1568
|
toRgbString(withAlpha = false): string // "rgb(r,g,b)"; true: "rgba(r,g,b,0.500)" when not opaque, "rgb(...)" when opaque
|
package/package.json
CHANGED
|
@@ -56,7 +56,12 @@ interface BtnGroupProps extends Omit<ComponentProps,"content"> {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
*
|
|
60
|
+
* @cssvar
|
|
61
|
+
* ```
|
|
62
|
+
* --btngroup-background
|
|
63
|
+
* ```
|
|
64
|
+
* a packed group draws its buttons with the --ol-button-* variables of Button
|
|
60
65
|
*/
|
|
61
66
|
|
|
62
67
|
@class_ns( "x4" )
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
--button-background-disabled: var( --disabled-background );
|
|
33
33
|
--button-color-disabled: var( --disabled-color );
|
|
34
34
|
|
|
35
|
-
--button-icon-color:
|
|
35
|
+
--button-icon-color: var( --icon-color-active );
|
|
36
36
|
|
|
37
37
|
// outline
|
|
38
38
|
--ol-button-background: var( --background-primary );
|
|
39
|
-
--ol-button-background-active:
|
|
39
|
+
--ol-button-background-active: var( --background-active );
|
|
40
40
|
--ol-button-color-active: var( --text-primary );
|
|
41
|
-
--ol-button-background-hover:
|
|
41
|
+
--ol-button-background-hover: var( --background-hover );
|
|
42
42
|
--ol-button-color-hover: var( --text-primary );
|
|
43
|
-
--ol-button-color-disabled:
|
|
43
|
+
--ol-button-color-disabled: var( --disabled-color-light );
|
|
44
44
|
|
|
45
45
|
--ol-button-color: var( --text-primary );
|
|
46
46
|
--ol-button-border: var( --border );
|
|
@@ -71,6 +71,14 @@ export interface ButtonProps extends ComponentProps {
|
|
|
71
71
|
*/
|
|
72
72
|
click?: EventCallback<EvClick>;
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* A menu that a click opens under the button, in place of the click event.
|
|
76
|
+
* A function is called at each click: it gives the items of that time.
|
|
77
|
+
* The button gets the class "with-menu".
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* new Button( { label: "File", menu: [ { text: "Open", click: open }, "-", { text: "Quit", click: quit } ] } );
|
|
81
|
+
*/
|
|
74
82
|
menu?: MenuElement[] | (( ) => MenuElement[]);
|
|
75
83
|
}
|
|
76
84
|
|
|
@@ -90,7 +98,19 @@ export interface ButtonProps extends ComponentProps {
|
|
|
90
98
|
* --button-background-disabled
|
|
91
99
|
* --button-color-disabled
|
|
92
100
|
* --button-icon-color
|
|
101
|
+
* --ol-button-background
|
|
102
|
+
* --ol-button-color
|
|
103
|
+
* --ol-button-border
|
|
104
|
+
* --ol-button-icon-color
|
|
105
|
+
* --ol-button-background-hover
|
|
106
|
+
* --ol-button-color-hover
|
|
107
|
+
* --ol-button-background-active
|
|
108
|
+
* --ol-button-color-active
|
|
109
|
+
* --ol-button-color-disabled
|
|
110
|
+
* --ol-button-border-focus
|
|
111
|
+
* --ol-button-color-focus
|
|
93
112
|
* ```
|
|
113
|
+
* the --ol-button-* variables are the ones of the outline buttons
|
|
94
114
|
*/
|
|
95
115
|
|
|
96
116
|
@class_ns( "x4" )
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
--calendar-header-color: var( --text-primary );
|
|
38
38
|
--calendar-out-color: var( --disabled-color-dark );
|
|
39
|
+
--calendar-day-color: var( --text-primary );
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
.x4calendar {
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
min-width: 28px;
|
|
94
95
|
min-height: 28px;
|
|
95
96
|
|
|
96
|
-
color: var( --
|
|
97
|
+
color: var( --calendar-day-color );
|
|
97
98
|
text-align: center;
|
|
98
99
|
|
|
99
100
|
.text {
|
|
@@ -54,7 +54,7 @@ interface CalendarProps extends ComponentProps {
|
|
|
54
54
|
* ```
|
|
55
55
|
* --calendar-btn-background
|
|
56
56
|
* --calendar-btn-color
|
|
57
|
-
* --calendar-btn-color
|
|
57
|
+
* --calendar-btn-color-hover
|
|
58
58
|
* --calendar-week-color
|
|
59
59
|
* --calendar-week-color-hover
|
|
60
60
|
* --calendard-day-background-hover
|
|
@@ -66,6 +66,7 @@ interface CalendarProps extends ComponentProps {
|
|
|
66
66
|
* --calendar-today-border
|
|
67
67
|
* --calendar-header-color
|
|
68
68
|
* --calendar-out-color
|
|
69
|
+
* --calendar-day-color
|
|
69
70
|
* ```
|
|
70
71
|
*/
|
|
71
72
|
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
**/
|
|
16
16
|
|
|
17
17
|
:root {
|
|
18
|
-
--chart-background:
|
|
19
|
-
--chart-text:
|
|
20
|
-
--chart-grid:
|
|
21
|
-
--chart-axis:
|
|
18
|
+
--chart-background: var( --background-primary );
|
|
19
|
+
--chart-text: var( --text-ternary );
|
|
20
|
+
--chart-grid: var( --border );
|
|
21
|
+
--chart-axis: var( --border-hover );
|
|
22
22
|
|
|
23
23
|
// series colors, used in this order
|
|
24
24
|
--chart-color-1: #2a78d6;
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
--checkbox-color-disabled: var( --disabled-background );
|
|
25
25
|
--checkbox-check-border: var( --border );
|
|
26
26
|
--checkbox-check-border-hover: var( --border-hover );
|
|
27
|
+
--checkbox-check-color: var( --accent-color );
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
.x4checkbox {
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
.inner {
|
|
42
43
|
height: 1rem;
|
|
43
44
|
width: 1rem;
|
|
44
|
-
color:
|
|
45
|
+
color: var( --checkbox-check-color );
|
|
45
46
|
position: relative;
|
|
46
47
|
order: 1;
|
|
47
48
|
|
|
@@ -74,7 +74,6 @@
|
|
|
74
74
|
overflow: hidden;
|
|
75
75
|
|
|
76
76
|
background-image: linear-gradient(to right, rgb(255, 0, 0), rgb(255, 255, 0), rgb(0, 255, 0), rgb(0, 255, 212), rgb(0, 0, 255), rgb(255, 0, 255), rgb(255, 0, 0));
|
|
77
|
-
border: 1px solid var( --color-gray-3 );
|
|
78
77
|
|
|
79
78
|
.thumb {
|
|
80
79
|
@include overlay-shadow;
|
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
@use "../shared";
|
|
18
18
|
|
|
19
19
|
:root {
|
|
20
|
-
--color-dialog-caption: var( --
|
|
21
|
-
--color-dialog-caption-text: var( --color
|
|
20
|
+
--color-dialog-caption: var( --accent-background-active );
|
|
21
|
+
--color-dialog-caption-text: var( --accent-color );
|
|
22
|
+
--color-dialog-background: var( --background-primary );
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
.x4dialog {
|
|
@@ -26,8 +27,7 @@
|
|
|
26
27
|
@extend %vbox;
|
|
27
28
|
|
|
28
29
|
position: absolute !important;
|
|
29
|
-
background-color:
|
|
30
|
-
border: 1px solid var( --border-dark );
|
|
30
|
+
background-color: var( --color-dialog-background );
|
|
31
31
|
max-width: 99vw;
|
|
32
32
|
outline: none;
|
|
33
33
|
|
|
@@ -15,13 +15,14 @@
|
|
|
15
15
|
**/
|
|
16
16
|
|
|
17
17
|
.x4dockingview {
|
|
18
|
-
--dock-line: var( --border
|
|
19
|
-
--dock-title-background: var( --background-secondary
|
|
20
|
-
--dock-title-background-hover:
|
|
21
|
-
--dock-title-color: var( --text-ternary
|
|
22
|
-
--dock-title-color-active: var( --text-primary
|
|
23
|
-
--dock-accent: var( --accent-background
|
|
24
|
-
--dock-
|
|
18
|
+
--dock-line: var( --border ); // between two panels, under a title
|
|
19
|
+
--dock-title-background: var( --background-secondary );
|
|
20
|
+
--dock-title-background-hover: var( --accent-background-light );
|
|
21
|
+
--dock-title-color: var( --text-ternary );
|
|
22
|
+
--dock-title-color-active: var( --text-primary );
|
|
23
|
+
--dock-accent: var( --accent-background ); // the tab in front, the sizer under the pointer, the border of the preview
|
|
24
|
+
--dock-preview-background: var( --accent-background-light ); // where the panel that is dragged will go
|
|
25
|
+
--dock-float-background: var( --background-primary );
|
|
25
26
|
--dock-float-shadow: 0 6px 24px rgba( 0, 0, 0, 0.35 );
|
|
26
27
|
|
|
27
28
|
position: relative;
|
|
@@ -220,7 +221,6 @@
|
|
|
220
221
|
width: 16px;
|
|
221
222
|
height: 16px;
|
|
222
223
|
line-height: 16px;
|
|
223
|
-
border-radius: 3px;
|
|
224
224
|
text-align: center;
|
|
225
225
|
font-weight: 400;
|
|
226
226
|
cursor: pointer;
|
|
@@ -268,7 +268,6 @@
|
|
|
268
268
|
|
|
269
269
|
background: var( --dock-float-background );
|
|
270
270
|
border: 1px solid var( --dock-line );
|
|
271
|
-
border-radius: 4px;
|
|
272
271
|
box-shadow: var( --dock-float-shadow );
|
|
273
272
|
}
|
|
274
273
|
|
|
@@ -279,9 +278,8 @@
|
|
|
279
278
|
box-sizing: border-box;
|
|
280
279
|
pointer-events: none;
|
|
281
280
|
|
|
282
|
-
background:
|
|
281
|
+
background: var( --dock-preview-background );
|
|
283
282
|
border: 1px solid var( --dock-accent );
|
|
284
|
-
border-radius: 3px;
|
|
285
283
|
}
|
|
286
284
|
|
|
287
285
|
// It holds the pointer during a drag: its cursor is the one that shows.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@use "../shared.scss";
|
|
18
18
|
|
|
19
19
|
:root {
|
|
20
|
-
--form
|
|
20
|
+
--form-background: transparent;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.x4form {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
@extend %flex;
|
|
26
26
|
|
|
27
27
|
padding: 16px;
|
|
28
|
-
background-color: var( --
|
|
28
|
+
background-color: var( --form-background );
|
|
29
29
|
|
|
30
30
|
&.horizontal {
|
|
31
31
|
flex-direction: row;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
**/
|
|
16
16
|
|
|
17
17
|
:root {
|
|
18
|
-
--input-background:
|
|
19
|
-
--input-color:
|
|
18
|
+
--input-background: var( --background-input );
|
|
19
|
+
--input-color: var( --text-primary );
|
|
20
20
|
|
|
21
21
|
--input-sel-background: var( --accent-background );
|
|
22
22
|
--input-sel-color: var( --accent-color );
|
|
@@ -284,7 +284,10 @@ export class Keyboard extends HBox<KeyboardProps>
|
|
|
284
284
|
keyboard: Box;
|
|
285
285
|
visible: boolean;
|
|
286
286
|
input: HTMLInputElement;
|
|
287
|
-
|
|
287
|
+
|
|
288
|
+
// the pointerdown handled last (see handleKeyEvent)
|
|
289
|
+
private handled: UIEvent = null;
|
|
290
|
+
|
|
288
291
|
constructor( props: KeyboardProps ) {
|
|
289
292
|
super( { ...props, id: 'v-keyboard' } );
|
|
290
293
|
|
|
@@ -355,6 +358,13 @@ export class Keyboard extends HBox<KeyboardProps>
|
|
|
355
358
|
*/
|
|
356
359
|
|
|
357
360
|
private handleKeyEvent( e: UIEvent ) {
|
|
361
|
+
// the key backspace listens to pointerdown too (its autorepeat): this handler is
|
|
362
|
+
// called for its node and for the keyboard, the same event twice; one key only
|
|
363
|
+
if( e===this.handled ) {
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
this.handled = e;
|
|
367
|
+
|
|
358
368
|
let target = e.target as HTMLElement;
|
|
359
369
|
let key;
|
|
360
370
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
:root {
|
|
20
20
|
--label-background: transparent;
|
|
21
21
|
--label-color: var( --text-ternary );
|
|
22
|
-
--label-icon-color:
|
|
22
|
+
--label-icon-color: var( --icon-color );
|
|
23
23
|
--label-color-disa: var( --disabled-color-dark );
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
background-color: var( --label-background );
|
|
31
31
|
gap: 0.2em;
|
|
32
32
|
|
|
33
|
-
&.al-right
|
|
34
|
-
&.right
|
|
33
|
+
&.al-right,
|
|
34
|
+
&.right {
|
|
35
35
|
text-align: right;
|
|
36
36
|
justify-content: end;
|
|
37
37
|
}
|
|
@@ -28,9 +28,12 @@
|
|
|
28
28
|
--listbox-item-color-hover: var( --text-primary );;
|
|
29
29
|
--listbox-item-background-hover: var( --background-secondary );
|
|
30
30
|
|
|
31
|
-
--listbox-background:
|
|
31
|
+
--listbox-background: var( --background-primary );
|
|
32
32
|
--listbox-border: var( --border );
|
|
33
33
|
--listbox-border-focus: var( --accent-background-focus );
|
|
34
|
+
|
|
35
|
+
--listbox-title-background: var( --background-primary );
|
|
36
|
+
--listbox-title-color: var( --text-primary );
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
.x4listbox {
|
|
@@ -48,10 +51,10 @@
|
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
&>.title {
|
|
51
|
-
background:
|
|
54
|
+
background: var( --listbox-title-background );
|
|
52
55
|
padding: 4px;
|
|
53
56
|
font-weight: bold;
|
|
54
|
-
color:
|
|
57
|
+
color: var( --listbox-title-color );
|
|
55
58
|
border-bottom: 1px solid var(--border);
|
|
56
59
|
}
|
|
57
60
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@use "../shared.scss";
|
|
18
18
|
|
|
19
19
|
:root {
|
|
20
|
-
--menu-background:
|
|
20
|
+
--menu-background: var( --background-primary );
|
|
21
21
|
--menu-border: var( --border-hover );
|
|
22
22
|
|
|
23
23
|
--menuitem-color: var( --text-ternary );;
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
position: absolute;
|
|
34
34
|
overflow-y: auto;
|
|
35
35
|
|
|
36
|
-
border-radius: var(--bradius);
|
|
37
36
|
padding: 8px 0;
|
|
38
37
|
min-width: 150px;
|
|
39
38
|
|
|
@@ -20,12 +20,16 @@
|
|
|
20
20
|
--msgbox-caption-color: var( --alert-color );
|
|
21
21
|
|
|
22
22
|
--msgbox-icon-color: var( --alert-background );
|
|
23
|
+
--msgbox-question-icon-color: var( --accent-background ); // a question, an InputBox, a PromptBox
|
|
24
|
+
|
|
25
|
+
--msgbox-log-background: var( --background-ternary ); // the lines of a ProgressionBox
|
|
23
26
|
}
|
|
24
27
|
|
|
25
28
|
.x4messagebox {
|
|
26
29
|
max-width: 60vw;
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
// an error has its own title bar; a question has the one of a Dialog
|
|
32
|
+
&.error > .caption {
|
|
29
33
|
background-color: var( --msgbox-caption-background );
|
|
30
34
|
|
|
31
35
|
& > #title {
|
|
@@ -45,24 +49,20 @@
|
|
|
45
49
|
line-height: 1.8em;
|
|
46
50
|
}
|
|
47
51
|
}
|
|
52
|
+
|
|
53
|
+
&.question .x4form .x4icon {
|
|
54
|
+
color: var( --msgbox-question-icon-color );
|
|
55
|
+
}
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
.x4inputbox,
|
|
51
59
|
.x4promptbox {
|
|
52
60
|
max-width: 60vw;
|
|
53
61
|
|
|
54
|
-
& > .caption {
|
|
55
|
-
background-color: var( --msgbox-caption-background );
|
|
56
|
-
|
|
57
|
-
& > #title {
|
|
58
|
-
color: var( --msgbox-caption-color );
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
62
|
& .x4form {
|
|
63
63
|
min-width: 400px;
|
|
64
64
|
.x4icon {
|
|
65
|
-
color: var( --msgbox-icon-color );
|
|
65
|
+
color: var( --msgbox-question-icon-color );
|
|
66
66
|
height: 64px;
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -126,21 +126,22 @@
|
|
|
126
126
|
line-height: 1.8em;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
// on the right, the bar and the lines end where the button OK does: the bar of
|
|
130
|
+
// buttons has a padding of 20px and the button a margin of 2px, the form 16px
|
|
129
131
|
.x4progress {
|
|
130
|
-
margin: 0 16px;
|
|
132
|
+
margin: 0 6px 0 16px;
|
|
131
133
|
}
|
|
132
134
|
|
|
135
|
+
// the lines: a textarea read only, 10 lines high at least, a line is not wrapped
|
|
133
136
|
#sub-text {
|
|
134
137
|
flex-grow: 1;
|
|
138
|
+
min-height: calc( 10lh + 10px ); // its padding and its border too
|
|
135
139
|
max-height: 400px;
|
|
136
140
|
overflow: auto;
|
|
137
|
-
|
|
141
|
+
white-space: pre;
|
|
142
|
+
background-color: var( --msgbox-log-background );
|
|
138
143
|
padding: 4px 8px;
|
|
139
|
-
margin: 0 16px;
|
|
140
|
-
|
|
141
|
-
.x4simpletext {
|
|
142
|
-
white-space: nowrap;
|
|
143
|
-
}
|
|
144
|
+
margin: 0 6px 0 16px;
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
147
|
}
|