[222_70] compact toolbar and fix native menu bar empty strip (#2877)#2878
[222_70] compact toolbar and fix native menu bar empty strip (#2877)#2878AnvarAtayev wants to merge 1 commit intoMoganLab:mainfrom
Conversation
|
Hi @MoonL79 , thank you for your feedback. I will improve the change and will submit changes to this PR |
Greptile Summary本 PR 针对 macOS 上
Confidence Score: 4/5macOS 修复正确,但 Linux HiDPI 菜单栏高度 bug 仍未解决,建议合并前一并处理 macOS 相关修复逻辑清晰,CSS 变更对称且合理。但 Linux 非 macOS 路径中 src/Plugins/Qt/qt_tm_widget.cpp — install_main_menu() 中 Linux 分支的 setFixedHeight 计算 Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[update_visibility 或 install_main_menu 被调用] --> B{当前平台是否为 macOS?}
B -- 是 --> C{use_native_menubar 是否启用?}
B -- 否 --> D[use_native_menu_bar_in_window = false]
C -- 是 --> E[use_native_menu_bar_in_window = true]
C -- 否 --> F[use_native_menu_bar_in_window = false]
D --> G[new_menuVisibility 正常计算]
F --> G
E --> H[new_menuVisibility = false]
G --> I[menuToolBar 正常显示]
H --> J[menuToolBar 隐藏,消除空白条]
I --> K{install_main_menu: 需要显示?}
K -- 是 --> L[menuToolBar.setVisible true]
K -- 否 --> M[跳过,保持当前状态]
|
6d4d81c to
6293775
Compare
6293775 to
fe401fa
Compare
|
Hi @MoonL79, I have now modified the PR to revert some of the changes that caused regressions for Debian systems, and made the native menubar changes specific for MacOS |

Closes Issue #2877
Summary
Two related UI improvements for the liii/liii-night themes on macOS:
use_native_menubaris enabled, themenuToolBarcontainer remained visible at full height even though its content moved to the system menu bar. The toolbar is now hidden in this case.Also removes an incorrect
setFixedHeight(108 * devicePixelRatio)on theQMenuBarwidget, which was setting a physical-pixel value on a logical-pixel widget (resulting in a 216 px tall menu bar on Retina displays).Files Changed
TeXmacs/misc/themes/liii.cssTeXmacs/misc/themes/liii-night.csssrc/Plugins/Qt/qt_tm_widget.cppHow to Test
liii) theme; verify toolbar rows are more compactuse_native_menubarin Preferences -> User Interface; verify no empty strip remains below the title baruse_native_menubar; verify the in-window menu bar returns correctlyOLD -

use_nativebar=TrueOLD -

use_nativebar=FalseNEW
