xapp-status applet: status icon labels are ellipsized to "..." when the panel zone is a fraction of a pixel short
Maintainer thường phản hồi trong vòng 8 ngày
@Priyeshshrivastav đang làm issue này rồi.
Từ ngày 4/11/2026.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 88/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- desktop
Hướng nghiên cứu
Mở files/usr/share/cinnamon/applets/[email protected]/applet.js và đọc phần thiết lập nhãn của XAppStatusIcon quanh dòng 131. So sánh với thiết lập TextIconApplet trong js/ui/applet.js; issue đưa ra một thay đổi một dòng để thử. Hoàn tất khi nhãn trạng thái XApp hiển thị đầy đủ văn bản dù chiều rộng panel thiếu một phần nhỏ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Distribution
Linux Mint 22.3 (X11)
Package version
6.6.9
Graphics hardware in use
No response
Frequency
Always
Bug description
Hi, and thanks for Cinnamon!
The label of an XApp status icon (for example a counter like 3 or 12) is shown as only ... in the panel, although the panel has plenty of free space. Labels of applets built on TextIconApplet (such as the notifications counter) in the same panel are not affected.
Cause, as far as I can tell: if any applet in the right zone reports a fractional natural width (here multicore-sys-monitor, 173.48 px), Panel._calcBoxSizes() rounds the zone boundary to the nearest pixel, so the zone gets up to half a pixel less than it asked for (931 px for 931.48 px). The xapp-status label is the only child in the zone whose minimum width is smaller than its natural width, so the box layout takes the shortfall from it. Its ClutterText ellipsizes, and a label that gets 70 px instead of its natural 71 px is drawn as ....
TextIconApplet labels don't have this problem because js/ui/applet.js sets clutter_text.ellipsize = Pango.EllipsizeMode.NONE on them.
Steps to reproduce
- Have an applet with a fractional natural width in the right zone of the panel (for example multicore-sys-monitor@ccadeptic23). Its width can be checked in Looking Glass with
actor.get_preferred_width(-1). - Show an XApp status icon with a label, e.g.:
import gi gi.require_version("XApp", "1.0"); gi.require_version("Gtk", "3.0") from gi.repository import XApp, Gtk icon = XApp.StatusIcon() icon.set_icon_name("dialog-information-symbolic") icon.set_label("12") Gtk.main() - The label is shown as
...(or cut short, e.g.↑12 ↓7 ✎3as↑12 ↓7 ...).
Expected behavior
The label is shown in full, like the labels of other applets.
Additional information
A one-line fix, the same setting TextIconApplet uses. I've been running it as a user override in ~/.local/share/cinnamon/applets/ and labels now render in full, with no other change in the panel:
--- a/files/usr/share/cinnamon/applets/[email protected]/applet.js
+++ b/files/usr/share/cinnamon/applets/[email protected]/applet.js
@@ -1,6 +1,7 @@
const Cinnamon = imports.gi.Cinnamon;
const Lang = imports.lang;
const St = imports.gi.St;
+const Pango = imports.gi.Pango;
const Gio = imports.gi.Gio;
const Clutter = imports.gi.Clutter;
const Interfaces = imports.misc.interfaces;
@@ -131,6 +132,7 @@ class XAppStatusIcon {
this.label = new St.Label({
'y-align': St.Align.END,
});
+ this.label.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
this.actor.add_actor(this.icon_holder);
this.actor.add_actor(this.label);
The rounding in _calcBoxSizes() might be worth a look separately, but this alone fixes the visible problem.
- Ngôn ngữ chính
- JavaScript
- Star
- 5.7k
- Fork
- 941
- Merge trung bình
- 6 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linuxmint/cinnamon
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 8 ngày
-
BUG
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 8 ngày
-
Sound applet: seek bar jumps back after seeking when player resends metadata (e.g. mpDris2/MPD)Đang mởBUG
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 8 ngày
-
Menu applet omits descriptions from search-provider resultsCó thể đã có người làm @ah682 đã nhận 8 ngày trước. Đang mởBUG
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
linuxmint/cinnamon#14104 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 8 ngày
-
Grouped Window List applet gets out of sync when a program is removed directly from Startup ApplicationsCó thể làm lại được @Aaqibhafeezkhan đã nhận 32 ngày trước và không có pull request nào đang mở. Đang mởBUG
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
linuxmint/cinnamon#14057 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 8 ngày
Tất cả issue của linuxmint/cinnamon
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
needs discussion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openfga/openfga.dev#1436 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Add Aurex BrowserĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
ImranR98/apps.obtainium.imranr.dev#2018 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
521xueweihan/HelloGitHub#4416 ·
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày