Skip to content

Commit 724e85c

Browse files
authored
style: adjust pin layout and fix commit line width for consistency (#9663)
1 parent 86ed7c9 commit 724e85c

File tree

2 files changed

+10
-17
lines changed

2 files changed

+10
-17
lines changed

apps/desktop/src/components/CommitGoesHere.svelte

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
display: flex;
6262
align-items: center;
6363
padding: 12px 0;
64-
gap: 12px;
6564
border-bottom: 1px solid var(--clr-border-2);
6665
background-color: var(--clr-bg-1);
6766
@@ -71,18 +70,18 @@
7170
}
7271
}
7372
.pin {
73+
display: flex;
7474
position: relative;
75-
width: 8px;
75+
align-items: center;
76+
justify-content: center;
77+
width: 42px;
7678
height: 8px;
77-
margin-left: 16px;
7879
}
7980
8081
.pin__circle {
81-
position: absolute;
82-
top: 0;
83-
left: 0;
84-
width: 100%;
85-
height: 100%;
82+
position: relative;
83+
width: 8px;
84+
height: 8px;
8685
border-radius: 100%;
8786
outline: 2px solid var(--clr-theme-pop-element);
8887
background-color: var(--clr-bg-1);

apps/desktop/src/components/CommitLine.svelte

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,23 @@
33
import { type CommitStatusType } from '$lib/commits/commit';
44
55
import { Tooltip } from '@gitbutler/ui';
6-
import { pxToRem } from '@gitbutler/ui/utils/pxToRem';
76
87
interface Props {
98
commitStatus: CommitStatusType;
109
diverged: boolean;
1110
tooltip?: string;
1211
lastCommit?: boolean;
1312
lastBranch?: boolean;
14-
width?: number;
1513
}
1614
17-
const { commitStatus, diverged, tooltip, lastCommit, lastBranch, width = 42 }: Props = $props();
15+
const { commitStatus, diverged, tooltip, lastCommit, lastBranch }: Props = $props();
1816
1917
const color = $derived(getColorFromCommitState(commitStatus, diverged));
2018
2119
const rhombus = $derived(commitStatus === 'LocalAndRemote');
2220
</script>
2321

24-
<div
25-
class="commit-lines"
26-
style:--commit-color={color}
27-
style:--container-width="{pxToRem(width)}rem"
28-
>
22+
<div class="commit-lines" style:--commit-color={color}>
2923
<div class="top"></div>
3024
{#if diverged}
3125
<div class="local-shadow-commit-dot">
@@ -60,7 +54,7 @@
6054
flex: 0 0 auto;
6155
flex-direction: column;
6256
align-items: center;
63-
width: var(--container-width);
57+
width: 42px;
6458
gap: 3px;
6559
}
6660

0 commit comments

Comments
 (0)