xapp-status applet: status icon labels are ellipsized to "..." when the panel zone is a fraction of a pixel short

Abierto Apto para principiantes
#14,096 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 8 días

@Priyeshshrivastav ya está trabajando en esto.

Desde el 4/11/2026.

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
88/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript
Área
desktop

Línea de trabajo

Abre files/usr/share/cinnamon/applets/[email protected]/applet.js y lee la configuración de la etiqueta de XAppStatusIcon alrededor de la línea 131. Compárala con la configuración de TextIconApplet en js/ui/applet.js; el issue propone un cambio de una línea para probar. Se considera terminado cuando la etiqueta de estado de XApp muestra el texto completo pese a que el ancho del panel se queda corto por una fracción.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
  1. 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).
  2. 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()
    
  3. The label is shown as ... (or cut short, e.g. ↑12 ↓7 ✎3 as ↑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.

Lenguaje dominante
JavaScript
Estrellas
5.7k
Forks
941
Merge medio
6 d 18 h
PR fusionados (30 d)
12

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de linuxmint/cinnamon

Todos los issues de linuxmint/cinnamon

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.