#1242 new todo

shorten ID-Label text to fit into size constraints

Reported by: Ichthyostega Owned by:
Priority: lesser Milestone: 1alpha
Component: lumieraGui Keywords: gui design GTK display slick
Sub Tickets: #1235, #1238, #1240 Parent Tickets: #1025, #1185

Description

As Lumiera user,
I want long names of clips in the Timeline to be shortened (instead of completely hidden),
to make the Clips fit into a given temporal extension

technical spec

The basic framework for adapting to size constrained layout is already in place and integrated into ElementBoxWidget; however, the implementation just hides the name-ID completely, in case it can not be displayed within a size constrained widget. Obviously it would be far more adequate, just to shorten the names.

  • find out what needs to be done to get an immediate feedback from GTK about the resulting screen extension after shortening a text
  • find a solution how to retrieve the full text, once there is again enough space for display.
    • Beware: Clip display in a large Timeline creates a significant leverage
    • it might not be feasible just to duplicate that string for each and every widget
    • also it might be dangerous to heap-allocate an additional buffer when shortening Clip labels
    • further investigation is thus indicated, see #1240
    • possibly we need to do an asynchronous round-trip to the session, where the full name-ID is always retained
  • moreover, find out how a given number of characters translates into pixels
  • store this heuristic finding in the Advice system and use it for further layout calculations
  • finally integrate this elaborate scheme at the marked point in element-box-widget.cpp

Change history (4)

comment:1 by Ichthyostega <prg@…>, at 2022-10-03T04:10:28Z

In ea53ef34/Lumiera:

ElementBox: coping with size constraints (closes #1238)

devise a more fine grained algorithm for adapting the display of IDLabel
to a situation with size constrained layout, e.g. for a time calibrated canvas.
We still do not implement the shortening of ID labels (see #1242),
since doing so would be surprisingly expensive. But at least we
do proceed in several steps now

  • first attempt to reduce the name-ID (for now: hide it)
  • if this doesn't suffice, also hide the menu
  • and as a last resort, hide the icon and thus make the IDLabel empty

comment:2 by Ichthyostega, at 2022-10-15T16:53:15Z

blockedby: 1238, 12401238

comment:3 by Ichthyostega, at 2022-10-16T01:28:52Z

blockedby: 12381235, 1238

comment:4 by Undercover Agent, at 2025-12-25T00:00:00Z

blockedby: 1235, 1238
blocking: 1185, 1025
Parent Tickets: 1025, 1185
Sub Tickets: 1235, 1238, 1240

Migration MasterTickets ⟼ Subtickets-plugin

Note: See TracTickets for help on using tickets.