Skip to content
  • Cosimo Cecchi's avatar
    pathbar: fix unwanted ellipsizing in buttons with certain themes · d808c2d0
    Cosimo Cecchi authored
    Themes can nowadays set padding on GtkLabel widgets (e.g. Ambiance and
    Radiance do this for labels in primary toolbar buttons). This breaks our
    hack to force a size request for the pathbar labels, since we measure
    the PangoLayout directly instead of measuring the GtkLabel it's part of
    (which includes the border/padding values from the theme).
    
    Fix this by measuring the size requisition of GtkLabel directly; for
    this to work effectively, we need to pack an (invisible) additional
    label in the button GtkBox, always set the text to both labels and
    update the requisition of the non-bold one to
    MIN(MAX_POSSIBLE_WIDTH, MAX (width, bold_width)) every time a
    size-request cycle is called.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678341
    d808c2d0