Merge pull request #1347 from opencv/bs/reset_color_settings

React UI: Added button to reset color settings
main
Dmitry Kalinin 6 years ago committed by GitHub
commit dadd3e6ee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Special behaviour for attribute value ``__undefined__`` (invisibility, no shortcuts to be set in AAM) - Special behaviour for attribute value ``__undefined__`` (invisibility, no shortcuts to be set in AAM)
- Dialog window with some helpful information about using filters - Dialog window with some helpful information about using filters
- Ability to display a bitmap in the new UI - Ability to display a bitmap in the new UI
- Button to reset colors settings (brightness, saturation, contrast) in the new UI
### Changed ### Changed
- -

@ -6,6 +6,7 @@ import React from 'react';
import { Row, Col } from 'antd/lib/grid'; import { Row, Col } from 'antd/lib/grid';
import Checkbox, { CheckboxChangeEvent } from 'antd/lib/checkbox'; import Checkbox, { CheckboxChangeEvent } from 'antd/lib/checkbox';
import Button from 'antd/lib/button';
import Slider from 'antd/lib/slider'; import Slider from 'antd/lib/slider';
import Select from 'antd/lib/select'; import Select from 'antd/lib/select';
import InputNumber from 'antd/lib/input-number'; import InputNumber from 'antd/lib/input-number';
@ -16,6 +17,7 @@ import { clamp } from 'utils/math';
import { BackJumpIcon, ForwardJumpIcon } from 'icons'; import { BackJumpIcon, ForwardJumpIcon } from 'icons';
import { FrameSpeed, GridColor } from 'reducers/interfaces'; import { FrameSpeed, GridColor } from 'reducers/interfaces';
interface Props { interface Props {
frameStep: number; frameStep: number;
frameSpeed: FrameSpeed; frameSpeed: FrameSpeed;
@ -263,6 +265,19 @@ export default function PlayerSettingsComponent(props: Props): JSX.Element {
/> />
</Col> </Col>
</Row> </Row>
<Row className='cvat-player-reset-color-settings'>
<Col>
<Button
onClick={() => {
onChangeBrightnessLevel(100);
onChangeContrastLevel(100);
onChangeSaturationLevel(100);
}}
>
Reset color settings
</Button>
</Col>
</Row>
</div> </div>
); );
} }

@ -5,6 +5,9 @@
@import '../../base.scss'; @import '../../base.scss';
.cvat-settings-page { .cvat-settings-page {
height: 90%;
overflow-y: auto;
> div:nth-child(1) { > div:nth-child(1) {
margin-top: 30px; margin-top: 30px;
margin-bottom: 10px; margin-bottom: 10px;
@ -73,12 +76,19 @@
width: 90px; width: 90px;
} }
.cvat-player-reset-color-settings,
.cvat-player-settings-brightness, .cvat-player-settings-brightness,
.cvat-player-settings-contrast, .cvat-player-settings-contrast,
.cvat-player-settings-saturation { .cvat-player-settings-saturation {
width: 40%; width: 40%;
} }
.cvat-player-reset-color-settings {
> .ant-col {
text-align: center;
}
}
.cvat-settings-page-back-button { .cvat-settings-page-back-button {
width: 100px; width: 100px;
margin-top: 15px; margin-top: 15px;

Loading…
Cancel
Save