fixed code engine bugs

This commit is contained in:
paul
2025-03-10 10:37:57 +05:30
parent d1ef2fa3f8
commit 16bfd244e6
7 changed files with 19 additions and 56 deletions

View File

@@ -111,7 +111,7 @@ async function generateTkinterCode(projectName, widgetList=[], widgetRefs=[], as
// widget - {id, widgetType: widgetComponentType, children: [], parent: "", initialData: {}}
const generatedObject = generateTkinterCodeList(filteredWidgetList, widgetRefs, "", "")
const generatedObject = generateTkinterCodeList(filteredWidgetList, widgetRefs.current, "", "")
const {code: codeLines, imports, requirements, mainVariable} = generatedObject

View File

@@ -28,12 +28,12 @@ export class TkinterBase extends Widget {
if (parentLayout === Layouts.PLACE || absolutePositioning){
const config = {
x: this.state.pos.x,
y: this.state.pos.y,
x: Math.trunc(this.state.pos.x),
y: Math.trunc(this.state.pos.y),
}
config["width"] = this.state.size.width
config["height"] = this.state.size.height
config["width"] = Math.trunc(this.state.size.width)
config["height"] = Math.trunc(this.state.size.height)
// if (!this.state.fitContent.width){
// config["width"] = this.state.size.width