"Top" default positions ignored when the panel is at the top of the screen – new notes always open top left

オープン 初心者向け
#14,133 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 8 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
linux, python
領域
desktop

調査の方向性

Sticky Notes アプレットのソースを特定し、get_direction() と find_note_location() を確認する。パネルを上部に置いた状態で再現し、位置計算が workarea.x/workarea.y を加算していること、および境界チェックがノートの幅と高さを正しい順序で使っていることを検証する。完了条件は、Top Right/Top Center が上部パネルの下に開き、フォールバックが発生しなくなること。

索引モデルが issue の本文から書いたものです。

説明

BUG
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
  1. Move the Cinnamon panel to the top of the screen (panel height > 20 px).
  2. In Sticky Notes, set Default position to "Top Right".
  3. 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
平均マージ
7日 9時間
マージ済み PR(30日)
13

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linuxmint/cinnamon のほかの issue

linuxmint/cinnamon の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。