Skip to content

armgit / plexo

Public Imported from GitHub
0

Speed up downloads by combining multiple network connections in parallel

Move the network table's horizontal inset onto the grid that owns the tracks

prashantgeek83f7e22791d5
diff --git a/src/renderer/src/components/NetworkRow.tsx b/src/renderer/src/components/NetworkRow.tsx
index ee3f568..f8a82ff 100644
--- a/src/renderer/src/components/NetworkRow.tsx
+++ b/src/renderer/src/components/NetworkRow.tsx
@@ -54,7 +54,7 @@ export function NetworkRow({
gridColumn: '1 / -1',
gap: 12,
alignItems: 'center',
- padding: '11px 20px',
+ padding: '11px 0',
borderTop: '0.5px solid var(--border-subtle)'
}}
>
@@ -62,11 +62,6 @@ export function NetworkRow({
style={{
width: 8,
height: 8,
- // A hard margin rather than relying solely on the grid's column-gap: this track has no
- // spare width of its own to fall back on if a gap ever fails to apply (a stale subgrid
- // gutter resolution, a browser quirk), so it's the one place that needs a guaranteed
- // offset regardless of what the surrounding grid computes.
- marginRight: 8,
borderRadius: '50%',
background: hasError ? DANGER : visual.solid,
animation: isActive ? 'plexo-glow 1.8s infinite' : undefined,
diff --git a/src/renderer/src/theme.ts b/src/renderer/src/theme.ts
index 02ea250..868e955 100644
--- a/src/renderer/src/theme.ts
+++ b/src/renderer/src/theme.ts
@@ -223,7 +223,12 @@ export const networkTableGridStyle: React.CSSProperties = {
// this, every column boundary on the subgridded axis collapses to 0, which is invisible on the
// wider columns (their fixed/flexible track width still leaves visible space) but reads as the
// status dot touching the network name, since that track has no slack to fall back on.
- columnGap: 12
+ columnGap: 12,
+ // The horizontal inset lives here rather than as padding on the header/row subgrids: Chromium
+ // clips a subgridded axis's outer tracks by the subgrid item's OWN horizontal padding (the
+ // status dot's 10px column was measuring 0px wide with `padding: '11px 20px'` on the row),
+ // so only this — the grid that actually owns the tracks — may carry left/right padding.
+ padding: '0 20px'
}
export const networkTableHeaderStyle: React.CSSProperties = {
@@ -231,7 +236,7 @@ export const networkTableHeaderStyle: React.CSSProperties = {
gridTemplateColumns: 'subgrid',
gridColumn: '1 / -1',
gap: 12,
- padding: '10px 20px 7px',
+ padding: '10px 0 7px',
font: `400 9.5px/1 ${FONT_MONO}`,
letterSpacing: '0.12em',
textTransform: 'uppercase',