Skip to content

Commit

Permalink
Better vertical align button icons if supplied via label
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Conway-Jones committed Sep 19, 2019
1 parent 2febc1d commit 23ce49e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/css/app.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/dashboard.appcache
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ fonts/weather-icons-lite.woff2
NETWORK:
*

# hash: 5b6d07f46d561606dd28f6e73a7310304484f46fdfa9effade595d2f12f242cb
# hash: c50d6ccb3895b8cbd2a6114acbc93dc3c9c6f359018907aa8f609ffef066c498
2 changes: 1 addition & 1 deletion dist/js/app.min.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/components/ui-component/templates/button.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ md-card .nr-dashboard-button {
vertical-align: middle;
width: unset;
}

.nr-dashboard-button .fa-2x {
vertical-align: middle;
padding-bottom: 2px;
}

.nr-dashboard-button .fa-3x {
vertical-align: middle;
padding-bottom: 1px;
}
2 changes: 1 addition & 1 deletion src/components/ui-component/ui-component-ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ angular.module('ui').controller('uiComponentController', ['$scope', 'UiEvents',
if (isNaN(me.item.value)) { me.item.value = me.item.min; }
if (delta > 0) {
if ((me.item.value == me.item.max) && (me.item.wrap == true)) {
me.item.value = me.item.min;
me.item.value = me.item.min;
}
else if (me.item.value < me.item.max) {
me.item.value = Math.round(Math.min(me.item.value + delta, me.item.max)*10000)/10000;
Expand Down

0 comments on commit 23ce49e

Please sign in to comment.