set min height for dialog

This commit is contained in:
muerwre 2019-03-29 12:06:42 +07:00
parent 8f60a5efd6
commit 2cf83e88ed
2 changed files with 5 additions and 1 deletions

View file

@ -65,7 +65,10 @@ export class Component extends React.PureComponent<ITitleDialogProps, ITitleDial
const height = nearestInt(Math.min(container_height, Math.min(text_height, min_height)), text_line) + text_margins; const height = nearestInt(Math.min(container_height, Math.min(text_height, min_height)), text_line) + text_margins;
const height_raised = nearestInt(Math.min(container_height, Math.min(text_height, max_height)), text_line) + text_margins; const height_raised = nearestInt(Math.min(container_height, Math.min(text_height, max_height)), text_line) + text_margins;
this.setState({ height, height_raised }); this.setState({
height: ((height_raised - height) < 2 * text_line ? height_raised : height),
height_raised
});
}; };
render() { render() {

View file

@ -649,6 +649,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
opacity: 0; opacity: 0;
align-items: flex-start;
@media(max-width: @mobile_breakpoint) { @media(max-width: @mobile_breakpoint) {
display: none; display: none;