Skip to content

Add text ellipsization and monospace font to GTK GUI #31

Description

@TheZupZup

Overview

Two specific readability gaps exist in the GTK GUI (main.py):

  1. Long process names (e.g. firefox-esr, /usr/lib/chromium/chromium) overflow their column or get cut off abruptly with no visual indicator that text is truncated.
  2. The activity log text view uses the default GTK font, which is a proportional font. Log output (timestamps, IPs, process names) reads much better in monospace.

What needs to be done

  • For the Process column's CellRendererText, set ellipsization: renderer.set_property("ellipsize", Pango.EllipsizeMode.END) — this shows "firefox-e…" instead of a hard cut
  • Import Pango at the top of main.py (via from gi.repository import Pango)
  • For the activity log Gtk.TextView, set a monospace font: log_view.modify_font(Pango.FontDescription("Monospace 10"))

Goal

Long process names are ellipsized cleanly, and the activity log uses a monospace font for readable alignment.

Notes

Both changes are purely visual — no logic changes needed. This is a good first issue for anyone learning PyGObject.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions