Open kimkanu opened 3 years ago
I found another bug: GridRow
and GridColumn
behave weirdly inside GridView
.
import {
Window,
View,
hot,
GridColumn,
GridRow,
GridView,
Text,
} from "@nodegui/react-nodegui";
import React from "react";
import { MemoryRouter } from "react-router";
import AppRoutes from "./routes";
const minSize = { width: 500, height: 520 };
class App extends React.Component {
render() {
return (
<MemoryRouter>
<Window windowTitle="Hello 👋🏽" minSize={minSize}>
<GridView
style="flex: 1; margin: 56px; background-color: 'blue';"
horizontalSpacing={0}
verticalSpacing={0}
>
<GridRow>
<GridColumn width={4}>
<View style="border: 3px solid red;">
<Text>Hello</Text>
</View>
</GridColumn>
<GridColumn width={2}>
<View style="border: 4px solid grey;">
<Text>Second Column</Text>
</View>
</GridColumn>
</GridRow>
</GridView>
</Window>
</MemoryRouter>
);
}
}
export default hot(App);
Results:
Those child components are not fit into the parent GridView
. I think it is not intended.
Describe the bug The method
setContentsMargins(int left, int top, int right, int bottom)
(inherited fromQLayout
) is not accessible via currentGridView
API.To Reproduce One may see the blue padding inside the
GridView
component.Expected behavior One should be able to control content margins.
Screenshots
Desktop (please complete the following information):