Skip to content

Commit

Permalink
Merge pull request #1243 from FlowFuse/gauge-tile-fontsize
Browse files Browse the repository at this point in the history
UI Gauge - Improve font-size in smaller tiles
  • Loading branch information
joepavitt authored Sep 11, 2024
2 parents a62ca12 + e94fdf9 commit 19b6236
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui/src/widgets/ui-gauge/types/UIGaugeBattery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default {
.nrdb-ui-gauge-battery label {
font-weight: bold;
resize: both;
font-size: min(2.5rem,max(30cqmin, .5rem));
font-size: min(2.5rem,max(25cqmin, .5rem));
position: relative;
z-index: 2;
width: 100%;
Expand Down
10 changes: 7 additions & 3 deletions ui/src/widgets/ui-gauge/types/UIGaugeTile.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="nrdb-ui-gauge-tile" :style="{'background-color': valueToColor(props.segments, value), 'color': getTextColor(props.segments, value)}">
{{ props.title }}
<label>{{ props.title }}</label>
</div>
</template>

Expand All @@ -23,14 +23,18 @@ export default {
}
</script>

<style scoped>
<style scoped lang="scss">
.nrdb-ui-gauge-tile {
display: flex;
justify-content: center;
align-items: center;
font-size: 2.5rem;
container-type: size;
font-weight: bold;
transition: 0.15s background-color;
border: 1px solid rgb(var(--v-theme-group-outline));
label {
font-size: min(2.5rem, max(40cqmin, .5rem));
text-align: center;
}
}
</style>

0 comments on commit 19b6236

Please sign in to comment.