Skip to content

Commit 2060ba7

Browse files
committed
moved to a different way of selecting eq type
1 parent c592c89 commit 2060ba7

6 files changed

Lines changed: 38 additions & 20 deletions

File tree

ui/src/app/sections/effects/equalizers/equalizers.component.html

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
<div fxLayout="row" [style.padding.px]="5" [style.width.%]="100" fxLayoutAlign="space-between start" >
1+
<div fxLayout="row" [style.padding.px]="5" [style.width.%]="100" fxLayoutAlign="space-between center" >
22

33
<div fxFlex="20" fxLayoutAlign="start center">
44
<eqm-toggle class="on-off" [(state)]="enabled" (stateChange)="setEnabled()"></eqm-toggle>
55
</div>
66

7-
<div fxLayout="row" fxLayoutAlign="space-around center" fxLayoutGap="5px">
8-
<eqm-button type="transparent" (pressed)="previousType()" [disabled]="!enabled || type === 'Basic'">
9-
<eqm-icon name="triangle" color="#4f8d71" rotate="180" size="15"></eqm-icon>
10-
</eqm-button>
11-
<div style="width: 110px;" fxLayout="row" fxLayoutAlign="center center">
12-
<eqm-label>{{type}}</eqm-label>
13-
&nbsp;
14-
<eqm-label>Equalizer</eqm-label>
15-
</div>
16-
<eqm-button type="transparent" (pressed)="nextType()" [disabled]="!enabled || type === 'Advanced'">
17-
<eqm-icon name="triangle" color="#4f8d71" size="15"></eqm-icon>
18-
</eqm-button>
7+
<div fxLayout="row" fxLayoutAlign="space-around center" fxLayoutGap="20px">
8+
<eqm-label>Equalizer: </eqm-label>
9+
<eqm-label
10+
[color]="type === 'Basic' ? ui.colors.accent : ui.colors.light"
11+
(click)="setType('Basic')"
12+
>
13+
Basic
14+
</eqm-label>
15+
<eqm-label
16+
[color]="type === 'Advanced' ? ui.colors.accent : ui.colors.light"
17+
(click)="setType('Advanced')"
18+
>
19+
Advanced
20+
</eqm-label>
1921
</div>
2022

2123
<div fxFlex="20" fxLayoutAlign="end start">
@@ -29,6 +31,7 @@
2931
<!-- <eqm-icon (click)="toggleVisibility()" [name]="hide ? 'show' : 'hide'"></eqm-icon> -->
3032
</div>
3133
</div>
34+
3235
<div [style.width.%]="100" fxLayout="row">
3336
<eqm-equalizer-presets
3437
[disabled]="!enabled"
@@ -38,11 +41,6 @@
3841
(presetSaved)="savePreset($event)"
3942
(presetDeleted)="deletePreset()"
4043
></eqm-equalizer-presets>
41-
<!-- <div fxLayout="column" fxLayoutAlign="start center">
42-
<eqm-label>Global</eqm-label>
43-
<eqm-knob size="small"></eqm-knob>
44-
<eqm-value-screen></eqm-value-screen>
45-
</div> -->
4644
</div>
4745
<eqm-loading *ngIf="!loaded"></eqm-loading>
4846
<eqm-carousel class="equalizers" #equalizersCarousel [hidden]="!loaded"

ui/src/app/sections/effects/equalizers/equalizers.component.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
justify-items: center;
66
position: relative;
77

8+
.button-container {
9+
width: 100%;
10+
.button {
11+
width: 27.5%;
12+
}
13+
}
14+
815
.presets {
916
width: 95%;
1017
}

ui/src/app/sections/effects/equalizers/equalizers.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ export class EqualizersComponent implements OnInit {
9999
this.equalizersCarousel.next()
100100
}
101101

102+
setType (type: EqualizerType) {
103+
this.type = type
104+
this.typeSwitched(type)
105+
}
106+
102107
equalizerCameIntoView (type: EqualizerType) {
103108
const equalizer = this.getEqualizerFromType(type)
104109
equalizer && equalizer.selected()

ui/src/app/sections/source/source.component.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
width: 100%;
55
.button {
66
width: 27.5%;
7-
87
}
98
}
109

ui/src/app/services/ui.service.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ export class UIService extends DataService {
2323
dimensionsChanged = new Subject<UIDimensions>()
2424
settingsChanged = new Subject<UISettings>()
2525

26+
readonly colors = {
27+
'accent': '#4f8d71',
28+
'warning': '#e80415',
29+
'gradient-start': '#5a5b5f',
30+
'gradient-end': '#2c2c2e',
31+
'light': '#c9cdd0',
32+
'dark': '#16191c'
33+
}
34+
2635
get isLocal () {
2736
return window.location.href.includes('file://')
2837
}

ui/src/app/styles/_colors.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$accent: #4f8d71;
22
$warning: #e80415;
3-
$gradient-start: rgb(90, 91, 95);
3+
$gradient-start: #5a5b5f;
44
$gradient-end: #2c2c2e;
55
$light: #c9cdd0;
66
$dark: #16191c;

0 commit comments

Comments
 (0)