Tooltip、MyHint、MyMenuItem 等视觉细节与 WPF 有差异 [AI Review]

Open
#3,825 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp, xml

Research direction

Start by comparing the cited Avalonia files with the WPF equivalents: Tooltip.cs, MyHint.cs, MyMenuItem.cs, MyComboBox.axaml, the named page files, and HomepageAvaloniaRenderer.cs. The issue groups visual mismatches with hardcoded Chinese strings across several controls and pages, so review each evidence location and its WPF counterpart. Done means the listed visual differences are addressed and user visible Chinese strings are moved to language files.

Written by the indexing model from the issue text.

Description

⭕ 等待处理

🤖 这条 Issue 由 AI 代码审计批量生成,未经人工逐项复核。基线:dev@2856c2a4(迁移范围 9c4f1544..2856c2a4)。证据来自静态代码分析,欢迎在评论中补充或纠正。

现象

几处控件和页面与 WPF 版本有可见差异,功能不受影响,但观感和交互不一致。

证据

  • Tooltip:WPF 有 1px ColorBrushGray5 边框,当前 BorderThickness=0、BorderBrush=null(PCL.Launcher/UI/Controls/Common/Tooltip.cs:266-315)。
  • Tooltip 延迟:WPF 全局 100ms,当前只有三个按钮显式设置 200ms,其余使用 Avalonia 默认值。
  • MyHint:WPF 文本 Padding=12,9、Margin=0,0,0,-1;当前 Padding=12,6,12,12(MyHint.cs:59)。
  • MyMenuItem:WPF 的 SVG 图标跟随 Foreground 变色,当前固定 16×16,没有绑定(MyMenuItem.cs:68-79)。
  • ComboBox 下拉:WPF 使用自定义 MyScrollViewer 和 Fade 动画,当前是普通 ScrollViewer,无 Fade(MyComboBox.axaml:119-125)。
  • DropDownWidthSync:收藏夹和联机页在 WPF 中设为 False,当前没有设置(PageDownloadCompFavorites.axaml:30-34、PageToolsGameLink.axaml:219-225)。
  • 新闻卡片:WPF 是可变高度瀑布流,当前固定 EstimatedCardHeight = 360(PageHomepageNewsView.axaml.cs:124-133)。
  • 页面边距:PageInstanceCompResource.axaml:14 从 25,10 改成 25,25;PageInstanceServer.axaml:69-72 从 10,25,10,10 改成 25,25,25,25。
  • 二级标题栏:WPF 有 Margin=-16,0,0,0,当前没有负偏移(TitleBar.axaml:112-133)。
  • 硬编码中文:PageSetupLauncherMisc.axaml:127 仍有 HintText="比如 http://127.0.0.1:1080/";HomepageAvaloniaRenderer.cs:35,54 和 PageLaunchRight.axaml.cs:363,385,400 有中文错误串。

影响

从 WPF 版本切换过来的用户会觉得某些细节变了。硬编码中文会让英文用户看到中文。

建议

  • 按上表逐项对照 WPF,优先修 Tooltip、MyHint、MyMenuItem。
  • ComboBox 下拉增加自定义滚动条和出现动画。
  • 新闻卡片改回可变高度,或至少按内容测量。
  • 页面边距和标题栏偏移按 WPF 复原。
  • 硬编码中文移到语言文件。

验收

  • Tooltip、MyHint、MyMenuItem 与 WPF 的边框、间距、颜色状态一致。
  • ComboBox 下拉和新闻瀑布流观感接近 WPF。
  • AXAML 和代码里没有用户可见的硬编码中文。
Dominant language
C#
Stars
4.3k
Forks
148
Avg merge
1d 6h
Merged PRs (30d)
64

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PCL-Community/PCL-CE

All issues in PCL-Community/PCL-CE

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.