Skip to content

[Feature Request] Make picker width fit browser list instead of URL length #258

Open

Description

@serogee

The picker can currently become much wider than necessary when opening a long URL

The picker width currently seems to be affected by the length of the URL. With a very long URL, the picker can become a lot wider than the browser list, which can leave a large amount of empty space after the last browser when only a few browsers are configured.

Current Behavior

Image

I think it would be nicer if the picker instead hugged the width of the browser list (plus the normal padding/controls and a minimum width for the address bar), regardless of how long the URL is. The URL could be clipped to fit the available width, similar to how it's handled currently when it doesn't fit the screen.

Expected behavior / example:

Image

Even if the URL becomes longer than the available width, it would be clipped while the picker remains at the size shown.

Would appreciate any thoughts on this. Thank you!

Activity

  1. aloneguid commented on Oct 5, 2026

    @aloneguid
    Owner

    I've tried to play with this and it's OK unless either URL is too small or the number of browsers is small. I've added the "min width" parameter to v6.3.1 – let's see if this helps?

  2. serogee commented on Oct 10, 2026

    @serogee
    Author

    Thanks for the hard work! Sorry, I think I explained the desired behavior poorly.

    Now on v6.3.1 with 8 browsers on a wider screen:

    CURRENT BEHAVIOR

    Long URL

    Image

    Short URL

    Image

    I would expect the picker to have the same width in both cases, based on the browser list. In these examples, it should be wide enough to keep all eight entries on one row, without the extra empty space shown in the "Long URL" image above.

    The long URL should be clipped inside the address bar instead of making the picker wider, and a short URL should not make the picker narrower and cause the last browser to wrap onto a second row.

    Would it make sense to calculate the width from the browser list, plus a minimum width for the address bar and action buttons, rather than from the URL text? The minimum-width setting helps with small layouts, but I think the URL itself should not affect the picker width.

  3. oocsng commented on Oct 11, 2026

    @oocsng
    Contributor

    should size the picker from the browser list rather than the URL text length:

    float box_size_total = box_size_scaled + padding_scaled * 2;
    float browsers_width = box_size_total * static_cast(choices.size()) + style.WindowPadding.x * 2;
    float min_header_width = 180.0f * w::scale + action_button_width * (action_menu_items.size() + 2);
    float target_width = max(browsers_width, min_header_width);
    float w_width = clamp(target_width, min_mon_width, max_mon_width);
    float usable_w = max(0.0f, w_width - style.WindowPadding.x * 2);
    items_per_w = max<size_t>(1, static_cast<size_t>(usable_w / box_size_total));
    lines_total = static_cast<size_t>(ceil(static_cast(choices.size()) / static_cast(items_per_w)));

  4. aloneguid commented on Oct 12, 2026

    @aloneguid
    Owner

    I think there's a bug in calculating width for icons "larger than the default". Looking into it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions