-
Notifications
You must be signed in to change notification settings - Fork 0
Created functional battery component #134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
content/Components/BatteryIcon.qml
Outdated
| width: 170 | ||
| height: 60 | ||
| width: 265 | ||
| height: 367 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use multiples of 5
content/Components/BatteryIcon.qml
Outdated
| width: 35 | ||
| height: 60 | ||
| width: 31 | ||
| height: 25.71 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiples of 5
content/Components/BatteryIcon.qml
Outdated
| Rectangle { | ||
| id: batteryGauge | ||
| width: 342 | ||
| height: 23.14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiples of 5
content/Components/BatteryIcon.qml
Outdated
| radius:15 | ||
| anchors.bottom: parent.bottom | ||
| color: Config.primary | ||
| color: Config.valueModerate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
color should correspond with value, ie. very low is red, medium is yellow, nearly full to full is green
content/Components/BatteryIcon.qml
Outdated
| Text { | ||
| id: batteryLow | ||
| width: 37 | ||
| height: 16.29 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiples of 5
content/Components/BatteryIcon.qml
Outdated
| Text { | ||
| id: batteryHigh | ||
| width: 74 | ||
| height: 16.29 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multiples of 5
content/Components/BatteryIcon.qml
Outdated
| property real rawValue: battery.PackStateOfCharge | ||
| property real value: rawValue / 2 //Unit Conversion from 0.5% to 1% | ||
|
|
||
| Image { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
battery icon and value are not centered in component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
picture is extremely small and looks grainy on dashboard, replace with larger image
| id: batteryImage | ||
| width: 35 | ||
| height: 60 | ||
| function getBatteryColor(value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
color changes harshly from 24 to 25 and from 74 to 75, should be a smooth gradient from one color to the next, not a sudden change
| } | ||
| } | ||
| Item{ | ||
| width:60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inconsistent spacing around colon
| width:60 | ||
| height:25 | ||
| id: batteryImageAndPercentage | ||
| anchors{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inconsistent spacing
| return Config.valueHigh | ||
| } | ||
| } | ||
| Item{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inconsistent spacing
| verticalAlignment: Text.AlignVCenter | ||
| font.weight: Font.Medium | ||
| font.family: Config.fontStyle | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normalize indentation for this item
No description provided.