feat: Provide reasonable default mouse settings for Macs (#982)
* feat: Provide reasonable default mouse settings for Macs * fix: hack to eliminate the double scrollbar
This commit is contained in:
committed by
László Monda
parent
2b84101975
commit
a409c219d8
@@ -2,6 +2,23 @@
|
||||
<i class="fa fa-sliders"></i>
|
||||
<span>Mouse speed</span>
|
||||
</h1>
|
||||
<button class="btn btn-danger mouse-speed-reset-button"
|
||||
mwlConfirmationPopover
|
||||
title="Are you sure?"
|
||||
placement="bottom"
|
||||
confirmText="Yes"
|
||||
cancelText="No"
|
||||
(confirm)="resetToPcDefault()">Reset PC default speeds
|
||||
</button>
|
||||
<button class="btn btn-danger mouse-speed-reset-button"
|
||||
mwlConfirmationPopover
|
||||
title="Are you sure?"
|
||||
placement="bottom"
|
||||
confirmText="Yes"
|
||||
cancelText="No"
|
||||
(confirm)="resetToMacDefault()">Reset Mac default speeds
|
||||
</button>
|
||||
|
||||
<h3>Mouse pointer speed</h3>
|
||||
<div class="row mouse-speed-setting" *ngFor="let prop of moveProps">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
@@ -32,11 +49,5 @@
|
||||
(ngModelChange)="onSetPropertyValue(prop.prop, $event)"></slider-wrapper>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-danger mouse-speed-reset-button"
|
||||
mwlConfirmationPopover
|
||||
title="Are you sure?"
|
||||
placement="top"
|
||||
confirmText="Yes"
|
||||
cancelText="No"
|
||||
(confirm)="resetToDefault()">Reset speeds to default
|
||||
</button>
|
||||
<!-- It is a hack to eliminate the double scrollbar -->
|
||||
<div class="placeholder"></div>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
}
|
||||
|
||||
.mouse-speed-reset-button {
|
||||
display: block;
|
||||
margin-bottom: 4rem;
|
||||
margin-bottom: 2rem;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.mouse-speed-setting {
|
||||
@@ -25,4 +25,9 @@
|
||||
margin-top: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { SetUserConfigurationValueAction } from '../../../store/actions/user-con
|
||||
import { SliderPips, SliderProps } from '../../slider-wrapper/slider-wrapper.component';
|
||||
import { Observable, Subscription } from 'rxjs';
|
||||
import { UserConfiguration } from 'uhk-common';
|
||||
import { ResetMouseSpeedSettingsAction } from '../../../store/actions/device';
|
||||
import { ResetPcMouseSpeedSettingsAction, ResetMacMouseSpeedSettingsAction } from '../../../store/actions/device';
|
||||
|
||||
const MOUSE_MOVE_VALUE_MULTIPLIER = 25;
|
||||
|
||||
@@ -144,7 +144,11 @@ export class MouseSpeedComponent implements OnInit, OnDestroy {
|
||||
}));
|
||||
}
|
||||
|
||||
resetToDefault() {
|
||||
this.store.dispatch(new ResetMouseSpeedSettingsAction());
|
||||
resetToPcDefault() {
|
||||
this.store.dispatch(new ResetPcMouseSpeedSettingsAction());
|
||||
}
|
||||
|
||||
resetToMacDefault() {
|
||||
this.store.dispatch(new ResetMacMouseSpeedSettingsAction());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user