Skip to content

Conversation

keithel-qt
Copy link
Contributor

@keithel-qt keithel-qt commented Nov 17, 2021

This provides a new implementation of the SideNavBar that conforms to the SwiftNav orange UI guidelines.
The guidelines that were worked off of are described in:
https://snav.slack.com/archives/C02DG3HAHT8/p1632876609129100 (older one)
https://snav.slack.com/archives/C020JLK6PK8/p1637094700036500 (which I was made aware of today, Nov 16)

height: Constants.advancedImu.insStatusImageWidth
smooth: true
source: "../" + Constants.advancedImu.okStatusPath
source: Constants.advancedImu.okStatusPath
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you rebase now that your other changes (also seen here) have been merged in?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh right - I missed that. Will do.

* This creates a new Qt Quick Controls 2 style which I have named
  "SwiftNav". It is selected in the qtquickcontrols2.conf file,
  and is based on the Material style, with a fallback to the material
  style in cases where a control is not defined in the style.

* Initially I added a TabBar and TabButton control. The TabBar and
  TabButton controls are styled similar to what is desired in the new
  orange styling that SwiftNav folks desired.

* Note that there are a lot of changes in the colors of the TabButton
  elements from the old keithel-qt/orange-styling branch. This is to
  more closely blend in with the connection button on the bottom, and it
  looks nicer.
* This achieves 90% of the new orange styling guidelines for TabBars and
  TabButtons used in the console.
* Current problems exist in the sidebar outlining. This isn't quite
  right, and I think the outline should not be drawn in the style
  control in this case, and instead drawn by the code using it.

cherry-pick notes: Significant changes from the version of this commit
in the old keithel-qt/orange-styling.
* Expose the orientation setting of the ListView content item of
  TabBar, allowing a user to specify an orientation for the TabBar.
* Remove TabBar contentItem override in SideNavBar, use new orientation
  property of TabBar.
* Introduce a whole new SideBar implementation that does not use TabBar.
* SideNavButton customized button type added, allows for much more
  customization to the look of the SideNavBar buttons.
* ListView used to display the buttons, allows more freedom to customize
  look and feel over TabBar, and is designed to be used vertically.
* Adopt the new design guidelines as is shown in mockups in slack:
  https://snav.slack.com/archives/C02DG3HAHT8/p1632876609129100
* Fix current index of MainTab corresponding to selected SideNavBar tab.
  (was 1s based, now 0 based)
* Add boundary line between ConnectionScreen and SideNavBar
* Remove the topmost swiftnav about button in SideNavBar (it is going
  elsewhere)
* Give SideNavBar an enable property, and have it disabled when the
  ConnectionScreen is showing, adjust colors appropriately for enabled
  status.
* Make the SideNavButton left and right lines extend higher so they are
  continuous. This makes those lines go outside the boundary of the
  button, but there is no clipping, so the drawing occurs as we expect.
* TabButtons are now different colors per new design guidelines shared
  in https://snav.slack.com/archives/C020JLK6PK8/p1637094700036500
@keithel-qt keithel-qt force-pushed the keithel-qt/orange-styling2 branch from 56a7f55 to beb2433 Compare November 17, 2021 17:18
@keithel-qt keithel-qt removed the request for review from silverjam November 17, 2021 22:52
@keithel-qt keithel-qt merged commit 7e98ff4 into main Nov 17, 2021
@keithel-qt keithel-qt deleted the keithel-qt/orange-styling2 branch November 17, 2021 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants