-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Displaying labels on Virtual keyboard
ref #534
- Loading branch information
1 parent
aa10774
commit cd800e3
Showing
8 changed files
with
141 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script setup lang="ts"> | ||
import { formatHertz, formatExponential, formatCents } from '@/utils' | ||
const props = defineProps<{ | ||
label: string | ||
cent: number | ||
ratio: number | ||
frequency: number | ||
showLabel: boolean | ||
showCent: boolean | ||
showRatio: boolean | ||
showFrequency: boolean | ||
}>() | ||
</script> | ||
|
||
<template> | ||
<div class="key-info"> | ||
<div v-if="props.showLabel"> | ||
<strong>{{ props.label }}</strong> | ||
</div> | ||
<div v-if="props.showCent">{{ formatCents(props.cent, 0) }}</div> | ||
<div v-if="props.showRatio">{{ formatExponential(props.ratio) }}</div> | ||
<div v-if="props.showFrequency">{{ formatHertz(props.frequency) }}</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.key-info { | ||
font-size: 1.25em; | ||
text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.3); | ||
} | ||
[data-theme='dark'] .key-info { | ||
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3); | ||
} | ||
.black-key .key-info { | ||
color: white; | ||
text-shadow: none; | ||
} | ||
.white-key .key-info { | ||
color: black; | ||
text-shadow: none; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters