Skip to content

Commit

Permalink
Fixes Alignment of Viewport Header Byte Texts
Browse files Browse the repository at this point in the history
- Fixed alignment of viewport byte indexing text.

Closes apache#864
  • Loading branch information
stricklandrbls committed Oct 2, 2023
1 parent c860008 commit e27ae6d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/svelte/src/components/DataDisplays/Header/DisplayHeader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ limitations under the License.
import { UIThemeCSSClass } from '../../../utilities/colorScheme'
import { createEventDispatcher } from 'svelte'
import { OffsetSearchType } from '../../Header/fieldsets/SearchReplace'
import { byteDivWidthFromRadix } from '../../../utilities/display'
type ViewportDivSpread = '24px' | '28px' | '68px'
Expand All @@ -51,7 +52,7 @@ limitations under the License.
let phyiscalOffsetSpread: ViewportDivSpread
let selectionOffsetText: string
let offsetLine = []
let offsetLine: string[] = []
$: {
offsetLine = generate_offset_headers(
Expand Down Expand Up @@ -85,9 +86,6 @@ limitations under the License.
ret.push(i.toString(10))
}
}
phyiscalOffsetSpread = physicalOffsetSpreads[
displayRadix
] as ViewportDivSpread
return ret
}
Expand Down Expand Up @@ -145,14 +143,14 @@ limitations under the License.
<div class={$UIThemeCSSClass + ' measure physical-viewport-header'}>
{#if $displayRadix === RADIX_OPTIONS.Binary}
{#each offsetLine as offset}
<div class="phyiscal-addr-seg binary" style:width={phyiscalOffsetSpread}>
<div class="physical-addr-seg binary" style:width={byteDivWidthFromRadix($displayRadix)}>
<div>{offset}</div>
<div>{bitNumText}</div>
</div>
{/each}
{:else}
{#each offsetLine as offset}
<div class="physical-addr-seg" style:width={phyiscalOffsetSpread}>
<div class="physical-addr-seg" style:width={byteDivWidthFromRadix($displayRadix)}>
{offset}
</div>
{/each}
Expand Down Expand Up @@ -197,15 +195,18 @@ limitations under the License.
writing-mode: vertical-lr;
text-orientation: upright;
cursor: default;
border-width: 0 2px 0 2px;
border-style: solid;
border-color: transparent;
}
div.logical-addr-seg {
width: 24px;
width: 20px;
}
div.div.physical-addr-seg.binary {
div.physical-addr-seg.binary {
writing-mode: horizontal-tb;
text-orientation: sideways;
}
div.physical-viewport-header {
padding-left: 4px;
padding-left: 2px;
}
</style>

0 comments on commit e27ae6d

Please sign in to comment.