"Top" default positions ignored when the panel is at the top of the screen – new notes always open top left
维护者通常 8 天内回复
还没有人认领这个 Issue。
评估
调研方向
定位 Sticky Notes 小程序源码,检查 get_direction() 和 find_note_location()。在面板位于顶部的情况下复现,然后验证位置计算加上了 workarea.x/workarea.y,并且边界检查按正确顺序使用便笺的宽度和高度。完成的标准是:Top Right/Top Center 在顶部面板下方打开,且 fallback 不再触发。
由索引模型根据 Issue 内容生成。
描述
Distribution
Linux Mint 22.3
Package version
Cinnamon 6.6.9
Graphics hardware in use
No response
Frequency
Always
Bug description
With the Cinnamon panel at the top of the screen, setting Preferences → Notes → Default position to "Top Right" (or "Top Center") has no effect: every new note opens in the top left corner. "Center Right" and "Bottom Right" work as expected.
Steps to reproduce
- Move the Cinnamon panel to the top of the screen (panel height > 20 px).
- In Sticky Notes, set Default position to "Top Right".
- Create a new note from the tray icon.
Expected behavior
Expected: the note opens in the top right corner, below the panel.
Actual: the note opens in the top left corner.
Additional information
Cause
In get_direction() the position is computed from the workarea size only, without the workarea origin:
else:
y = 20
With a top panel, workarea.y equals the panel height, so y = 20 lies inside the panel. find_note_location() then fails the bounds check (y < min_y) and falls back to workarea.x + 20, workarea.y + 20, i.e. top left. The same applies to x with a panel on the left.
Suggested fix: add the workarea origin, e.g. x = workarea_rect.x + … and y = workarea_rect.y + 20.
Possibly related
In the bounds check of find_note_location(), width and height seem to be swapped:
x_end = x + default-height
y_end = y + default-width
System
- Linux Mint 22.3
- sticky 1.31
- Panel position: top
- 主要语言
- JavaScript
- 星标
- 5.7k
- 派生
- 941
- 平均合并
- 6 天 18 小时
- 30 天内合并 PR
- 12
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
linuxmint/cinnamon 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 8 天内回复
-
BUG
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 8 天内回复
-
Menu applet omits descriptions from search-provider results可能已有人在做 @ah682 于 9 天前认领。 未关闭BUG
难度 2/5 1-3 小时 新手友好度 66/100
linuxmint/cinnamon#14104 · 2 条评论 ·
维护者通常 8 天内回复
-
xapp-status applet: status icon labels are ellipsized to "..." when the panel zone is a fraction of a pixel short可能重新可做 @Priyeshshrivastav 于 15 天前认领,目前没有进行中的 PR。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
linuxmint/cinnamon#14096 · 1 条评论 ·
维护者通常 8 天内回复
-
Grouped Window List applet gets out of sync when a program is removed directly from Startup Applications可能重新可做 @Aaqibhafeezkhan 于 33 天前认领,目前没有进行中的 PR。 未关闭BUG
难度 2/5 1-3 小时 新手友好度 74/100
linuxmint/cinnamon#14057 · 1 条评论 ·
维护者通常 8 天内回复
查看 linuxmint/cinnamon 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
mailcow/mailcow-dockerized#7677 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
gcivil-nyu-org/team5-mon-fall26#145 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
-
needs discussion
难度 2/5 1-3 小时 新手友好度 78/100
openfga/openfga.dev#1436 · 1 条评论 ·
维护者通常 2 天内回复