TrafficMonitor icon indicating copy to clipboard operation
TrafficMonitor copied to clipboard

Fix incorrect TaskBarDlg alignment in Win11 Bate / 修复在 Win11 中不正确的 TaskBarDlg 对齐问题

Open GZTimeWalker opened this issue 2 years ago • 49 comments

修正在 win11 22581.100 下 TaskBarDlg 的对齐策略。通过以 TaskBar 为父对象,并参考 TrayNotifyWnd 左侧边缘进行对齐。

此 PR 未经过通用性验证,仅为修正此问题提供解决思路,请勿直接 merge。

Issue: #777

由于未经过详细测试,不保证兼容性和可用性,仅做测试版本的临时解决方案。详细修复方案和稳定版本请静候 Release 和 Windows 11 稳定版本的发布。 Since it has not been tested in detail, compatibility and availability are not guaranteed, only temporary solutions for the tested version are made. Please wait for Windows 11 stable release for detailed fixes and stable versions.

Release 文件下载,可供临时使用: Release files are provided for temporary use only:

!!! 2022.07.10 Update !!!

相关 Github Action 见: Release CI Action

GZTimeWalker avatar Mar 26 '22 12:03 GZTimeWalker

这个有可能重新设定一下底下的任务图标最大宽度好不让过多的图标和这个重叠吗?

AzulEterno avatar Mar 26 '22 14:03 AzulEterno

还可以通过一个是MSTaskSwWClass类的,标题为 运行中的应用程序 的窗口的右边缘确定任务栏图标的范围吧。 在双屏模式下这个类只有这一个窗口存在,应该可以直接找到。 不知道可不可以在这个窗口尺寸变化的时候修改这个窗口的位置来实现避免和这个程序冲突(代价是居中情况下任务栏图标只能靠左一些了吧)。 系统版本 22000.556。

BombaxCeiba avatar Mar 26 '22 16:03 BombaxCeiba

还可以通过一个是MSTaskSwWClass类的,标题为 运行中的应用程序 的窗口的右边缘确定任务栏图标的范围吧。 在双屏模式下这个类只有这一个窗口存在,应该可以直接找到。 不知道可不可以在这个窗口尺寸变化的时候修改这个窗口的位置来实现避免和这个程序冲突(代价是居中情况下任务栏图标只能靠左一些了吧)。 系统版本 22000.556。

这就是默认行为,在新版本的 win11 中这个方法失效了。 MSTaskSwWClass 的宽度会随着任务栏图标个数变化,具体可见相关 issue 的讨论。

GZTimeWalker avatar Mar 29 '22 13:03 GZTimeWalker

我的意思其实是监视这个尺寸的变化并动态调整程序或这个窗口的尺寸和位置。

BombaxCeiba avatar Mar 30 '22 14:03 BombaxCeiba

我的意思其实是监视这个尺寸的变化并动态调整程序或这个窗口的尺寸和位置。

对齐所用窗口的监视是一直执行的,如果你的意思为左对齐紧靠图标列表的话,确实是可行的。但就我个人使用习惯而言,我并不支持这样的显示样式,如有需求,或许可以实现为可选配置。

GZTimeWalker avatar Mar 30 '22 15:03 GZTimeWalker

其实没有说要实现成那样的意思。 读了下代码发现你用的是TrayNotifyWnd。我看这个窗口xp就有了,应该不会有什么兼容性问题。 如果担心的话其实最多改一下作者WinVersionHelper.h文件中的CWinVersionHelper类,加个判22581版本(m_build_number)的函数应该就行了。

BombaxCeiba avatar Mar 30 '22 16:03 BombaxCeiba

image 22598.1更新之后在任务管理器重启Windows资源管理器会跑到右边去了。

shixinwu avatar Apr 14 '22 03:04 shixinwu

image 22598.1更新之后在任务管理器重启Windows资源管理器会跑到右边去了。

麻,等我升级之后看一下情况……看来是连通知这个窗口都给改了大小……

GZTimeWalker avatar Apr 14 '22 05:04 GZTimeWalker

image 22598.1更新之后在任务管理器重启Windows资源管理器会跑到右边去了。

麻,等我升级之后看一下情况……看来是连通知这个窗口都给改了大小……

而且这个版本经常复制粘贴文件,资源管理器就会崩溃,但是好像用截图工具截图之后,又会到正确的位置。

shixinwu avatar Apr 15 '22 01:04 shixinwu

image 22598.1更新之后在任务管理器重启Windows资源管理器会跑到右边去了。

而且这个版本经常复制粘贴文件,资源管理器就会崩溃,但是好像用截图工具截图之后,又会到正确的位置。

image

抱歉我无法成功复现你所描述的情形,或许你应该自己排查一下是不是因为其他原因导致?

GZTimeWalker avatar Apr 15 '22 21:04 GZTimeWalker

似乎在没有打开窗口时,任务栏窗口会有往上偏移的情况。打开任意一个窗口后又能摆正回来: 1 QQ截图20220416121344 版本是22598

AsaNikko avatar Apr 16 '22 04:04 AsaNikko

感谢感谢,终于正常了

HKMV avatar Apr 16 '22 16:04 HKMV

I was waiting for this fix for days. Didn't knew that was fixed, omg. Thx! I'm happy now wvN4TB4JoM

netistul avatar Apr 17 '22 00:04 netistul

请问你的字体是什么

qiaomuluoyu avatar Apr 19 '22 03:04 qiaomuluoyu

同问,你的字体是什么?为什么如此清晰锐利,是进行了什么操作吗?

sceraser avatar Apr 19 '22 06:04 sceraser

字体是Mi Sans,可以在这里下载到:https://web.vip.miui.com/page/info/mio/mio/detail?postId=33935854

AsaNikko avatar Apr 19 '22 06:04 AsaNikko

似乎在没有打开窗口时,任务栏窗口会有往上偏移的情况。打开任意一个窗口后又能摆正回来: 1 QQ截图20220416121344 版本是22598

老哥你的怎么离小组件那么近怎么弄得 我的离得好远

jiuban590 avatar Apr 20 '22 02:04 jiuban590

我有设定勾选了这个,外加显示文本设置里把最左侧的项目前面加了一堆空格 QQ截图20220420112937 QQ截图20220420112955

AsaNikko avatar Apr 20 '22 03:04 AsaNikko

请问你的字体是什么

Orbitron Medium, 8pt

GZTimeWalker avatar Apr 20 '22 12:04 GZTimeWalker

我有设定勾选了这个,外加显示文本设置里把最左侧的项目前面加了一堆空格 QQ截图20220420112937 QQ截图20220420112955

谢谢老哥,我发现配置文件也能改左边边距

jiuban590 avatar Apr 21 '22 03:04 jiuban590

Fixed alignment policy for TaskBarDlg under win11 22581.100. Align by taking as the parent object and refer to the left edge.TaskBar``TrayNotifyWnd

This PR has not been validated for generality, and only provides a solution to fix this issue, please do not merge directly.

Issue: #777

**Since it has not been tested in detail, compatibility and availability are not guaranteed, and only the temporary solution is tested. For detailed fixes and stable releases, please wait for release and release of the stable version of Windows 11. ** Since it has not been tested in detail, compatibility and availability are not guaranteed, only temporary solutions for the tested version are made. Please wait for Windows 11 stable release for detailed fixes and stable versions.

Release files are provided for temporary use only:

For related Github Actions, see: Release CI Action

Thank you so much. This is working fine on my insider build.

Skylark1952 avatar Apr 24 '22 11:04 Skylark1952

这个PR有什么问题吗?为啥没合并?

ipcjs avatar Apr 27 '22 15:04 ipcjs

这个PR有什么问题吗?为啥没合并?

  1. 此PR改变了对齐方式,可能会导致老版本兼容性问题,这方面我没有条件测试。
  2. 此PR对应的windows版本为内部测试版本,并非稳定版本,原作者不对测试版本进行适配。

GZTimeWalker avatar Apr 27 '22 16:04 GZTimeWalker

@GZTimeWalker Action里面打包的似乎是完整版,我要打包Lite版要怎么修改build命令?

ipcjs avatar Apr 27 '22 17:04 ipcjs

似乎在没有打开窗口时,任务栏窗口会有往上偏移的情况。打开任意一个窗口后又能摆正回来: 1 QQ截图20220416121344 版本是22598

兄弟,你这个问题解决了吗?

cy9102 avatar Apr 28 '22 06:04 cy9102

终于正常了,我的是Win 11 Build 22610.1 image

ChaXxl avatar May 01 '22 01:05 ChaXxl

@ChaXxl 我的也是 Build 22610,請問一下你靠左邊的那個選項(天氣app置左)也是正常的嗎? 我之前 22598 的時候也是好的,更新完又會蓋過去了:<

seanmamasde avatar May 02 '22 06:05 seanmamasde

似乎在没有打开窗口时,任务栏窗口会有往上偏移的情况。打开任意一个窗口后又能摆正回来: 1 QQ截图20220416121344 版本是22598

兄弟,你这个问题解决了吗?

固定一个图标在任务栏上就好了,不需要打开

icecreamZeng avatar May 02 '22 06:05 icecreamZeng

修正在 win11 22581.100 下 TaskBarDlg 的对齐策略。通过以 TaskBar 为父对象,并参考 TrayNotifyWnd 左侧边缘进行对齐。

此 PR 未经过通用性验证,仅为修正此问题提供解决思路,请勿直接 merge。

Issue: #777

由于未经过详细测试,不保证兼容性和可用性,仅做测试版本的临时解决方案。详细修复方案和稳定版本请静候 Release 和 Windows 11 稳定版本的发布。 Since it has not been tested in detail, compatibility and availability are not guaranteed, only temporary solutions for the tested version are made. Please wait for Windows 11 stable release for detailed fixes and stable versions.

Release 文件下载,可供临时使用: Release files are provided for temporary use only:

相关 Github Action 见: Release CI Action

修正在 win11 22581.100 下 TaskBarDlg 的对齐策略。通过以 TaskBar 为父对象,并参考 TrayNotifyWnd 左侧边缘进行对齐。

此 PR 未经过通用性验证,仅为修正此问题提供解决思路,请勿直接 merge。

Issue: #777

由于未经过详细测试,不保证兼容性和可用性,仅做测试版本的临时解决方案。详细修复方案和稳定版本请静候 Release 和 Windows 11 稳定版本的发布。 Since it has not been tested in detail, compatibility and availability are not guaranteed, only temporary solutions for the tested version are made. Please wait for Windows 11 stable release for detailed fixes and stable versions.

Release 文件下载,可供临时使用: Release files are provided for temporary use only:

相关 Github Action 见: Release CI Action image 终于正常了,感谢!

GGG962464 avatar May 04 '22 14:05 GGG962464

整合版, 合并了 https://github.com/zhongyang219/TrafficMonitor/pull/1097 https://github.com/zhongyang219/TrafficMonitor/pull/1106 https://github.com/zhongyang219/TrafficMonitor/pull/1156 https://github.com/eritpchy/TrafficMonitor/actions/runs/2288673613

eritpchy avatar May 08 '22 06:05 eritpchy