Skip to content

Calculate the available width for the breadcrumb based on shown buttons #443

@oparoz

Description

@oparoz

The app is currently using the worst case scenario, the one where all buttons are shown, which means that there will be a large gap on public galleries per example if the only button shown is the switch to Files button.

The plan is to add 50px per button at view init time.

In more details

We define Gallery.buttonsWidth at 350 pixels. that's the worst case scenario.

When the view is resized, we do this:
Gallery.view.breadcrumb.setMaxWidth($(window).width() - Gallery.buttonsWidth);

The 350 pixels area may not necessarily be filled with buttons, leaving some empty space.

Plan

  • List all buttons which can be shown on the controls bar
  • List the minimum number of buttons which can be show on the interface
  • Define the number of pixels a button takes
  • Write a function which updates Gallery.buttonsWidth based on the number of buttons currently shown

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions