Port navigation bar to qqc2
ClosedPublic

Authored by astippich on Jul 7 2019, 2:40 PM.

Diff Detail

Repository
R255 Elisa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
astippich requested review of this revision.Jul 7 2019, 2:40 PM
astippich created this revision.
ngraham requested changes to this revision.Jul 7 2019, 6:19 PM

As before, I don't like how FlatButtonWithToolTip requires that every button manually specify its own size. I think the FlatButtonWithToolTip should have an adequate default size so that this boilerplate isn't necessary.

Also, removing the Keys.onReturnPressed: action.trigger() lines breaks keyboard use because it's not possible to trigger focused items with the space bar (that always does play/pause). I notice that this is already a problem with the headerbar toolbuttons, and this patch introduces that problem for the NavigationActionBar too.

This revision now requires changes to proceed.Jul 7 2019, 6:19 PM

As before, I don't like how FlatButtonWithToolTip requires that every button manually specify its own size. I think the FlatButtonWithToolTip should have an adequate default size so that this boilerplate isn't necessary.

Although that's a different thing than discussed in D21945, I have now added D22330. This adds a default size and changes the Accessibility and and Keys.* defaults to action.trigger().

Also, removing the Keys.onReturnPressed: action.trigger() lines breaks keyboard use because it's not possible to trigger focused items with the space bar (that always does play/pause). I notice that this is already a problem with the headerbar toolbuttons, and this patch introduces that problem for the NavigationActionBar too.

I think the space bar is actually by design, since it is a shortcut for play/pause.

astippich added a comment.EditedJul 8 2019, 6:26 PM

I actually found a bug: when the icon height and width are not specified, actions using dynamic icons won't work (e.g. icon is dependent on some variable) . The icon will not be displayed. This should probably be investigated, but for now I would like to continue with the specified icon size

astippich updated this revision to Diff 61366.Jul 8 2019, 6:30 PM
  • update and rebase
astippich updated this revision to Diff 61449.Jul 9 2019, 7:05 PM
  • more cleanup
ngraham accepted this revision.Jul 9 2019, 7:14 PM

How about only setting the width and height explicitly for the back and sort buttons, and adding TODO or FIXME comments so that we know why it's set?

This revision is now accepted and ready to land.Jul 9 2019, 7:14 PM

How about only setting the width and height explicitly for the back and sort buttons, and adding TODO or FIXME comments so that we know why it's set?

It's spread all over, so should be done separately

This revision was automatically updated to reflect the committed changes.