Skip to content

Commit 97a569c

Browse files
committed
update the ui style
1 parent 6e9370c commit 97a569c

File tree

6 files changed

+14
-25
lines changed

6 files changed

+14
-25
lines changed

entry/src/main/ets/entryability/EntryAbility.ets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const DOMAIN = 0x0000;
77

88
export default class EntryAbility extends UIAbility {
99
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
10-
this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET);
10+
this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_DARK);
1111
hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate');
1212
}
1313

entry/src/main/ets/pages/Index.ets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ struct Index {
121121
}
122122
}`
123123
})
124+
.backgroundColor('#000')
124125
}
125126
.width('100%')
126127
.height('100%')

entry/src/main/resources/base/element/color.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"color": [
33
{
44
"name": "start_window_background",
5-
"value": "#FFFFFF"
5+
"value": "#000000"
66
}
77
]
88
}
757 Bytes
Loading
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
<!doctype html>
2-
<meta charset="utf-8">
3-
<meta name="viewport" content="height=device-height, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
4-
<link rel="stylesheet" href="term.css">
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport"
6+
content="height=device-height, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
7+
<link rel="stylesheet" href="term.css">
8+
</head>
9+
<body background="#000">
510
<div id="terminal"></div>
611
<script src="hterm_all.js"></script>
712
<script src="term.js"></script>
13+
</body>
14+
</html>

entry/src/main/resources/rawfile/term.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@ window.onload = async function () {
1616
await lib.init();
1717
window.term = new hterm.Terminal();
1818

19-
// make everything invisible so as to not be embarrassing
20-
term.getPrefs().set('background-color', 'transparent');
21-
term.getPrefs().set('foreground-color', 'transparent');
22-
19+
term.getPrefs().set('cursor-color', '#cccccc');
2320
term.getPrefs().set('terminal-encoding', 'iso-2022');
2421
term.getPrefs().set('enable-resize-status', false);
2522
term.getPrefs().set('copy-on-select', false);
2623
term.getPrefs().set('enable-clipboard-notice', false);
27-
term.getPrefs().set('user-css-text', termCss);
2824
term.getPrefs().set('screen-padding-size', 4);
2925
// Creating and preloading the <audio> element for this sometimes hangs WebKit on iOS 16 for some reason. Can be most easily reproduced by resetting a simulator and starting the app. System logs show Fig hanging while trying to do work.
3026
term.getPrefs().set('audible-bell-sound', '');
@@ -34,21 +30,6 @@ window.onload = async function () {
3430
term.installKeyboard();
3531
};
3632

37-
var termCss = `
38-
x-screen {
39-
background: transparent !important;
40-
overflow: hidden !important;
41-
-webkit-tap-highlight-color: transparent;
42-
}
43-
x-row {
44-
text-rendering: optimizeLegibility;
45-
font-variant-ligatures: normal;
46-
}
47-
.uri-node {
48-
text-decoration: underline;
49-
}
50-
`;
51-
5233
function onTerminalReady() {
5334

5435
// Functions for native -> JS

0 commit comments

Comments
 (0)