Skip to content

Commit 10c5445

Browse files
committed
[*] improve ui
1 parent eb453ad commit 10c5445

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

flymoon/ui/panel/desktop/chat/md.slint

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
import { Theme, Store, Logic, Icons, Util } from "../../def.slint";
2-
import { ChatEntry, MdElementType, MdMath, MdElement, MdUrl, MdHeading, MdListItem, MdTable, MdCodeBlock } from "../../../store.slint";
3-
import { IconBtn, Label, Link, ToolTipSetting, ComponentPosition } from "../../../base/widgets.slint";
2+
import {
3+
ChatEntry,
4+
MdElementType,
5+
MdMath,
6+
MdElement,
7+
MdUrl,
8+
MdHeading,
9+
MdListItem,
10+
MdTable,
11+
MdCodeBlock,
12+
} from "../../../store.slint";
13+
import {
14+
IconBtn,
15+
Label,
16+
Link,
17+
ToolTipSetting,
18+
ComponentPosition,
19+
} from "../../../base/widgets.slint";
420
import { ScrollView } from "std-widgets.slint";
521

622
export component MdText inherits HorizontalLayout {
@@ -108,7 +124,7 @@ export component MdCodeBlock inherits HorizontalLayout {
108124
// `ScrollView` could catch scroll event. However, short content should not catch scroll event
109125
Rectangle {
110126
private property <float> rate: 0.5;
111-
private property <bool> use-scrollview: txt-rect.preferred-height > (Theme.default-height * rate);
127+
private property <bool> use-scrollview: false; // txt-rect.preferred-height > (Theme.default-height * rate);
112128

113129
height: use-scrollview ? Theme.default-height * rate : txt-rect.preferred-height;
114130

@@ -307,7 +323,6 @@ export component MdDetail inherits Rectangle {
307323

308324
img: entry.math;
309325
}
310-
311326
}
312327

313328
if urls.length > 0: MdLinks {

0 commit comments

Comments
 (0)