File tree Expand file tree Collapse file tree 3 files changed +43
-43
lines changed
apps/desktop/src/components/projectSettings
packages/ui/src/lib/components Expand file tree Collapse file tree 3 files changed +43
-43
lines changed Original file line number Diff line number Diff line change 21
21
on:branchSelected={async (e) => {
22
22
- selectedBranch = e.detail;
23
23
- if ($platformName === 'win32') {
24
- + if ($platformName === 'win64') {
24
+ + if ($platformName === 'win64' && $userSettings.enableAdvancedFeatures && project.hasRemoteOrigin ) {
25
25
setTarget();
26
26
}
27
27
}} ` ;
138
138
139
139
<SectionCard labelFor ="wrapText" orientation ="row" roundedTop ={false } roundedBottom ={false }>
140
140
{#snippet title ()}
141
- Text wrap
141
+ Soft wrap
142
142
{/ snippet }
143
143
{#snippet caption ()}
144
- Wrap text in the diff view once it hits the end of the viewport.
144
+ Soft wrap long lines in the diff view to fit within the viewport.
145
145
{/ snippet }
146
146
147
147
{#snippet actions ()}
Original file line number Diff line number Diff line change 10
10
title? : string ;
11
11
size? : ' small' | ' medium' ;
12
12
maxWidth? : string ;
13
+ iconTopOffset? : string ;
13
14
icon? : keyof typeof iconsJson ;
14
15
inheritColor? : boolean ;
15
16
children: Snippet ;
19
20
title,
20
21
size = ' medium' ,
21
22
maxWidth = ' 16rem' ,
23
+ iconTopOffset = ' 10%' ,
22
24
icon,
23
25
children,
24
26
inheritColor
67
69
role =" tooltip"
68
70
onmouseenter ={handleMouseEnter }
69
71
onmouseleave ={handleMouseLeave }
72
+ style:--icon-top-offset ={iconTopOffset }
73
+ style:--size ={size === ' small' ? ' 12px' : ' 14px' }
70
74
>
71
75
{#if icon }
72
76
<div class ="info-custom-icon" class:inherit-color ={inheritColor }>
104
108
105
109
<style lang =" postcss" >
106
110
.wrapper {
107
- --default-size : 14 px ;
108
- --small-size : 12 px ;
109
-
110
111
display : inline-flex;
111
112
position : relative;
112
- transform : translateY (10 % );
113
+ transform : translateY (var ( --icon-top-offset ) );
113
114
}
114
115
115
116
.info-custom-icon {
124
125
125
126
.info-button {
126
127
position : relative;
127
- width : 50 px ;
128
- border-radius : var (--default-size );
128
+ width : var (--size );
129
+ height : var (--size );
130
+ border-radius : var (--size );
129
131
box-shadow : inset 0 0 0 1.5 px var (--clr-text-2 );
130
132
color : var (--clr-text-2 );
131
133
transition : box-shadow var (--transition-fast );
152
154
}
153
155
154
156
.wrapper.medium {
155
- & .info-button {
156
- width : var (--default-size );
157
- height : var (--default-size );
158
-
159
- &::before {
160
- top : 3 px ;
161
- width : 2 px ;
162
- height : 2 px ;
163
- }
164
- &::after {
165
- top : 6 px ;
166
- width : 2 px ;
167
- height : 5 px ;
168
- }
157
+ & .info-button::before {
158
+ top : 3 px ;
159
+ width : 2 px ;
160
+ height : 2 px ;
161
+ }
162
+ & .info-button::after {
163
+ top : 6 px ;
164
+ width : 2 px ;
165
+ height : 5 px ;
169
166
}
170
167
}
171
168
172
169
.wrapper.small {
173
- & .info-button {
174
- width : var (--small-size );
175
- height : var (--small-size );
176
-
177
- &::before {
178
- top : 3 px ;
179
- width : 2 px ;
180
- height : 2 px ;
181
- }
182
- &::after {
183
- top : 6 px ;
184
- width : 2 px ;
185
- height : 3 px ;
186
- }
170
+ & .info-button::before {
171
+ top : 3 px ;
172
+ width : 2 px ;
173
+ height : 2 px ;
174
+ }
175
+ & .info-button::after {
176
+ top : 6 px ;
177
+ width : 2 px ;
178
+ height : 3 px ;
187
179
}
188
180
}
189
181
Original file line number Diff line number Diff line change 206
206
class:locked
207
207
class:staged
208
208
>
209
- <InfoButton inheritColor size =" small" icon =" locked-extra-small" maxWidth =" 15rem" >
209
+ <InfoButton
210
+ inheritColor
211
+ size =" small"
212
+ icon =" locked-extra-small"
213
+ maxWidth =" 15rem"
214
+ iconTopOffset =" 0"
215
+ >
210
216
{@render lockWarning (row .locks ?? [])}
211
217
</InfoButton >
212
218
</td >
226
232
227
233
<td
228
234
class =" table__textContent"
229
- style ="--tab-size: {tabSize }; --wrap: {wrapText ? ' wrap' : ' nowrap ' }"
235
+ style ="--tab-size: {tabSize }; --pre- wrap: {wrapText ? ' pre- wrap' : ' pre ' }"
230
236
class:readonly ={true }
231
237
data-no-drag
232
238
class:diff-line-deletion ={row .type === SectionType .RemovedLines }
308
314
padding-left : 4 px ;
309
315
font-size : 12 px ;
310
316
line-height : 1.25 ;
311
- text-wrap : var (--wrap );
312
- white-space : pre;
317
+ white-space : var (--pre-wrap );
313
318
cursor : text;
314
319
tab-size : var (--tab-size );
315
320
user-select : text;
318
323
.table__row-header {
319
324
position : relative;
320
325
min-height : 18 px ;
321
- text-wrap : var (--wrap );
322
- white-space : pre;
326
+ white-space : var (--pre-wrap );
323
327
cursor : text;
324
328
}
325
329
391
395
background-color : var (--clr-diff-count-bg );
392
396
color : var (--clr-diff-count-text );
393
397
font-size : 11 px ;
398
+ line-height : 1.5 ; /* Visually centered with 12px font size that diff lines have */
394
399
text-align : right;
400
+ vertical-align : top;
395
401
touch-action : none;
396
402
user-select : none;
397
403
451
457
border-right : 1 px solid var (--clr-border-2 );
452
458
background-color : var (--clr-diff-count-bg );
453
459
color : var (--clr-diff-count-text );
460
+ line-height : 1 ;
461
+ vertical-align : top;
454
462
455
463
& .diff-line-addition {
456
464
border-color : var (--clr-diff-addition-count-border );
You can’t perform that action at this time.
0 commit comments