Skip to content

Conversation

jungleraptor
Copy link
Contributor

Just wanted to solicit early feedback for some proposed changes:

  • We can use file aliases and qrc urls to remove dependence on relative file paths to resources. I made this change because the default constant value didn't work for SolutionPositionTab.qml since it's nested in the SolutionTabComponents folder. (../images/ vs images/).
  • We can have top level Constants for these url's (see Constants.icons.pauseButtonUrl).
  • Lastly the Constant value for Svg height was a little too big for the pause button. I set it to 12 for now which looks better. Any tips for normalizing the size of these icons?

@jungleraptor jungleraptor requested a review from a team October 6, 2021 17:30
readonly property string importPath: "images/fontawesome/file-import.svg"
readonly property string warningPath: "images/fontawesome/exclamation-triangle.svg"
readonly property string connectButtonPath: "images/fontawesome/power-off-solid.svg"
readonly property string pauseButtonUrl: "qrc:///pause-solid.svg"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree the svg does look a little thicc. If you find a better one feel free to swap it in:
https://fontawesome.com/v5.15/icons?d=gallery&p=2&m=free

id: positionPauseImg

anchors.centerIn: parent
width: 12
Copy link
Collaborator

@john-michaelburke john-michaelburke Oct 6, 2021

Choose a reason for hiding this comment

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

For these numbers I like to throw them in the constants file for whichever QtObject is relevant for the tab for this one Constants.solutionPosition. and you can use the same for both height and width.

Things like smooth / antialiasing you can leave out.

@jungleraptor jungleraptor marked this pull request as draft October 6, 2021 18:29
@jungleraptor jungleraptor marked this pull request as draft October 6, 2021 18:29
<file>images/fontawesome/play-solid.svg</file>
<file>images/fontawesome/power-off-solid.svg</file>
<file>images/fontawesome/pause-solid.svg</file>
<file alias="pause-solid.svg">images/fontawesome/pause-solid.svg</file>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a pretty cool feature. We will need to take caution though as we will likely have a mixture of images from different sources and this abstracts the source from our constants file.

@jungleraptor jungleraptor marked this pull request as ready for review October 7, 2021 19:43
Replaced all instances of buttons using ascii with svg icons.
@jungleraptor jungleraptor force-pushed the itorres/pos-buttons-use-svg branch from b0d00d2 to fd8bcae Compare October 7, 2021 20:06
@jungleraptor jungleraptor changed the title WIP - Button shapes should not be ASCII chars [CPP-132] Button shapes should not be ASCII chars [CPP-132] Oct 7, 2021
@jungleraptor jungleraptor merged commit 28c9660 into main Oct 7, 2021
@jungleraptor jungleraptor deleted the itorres/pos-buttons-use-svg branch October 7, 2021 20:47
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.

3 participants