Skip to content
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

Fix audiobar icon spacing with large icons #413

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions src/lib/components/AudioBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,48 +62,42 @@ TODO:
</script>

<div class={audioBarClass} style:background-color={backgroundColor}>
<div class="dy-button-group audio-repeat">
{#if showRepeatMode}
<button
class="dy-btn-sm dy-btn-ghost"
on:click={() => playMode.next($refs.hasAudio?.timingFile)}
>
<svelte:component this={playModeIconOptions[$playMode.mode]} color={iconColor} />
</button>
{/if}
</div>
{#if showRepeatMode}
<button
class="audio-control-buttons"
on:click={() => playMode.next($refs.hasAudio?.timingFile)}
>
<svelte:component this={playModeIconOptions[$playMode.mode]} color={iconColor} />
</button>
{/if}
<!-- Play Controls -->
<div class="dy-btn-group audio-controls" style:direction="ltr">
<button class="dy-btn-sm dy-btn-ghost" on:click={() => skip(-1)}>
<div class="audio-controls" style:direction="ltr">
<button class="audio-control-buttons" on:click={() => skip(-1)}>
<AudioIcon.Prev color={iconColor} />
</button>

{#if $refs.hasAudio?.timingFile}
<button class="dy-btn-sm dy-btn-ghost" on:click={() => changeVerse(-1)}>
<button class="audio-control-buttons" on:click={() => changeVerse(-1)}>
<AudioIcon.RW color={iconColor} />
</button>
{/if}
<button
class="dy-btn-sm dy-btn-ghost"
class:dy-btn-lg={config.mainFeatures['audio-play-button-size'] === 'large'}
on:click={() => playPause()}
>
<button class="audio-control-buttons" on:click={() => playPause()}>
{#if !$audioPlayer.playing}
<svelte:component this={playIcon} color={iconPlayColor} size={playIconSize} />
{:else}
<AudioIcon.Pause color={iconColor} size={playIconSize} />
{/if}
</button>
{#if $refs.hasAudio?.timingFile}
<button class="dy-btn-sm dy-btn-ghost" on:click={() => changeVerse(1)}>
<button class="audio-control-buttons" on:click={() => changeVerse(1)}>
<AudioIcon.FF color={iconColor} />
</button>
{/if}
<button class="dy-btn-sm dy-btn-ghost" on:click={() => skip(1)}>
<button class="audio-control-buttons" on:click={() => skip(1)}>
<AudioIcon.Skip color={iconColor} />
</button>
</div>
<div class="dy-button-group audio-speed">
<div class="audio-speed audio-control-buttons">
{#if showSpeed}
<AudioPlaybackSpeed />
{/if}
Expand Down Expand Up @@ -163,11 +157,17 @@ TODO:
place-self: center;
}
.audio-controls {
display: inline-flex;
grid-row: 1;
grid-column: 2;
place-self: center;
align-items: center;
}
.audio-control-buttons {
margin-inline-start: 12px;
margin-inline-end: 12px;
place-self: center;
}
.audio-speed {
grid-row: 1;
grid-column: 3;
Expand Down
Loading