实现游戏日志窗口开关自动换行#6424
Conversation
|
这实现的太诡异了吧,好像也完全没处理窗口大小的变化。为什么要用这么别扭低效的方式做换行,而不是直接启用 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e67564123c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| setMaxWidth(Region.USE_PREF_SIZE); | ||
| setPrefWidth(Region.USE_COMPUTED_SIZE); |
There was a problem hiding this comment.
Restore the horizontal scrollbar when wrapping is off
When wrapTextCheckBox is unchecked, this branch lets cells become wider than the viewport, but the ListView still always has the no-horizontal-scrollbar style class from the constructor, and root.css sets that horizontal scrollbar height to 0. In unwrapped mode on a mouse/keyboard-only desktop, long log lines are clipped with no visible horizontal scroll control; toggle that style class or otherwise expose horizontal scrolling while wrapping is disabled.
Useful? React with 👍 / 👎.
自动换行目前默认值固定为开,日志窗口里可以开关,但是配置值不会持久化保存。
2026-07-17.094405.mp4
AI usage
本来是用AI写的,但是AI补丁摞补丁,写了个几百行的不知道什么出来,最后只好删了代码重新做。语言文件与
wrapTextCheckBox的定义是AI生成的EDIT: 视频演示有一处过时了,在 e675641 之后,水平滚动可以停在当前可见的最长log的右边界,而不是延伸到所有log中最长的长度