Smaller object details (#1877)

* Smaller object details

* Increased version, updated changelog
main
Boris Sekachev 6 years ago committed by GitHub
parent e92014ead0
commit e85b7c4881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- -
### Changed ### Changed
- - Smaller object details (<https://github.com/opencv/cvat/pull/1877>)
### Deprecated ### Deprecated
- -

@ -1,6 +1,6 @@
{ {
"name": "cvat-ui", "name": "cvat-ui",
"version": "1.6.1", "version": "1.6.2",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

@ -1,6 +1,6 @@
{ {
"name": "cvat-ui", "name": "cvat-ui",
"version": "1.6.1", "version": "1.6.2",
"description": "CVAT single-page application", "description": "CVAT single-page application",
"main": "src/index.tsx", "main": "src/index.tsx",
"scripts": { "scripts": {

@ -46,6 +46,8 @@ function ItemAttributeComponent(props: Props): JSX.Element {
changeAttribute, changeAttribute,
} = props; } = props;
const attrNameStyle: React.CSSProperties = { wordBreak: 'break-word', lineHeight: '1em' };
if (attrInputType === 'checkbox') { if (attrInputType === 'checkbox') {
return ( return (
<Col span={24}> <Col span={24}>
@ -57,7 +59,7 @@ function ItemAttributeComponent(props: Props): JSX.Element {
changeAttribute(attrID, value); changeAttribute(attrID, value);
}} }}
> >
<Text strong className='cvat-text'> <Text style={attrNameStyle} className='cvat-text'>
{attrName} {attrName}
</Text> </Text>
</Checkbox> </Checkbox>
@ -70,7 +72,7 @@ function ItemAttributeComponent(props: Props): JSX.Element {
<Col span={24}> <Col span={24}>
<fieldset className='cvat-object-item-radio-attribute'> <fieldset className='cvat-object-item-radio-attribute'>
<legend> <legend>
<Text strong className='cvat-text'>{attrName}</Text> <Text style={attrNameStyle} className='cvat-text'>{attrName}</Text>
</legend> </legend>
<Radio.Group <Radio.Group
size='small' size='small'
@ -94,12 +96,12 @@ function ItemAttributeComponent(props: Props): JSX.Element {
if (attrInputType === 'select') { if (attrInputType === 'select') {
return ( return (
<> <>
<Col span={24}> <Col span={8} style={attrNameStyle}>
<Text strong className='cvat-text'> <Text className='cvat-text'>
{attrName} {attrName}
</Text> </Text>
</Col> </Col>
<Col span={24}> <Col span={16}>
<Select <Select
size='small' size='small'
onChange={(value: string): void => { onChange={(value: string): void => {
@ -125,12 +127,12 @@ function ItemAttributeComponent(props: Props): JSX.Element {
return ( return (
<> <>
<Col span={24}> <Col span={8} style={attrNameStyle}>
<Text strong className='cvat-text'> <Text className='cvat-text'>
{attrName} {attrName}
</Text> </Text>
</Col> </Col>
<Col span={24}> <Col span={16}>
<InputNumber <InputNumber
size='small' size='small'
onChange={(value: number | undefined): void => { onChange={(value: number | undefined): void => {
@ -153,12 +155,12 @@ function ItemAttributeComponent(props: Props): JSX.Element {
return ( return (
<> <>
<Col span={24}> <Col span={8} style={attrNameStyle}>
<Text strong className='cvat-text'> <Text className='cvat-text'>
{attrName} {attrName}
</Text> </Text>
</Col> </Col>
<Col span={24}> <Col span={16}>
<Input <Input
size='small' size='small'
onChange={(event: React.ChangeEvent<HTMLInputElement>): void => { onChange={(event: React.ChangeEvent<HTMLInputElement>): void => {

@ -170,6 +170,10 @@
} }
> .ant-collapse-content { > .ant-collapse-content {
> .ant-collapse-content-box {
padding: 3px;
}
background: inherit; background: inherit;
} }
} }
@ -203,6 +207,7 @@
overflow: hidden; overflow: hidden;
max-height: 1.2em; max-height: 1.2em;
font-size: 1em; font-size: 1em;
margin: 0;
> span { > span {
padding: 0 10px; padding: 0 10px;
@ -211,7 +216,7 @@
> .ant-radio-group { > .ant-radio-group {
display: grid; display: grid;
padding: 5px; padding: 1px 5px 1px 5px;
} }
} }

Loading…
Cancel
Save