Skip to content

[221_3] 软件首次启动时全屏#3142

Merged
MoonL79 merged 4 commits intomainfrom
cms/221_3/first_fullscreen
Apr 15, 2026
Merged

[221_3] 软件首次启动时全屏#3142
MoonL79 merged 4 commits intomainfrom
cms/221_3/first_fullscreen

Conversation

@MoonL79
Copy link
Copy Markdown
Contributor

@MoonL79 MoonL79 commented Apr 14, 2026

No description provided.

@MoonL79 MoonL79 self-assigned this Apr 14, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 14, 2026

Greptile Summary

本 PR 在 QTMWindow::showEvent() 中添加了首次启动(install_status == 1)时自动最大化窗口的逻辑,通过 startupMaximizedApplied 属性守卫防止多次触发,并正确地将该逻辑置于 #if defined(USE_TUTORIAL) 块之外,使其在所有构建配置中均可生效。

Confidence Score: 5/5

  • 逻辑正确,属性守卫完整,可安全合并。
  • 首次启动判断使用全局变量 install_status(值为 1),startupMaximizedApplied 属性防止了重复触发,全屏逻辑已正确移出 USE_TUTORIAL 宏块,对所有构建配置生效。未发现新的 P0/P1 问题。
  • 无需特别关注的文件。

Important Files Changed

Filename Overview
devel/221_3.md 新增任务记录文件,描述功能目标和测试步骤,无代码逻辑,无问题。
src/Plugins/Qt/QTMWindow.cpp 在 showEvent() 中新增首次启动最大化逻辑,正确引用 boot.hpp 中的 install_status,并通过 startupMaximizedApplied 属性防止重复触发;逻辑位于 USE_TUTORIAL 宏块之外,对所有构建配置均生效。

Sequence Diagram

sequenceDiagram
    participant Boot as 启动流程<br/>(init_texmacs)
    participant Widget as qt_tm_widget_rep
    participant Win as QTMWindow
    participant Qt as Qt 事件系统

    Boot->>Boot: "load_settings_and_check_version()<br/>install_status = 1(首次启动)"
    Boot->>Widget: 初始化 qt_tm_widget_rep
    Widget->>Widget: "restoreSettings()<br/>首次启动无已保存几何信息"
    Widget->>Win: show()
    Qt->>Win: "showEvent(QShowEvent*)"
    Win->>Win: QMainWindow::showEvent(event)
    Win->>Win: "install_status == 1 &&<br/>!startupMaximizedApplied?  → true"
    Win->>Win: setProperty("startupMaximizedApplied", true)
    Win->>Win: showMaximized()
    Qt->>Win: "showEvent(QShowEvent*) ← 再次触发"
    Win->>Win: "startupMaximizedApplied == true → 跳过"
    Note over Win: 窗口最大化显示
Loading

Reviews (3): Last reviewed commit: "有歧义的属性名" | Re-trigger Greptile

Comment thread src/Plugins/Qt/QTMWindow.cpp Outdated
Comment thread src/Plugins/Qt/QTMWindow.cpp Outdated
Copy link
Copy Markdown
Contributor

@da-liii da-liii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MoonL79 MoonL79 merged commit b0e8bcf into main Apr 15, 2026
5 checks passed
@MoonL79 MoonL79 deleted the cms/221_3/first_fullscreen branch April 15, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants