Window size not working properly
See original GitHub issueHi! Awesome library!
I don’t know how the libui-node
works properly, so please help.
If I render a <Window />
element on the tree, without any children, the Window
get the right size. But, as soon as I insert the children, the window fits to the children and ignore the specified width and height. Is it expected?
Also, it looks like updating the height
of the window via state doesn’t work as well. My code is the following:
import React, { Component } from 'react'
import { render, Window, App, Button } from 'proton-native'
class Example extends Component {
state = {
height: 300,
}
componentWillMount() {
this.handleResize = this._handleResize.bind(this)
}
_handleResize() {
this.setState({
height: 400,
})
}
render() {
console.log(this.state.height)
return (
<App>
<Window
title="Example"
margined
size={{
w: 300,
h: this.state.height
}}
>
<Button onClicked={this.handleResize}>
Change my size!
</Button>
</Window>
</App>
)
}
}
render(<Example />)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:9 (3 by maintainers)
Top Results From Across the Web
How to Fix Screen Size Too Big or Small on Windows
Open the Start menu and select Settings. · Go to System. · In Display, check the Scale and Resolution options, and adjust them...
Read more >8 Fixes When You Can't Resize Window in Windows 11 and 10
8 Fixes When You Can't Resize Window in Windows 11 and 10 · 1. Try Keyboard Shortcuts to Resize a Window · 2....
Read more >Can't change windows' size in Win 10 - Microsoft Community
Right click on the very top of the window's bar and click on "Restore." This will restore the window to it's original capabilities...
Read more >How to Fix Windows not Remembering Window Positions and ...
Method 1: Cascading · Firstly, Restart your computer. · Now open any window(like File Explorer), of which size and position you want to...
Read more >How to resize a window - Computer Hope
Press Alt + Spacebar again to open the window menu, arrow down to Size, and press Enter . Press the up or down...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@zaguiini I was also looking for the same and found that adding box tag inside the window component will render the screen exact as the same size of given height and width of window.
There are a lot of other issues with resizing on Mac that I need to fix as well (and these are issues on my end due to probably not using Auto Layout correctly), so the answer to these questions will likely be a case-by-case thing until I fix them.