Skip to content

Add trust-based color coding to GTK GUI connection list #32

Description

@TheZupZup

Overview

The TUI already color-codes connections by trust level (red for Unknown, green for Known, yellow for Local, bold red for Blocked). The GTK GUI displays the trust value in a text column but uses no colors — all rows look identical visually regardless of trust status.

What needs to be done

  • For the Trust column's CellRendererText, use TreeViewColumn.set_cell_data_func() to apply colors dynamically based on the trust value of each row
  • Suggested color scheme to match the TUI:
    • Unknown → red foreground (#cc0000 or red)
    • Known → green foreground (#2d8a2d or darkgreen)
    • Local → grey foreground (#888888)
    • Blocked → red foreground + bold weight
  • Optionally, apply a subtle background color to the entire row for Unknown and Blocked connections for higher visibility

Goal

Trust status is visually distinct at a glance in the GTK GUI, matching the color coding the TUI already provides.

Notes

  • This is purely visual — no data or logic changes needed
  • The trust string value is already stored in the Gtk.ListStore model and available to set_cell_data_func()
  • Example pattern from GTK docs: column.set_cell_data_func(renderer, self._color_cell, None)

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