Evan's Blog
EvanZhu0721 / 公开仓库

SBMS

镜像已同步

SBMS complete the calculation rules for the default logical desktop topology relationship and the physical dimensions of the displays in the Windows multi-screen collaboration system.

上游 GitHub
READ-ONLY MIRROR

README、源码与 Release 已保存到本站;源码视图固定到 commit a37d6c4b。

main/ root / ui
a37d6c4b· 固定源码快照
ui/remove-group-dialog.slint3.2 KB
1import { DialogActionButton } from "controls.slint";
2import { MdTokens } from "theme.slint";
3
4export component RemoveGroupDialog inherits FocusScope {
5 in-out property <int> pending-remove-index: -1;
6 callback remove-group(int);
7
8 key-pressed(event) => {
9 if event.text == Key.Escape {
10 root.pending-remove-index = -1;
11 return accept;
12 }
13 return reject;
14 }
15
16 Rectangle {
17 width: parent.width;
18 height: parent.height;
19 background: #66000000;
20
21 TouchArea {
22 accessible-role: none;
23 clicked => { root.pending-remove-index = -1; }
24 }
25
26 dialog := Rectangle {
27 x: (parent.width - self.width) / 2;
28 y: (parent.height - self.height) / 2;
29 width: 320px;
30 height: 184px;
31 background: MdTokens.surface;
32 border-width: 1px;
33 border-color: MdTokens.outline-variant;
34 border-radius: 28px;
35
36 TouchArea {
37 accessible-role: none;
38 }
39
40 VerticalLayout {
41 padding: 20px;
42 spacing: MdTokens.space-1;
43
44 Text {
45 height: 28px;
46 text: "Remove mapping group?";
47 color: MdTokens.on-surface;
48 font-size: MdTokens.type-title-large;
49 font-weight: MdTokens.weight-medium;
50 vertical-alignment: center;
51 }
52
53 Text {
54 height: 52px;
55 text: "Its target, sizing and stream settings will be discarded.";
56 color: MdTokens.on-surface-variant;
57 font-size: MdTokens.type-body-medium;
58 wrap: word-wrap;
59 }
60
61 HorizontalLayout {
62 height: MdTokens.target;
63 spacing: MdTokens.space-1;
64 Rectangle { horizontal-stretch: 1; }
65 DialogActionButton {
66 text: "Cancel";
67 field-label: "Cancel removing mapping group";
68 clicked => { root.pending-remove-index = -1; }
69 }
70 DialogActionButton {
71 text: "Remove";
72 field-label: "Confirm removing mapping group";
73 destructive: true;
74 clicked => {
75 root.remove-group(root.pending-remove-index);
76 root.pending-remove-index = -1;
77 }
78 }
79 }
80 }
81 }
82 }
83}
84