Skip to content

Commit 0417da0

Browse files
feat: Polish great circle line settings menu
1 parent 3bc96f8 commit 0417da0

1 file changed

Lines changed: 23 additions & 21 deletions

File tree

src/app/modules/settings/components/settings-dialog.html

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -889,9 +889,16 @@
889889
</mat-form-field>
890890
</div>
891891
<div class="setting-card-row" style="padding-bottom: 10px; align-items: center; gap: 12px; flex-wrap: wrap">
892-
<div style="flex: 0 0 auto; font-size: 0.85em; min-width: 120px">Great Circle Line:</div>
893-
<mat-form-field style="width: 150px">
894-
<mat-label>Length kind</mat-label>
892+
<div style="flex: 0 0 auto; min-width: 120px">Great Circle Line:</div>
893+
<mat-form-field style="width: 110px">
894+
<mat-label>Value</mat-label>
895+
<input matInput type="number" min="0"
896+
[(ngModel)]="facade.settings.vessels.greatCircleStyle.lineLength.value"
897+
(change)="persistModel()"
898+
>
899+
</mat-form-field>
900+
<mat-form-field style="width: 75px">
901+
<mat-label>Unit</mat-label>
895902
<mat-select
896903
[(ngModel)]="facade.settings.vessels.greatCircleStyle.lineLength.kind"
897904
(selectionChange)="persistModel()"
@@ -901,39 +908,34 @@
901908
}
902909
</mat-select>
903910
</mat-form-field>
904-
<mat-form-field style="width: 90px">
905-
<mat-label>Value</mat-label>
906-
<input matInput type="number" min="0"
907-
[(ngModel)]="facade.settings.vessels.greatCircleStyle.lineLength.value"
911+
<mat-form-field style="width: 70px">
912+
<mat-label>Color</mat-label>
913+
<input matInput type="color"
914+
[(ngModel)]="facade.settings.vessels.greatCircleStyle.color"
908915
(change)="persistModel()"
916+
style="cursor: pointer; padding: 0; height: 24px"
909917
>
910-
<span matSuffix>
911-
@if (facade.settings.vessels.greatCircleStyle.lineLength.kind === 'time') { min }
912-
@if (facade.settings.vessels.greatCircleStyle.lineLength.kind === 'distance') { nmi }
913-
@if (facade.settings.vessels.greatCircleStyle.lineLength.kind === 'pixels') { px }
914-
</span>
915918
</mat-form-field>
916-
<label style="font-size: 0.8em">Color</label>
917-
<input type="color"
918-
[(ngModel)]="facade.settings.vessels.greatCircleStyle.color"
919-
(change)="persistModel()"
920-
style="width: 40px; height: 28px; padding: 2px; cursor: pointer; border: none"
921-
>
922-
<mat-form-field style="width: 70px">
919+
<mat-form-field style="width: 80px">
923920
<mat-label>Width</mat-label>
924921
<input matInput type="number" min="1" max="10"
925922
[(ngModel)]="facade.settings.vessels.greatCircleStyle.width"
926923
(change)="persistModel()"
927924
>
928925
</mat-form-field>
929-
<mat-form-field style="width: 130px">
926+
<mat-form-field style="width: 200px">
930927
<mat-label>Pattern</mat-label>
931928
<mat-select
932929
[(ngModel)]="facade.settings.vessels.greatCircleStyle.dash"
933930
(selectionChange)="persistModel()"
934931
>
935932
@for(d of options.lineStyle.dashPatterns; track d[0]) {
936-
<mat-option [value]="d[0]">{{d[1]}}</mat-option>
933+
<mat-option [value]="d[0]">
934+
<svg width="48" height="10" style="vertical-align: middle; margin-right: 6px">
935+
<line x1="0" y1="5" x2="48" y2="5" stroke="currentColor" stroke-width="2"
936+
[attr.stroke-dasharray]="options.lineStyle.dashArrays.get(d[0])"/>
937+
</svg>{{d[1]}}
938+
</mat-option>
937939
}
938940
</mat-select>
939941
</mat-form-field>

0 commit comments

Comments
 (0)