Skip to content

Commit

Permalink
Revert "Revert "Initial solution""
Browse files Browse the repository at this point in the history
This reverts commit 0d437cb.
  • Loading branch information
elsoazemelet committed May 14, 2024
1 parent 0d437cb commit 0d72b37
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,7 @@
class:icon-corner-cut-l={isLeftCut}
class:scale-50={elementNumber == 255}
>
<SvgIcon
class="text-white"
iconPath={loaded ? "tick" : "download"}
displayMode={"static"}
/>
<SvgIcon fill="#FFF" iconPath={loaded ? "tick" : "download"} />
</button>
{/if}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,20 @@
{#if loadedState === 0}
<span class="text-white mr-2">Load Profile</span>
<SvgIcon
class="text-white"
fill="#FFF"
iconPath={"download"}
displayMode={"static"}
/>
{:else if loadedState === 1}
<span class="text-white mr-2">Loading...</span>
<SvgIcon
class="text-white"
fill="#FFF"
iconPath={"download"}
displayMode={"static"}
/>
{:else if loadedState === 2}
<span class="text-white">Loaded!</span>
<SvgIcon
class="text-white"
iconPath={"tick"}
displayMode={"static"}
/>
<SvgIcon fill="#FFF" iconPath={"tick"} displayMode={"static"} />
{/if}
</button>
{/key}
Expand Down
12 changes: 6 additions & 6 deletions src/renderer/main/panels/MidiMonitor/MidiMonitor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@
<div class="flex items-center">
{#if message.data.direction == "REPORT"}
<span>RX</span>
<SvgIcon class="scale-75" iconPath="arrow_left" />
<SvgIcon fill="#FFF" iconPath="arrow_left" />
{:else}
<span>TX</span>
<SvgIcon class="scale-75" iconPath="arrow_right" />
<SvgIcon fill="#FFF" iconPath="arrow_right" />
{/if}
</div>
</div>
Expand All @@ -316,9 +316,9 @@
<div class="flex flex-row text-white">
<span>{midi.device.name}</span>
{#if midi.data.direction == "REPORT"}
<SvgIcon class="scale-75" iconPath="arrow_left" />
<SvgIcon fill="#FFF" iconPath="arrow_left" />
{:else}
<SvgIcon class="scale-75" iconPath="arrow_right" />
<SvgIcon fill="#FFF" iconPath="arrow_right" />
{/if}
</div>
<span>Ch: {midi.data.channel}</span>
Expand Down Expand Up @@ -384,9 +384,9 @@
<div class="flex flex-row text-white">
<span>{sysex.device.name}</span>
{#if sysex.data.direction == "REPORT"}
<SvgIcon class="scale-75" iconPath="arrow_left" />
<SvgIcon fill="#FFF" iconPath="arrow_left" />
{:else}
<SvgIcon class="scale-75" iconPath="arrow_right" />
<SvgIcon fill="#FFF" iconPath="arrow_right" />
{/if}
</div>

Expand Down
3 changes: 2 additions & 1 deletion src/renderer/main/user-interface/SvgIcon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
export let iconPath: string = "";
export let width: number = 15;
export let height: number = 15;
export let fill: string | undefined = undefined;
let rawSvg: string;
Expand All @@ -14,7 +15,7 @@
}
</script>

<svg style="width: {width}px; height: {height}px;">
<svg style="width: {width}px; height: {height}px; fill: {fill};">
<g>
{@html rawSvg}
</g>
Expand Down

0 comments on commit 0d72b37

Please sign in to comment.