Dashboard: Add stale battery, group labels, fix test #100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
List of changes:
setIconSize
on the various widgets (with exception handling because the battery widget is using a QLabel instead). (setFixedSize
does not work for this).self.setFixedSize(self._icons[0].actualSize(QSize(50, 30))
is currently invoked in most widgets. Seems like it would make sense for this to be done with the dash'smax_icon_size
at the same time that I invokesetIconSize
(so,i.setFixedSize(i._icons[0].actualSize(self.max_icon_size))
). However, since this would affect other repos (e.g. rqt_pr2_dash uses this on each of it's re-implemented widgets), changing it here would be bad.These should be backwards compatible. I've tested with the pr2_dashboard pointed at a Fetch robot with both the current master and this pull request. Visually there are no changes (though I had to explicitly set some stuff on the QGroupBox and QBoxLayout to achieve this). No errors/warnings occur in either the pr2 or fetch dashes, either.
Reference rqt_pr2_dash (aka what I see on my computer when I run rqt and add the rqt_pr2_dash):
![rqt_dash_default](https://cloud.githubusercontent.com/assets/1134006/14162028/1a856124-f69d-11e5-9d5e-52c683c71d97.png)