Conversation
a128b2a to
9975f52
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9975f52057
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| { | ||
| if (value == _autoScalingBufferFrameCount) return; | ||
| _autoScalingBufferFrameCount = value; | ||
| OnPropertyChanged(); |
There was a problem hiding this comment.
Clamp auto-scaling buffer frame count
AutoScalingBufferFrameCount currently accepts 0 or negative values, which can come from Settings.json, management-delivered defaults, or automation overlays (these paths bypass the NumberBox minimum). In AniScalingDecorator.MeasureOverride, such values empty the queue and then _scaleBuffer.Average() throws on an empty sequence, causing layout-time failures/crashes when the main window renders; this setter should enforce a minimum of 1 (or the measure path should guard against empty buffers).
Useful? React with 👍 / 👎.
|
|
||
| var averageScale = _scaleBuffer.Average(); | ||
| // 发生溢出时优先使用瞬时值(Min-Hold),确保立刻响应 | ||
| var targetScale = Math.Min(instantScale, averageScale); |
There was a problem hiding this comment.
Bypass buffered average when auto scaling is disabled
Turning IsAutoScalingEnabled off does not immediately stop scaling because instantScale is forced to 1.0 but targetScale is still computed as Math.Min(instantScale, averageScale), so stale buffered values below 1 keep the UI shrunk after the user disables the feature. This is visible when content was previously compressed and users toggle auto scaling off expecting an immediate return to normal size.
Useful? React with 👍 / 👎.
| var startTime = DateTime.Now; | ||
|
|
||
| DispatcherTimer.Run(() => | ||
| { |
There was a problem hiding this comment.
这里应该优先考虑使用 Avalonia 的 Transition 或 Animation 来实现动画
| <Style Selector=":edit-mode StackPanel#StackPanelRootContainer"> | ||
| <Setter Property="VerticalAlignment" Value="Center" /> | ||
| </Style> | ||
| <Style Selector=":dock-left StackPanel#StackPanelRootContainer"> |
There was a problem hiding this comment.
停靠已由主界面行进行处理,除非有必要的理由,不宜在主界面顶级进行处理
There was a problem hiding this comment.
这个问题好像是不做处理的话原来的居中设置似乎会失效,我再去看看
|
请将这两个功能拆分到两个 PR 中 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ec756c7d85
ℹ️ 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".
| _lastScale = SettingsService.Settings.Scale; | ||
| SetLayoutScale(SettingsService.Settings.Scale); |
There was a problem hiding this comment.
Initialize animated scale before first position update
UpdateWindowPos now uses GetCurrentAnimatedScale() (which returns AnimatedScale) for offset math, but the constructor only sets _lastScale and SetLayoutScale(...) here. On startup with a persisted scale other than 1.0, AnimatedScale is still its default value, so initial window/effect positioning is computed with the wrong scale until the user changes the scale setting again.
Useful? React with 👍 / 👎.
| downloadComplete = true; | ||
| dialog.Header = "插件已安装"; | ||
| statusText.Text = $"插件 {resolvedPluginInfo?.Manifest.Name ?? pluginId} 安装完成,重启应用以加载插件。"; |
There was a problem hiding this comment.
Validate install success before showing restart state
This completion block unconditionally marks the plugin as installed once DownloadTasks no longer contains pluginId, but RequestDownloadPlugin removes that entry in finally even when download/checksum fails (it stores the exception on the task in catch). In failure scenarios (e.g., network error or checksum mismatch), users will still see “安装完成” and be prompted to restart even though no plugin was installed.
Useful? React with 👍 / 👎.
啊抱歉才看到,那有点麻烦了,有几处更改是同一个文件的,我一开始忘了分 branch 了 |
这个 Pull Request 做了什么?
feat: 在主界面长度过长时不再向右溢出,而是缩放到屏幕内,并通过缓冲解决闪烁问题。
相关 Issue
Fixes #279
检查清单