Skip to content

Commit

Permalink
is Github CI machine
Browse files Browse the repository at this point in the history
  • Loading branch information
ddkwork committed Jun 28, 2024
1 parent cab8606 commit 95933ec
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
15 changes: 7 additions & 8 deletions cpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,16 @@ func LayoutCpu(fileName string) unison.Paneler {

asm := LayoutDisassemblyTable(fileName)
TopHSplit := widget.NewHSplit(
widget.NewTab("cpu with fast call", "todo fast call layout", true, asm),
widget.NewTab("reg", "todo reg", true, widget.NewButton("todo reg")),
widget.NewTab("cpu with fast call", "todo fast call layout", false, asm),
widget.NewTab("reg", "todo reg", false, widget.NewButton("todo reg")),
0.3)
return TopHSplit.Dock

hexEditor := widget.NewCodeEditor("main.go")
// hexEditor.Editor.SetText(hex.Dump(testHexDat))
stackTable := LayoutStackTable()
BottomHSplit := widget.NewHSplit(
widget.NewTab(" hex editor", "todo hex editor", true, hexEditor),
widget.NewTab("stack", "todo stack test", true, stackTable),
widget.NewTab(" hex editor", "todo hex editor", false, hexEditor),
widget.NewTab("stack", "todo stack test", false, stackTable),
0.3)
//todo add tab into hex editor and stack layout
/*
Expand All @@ -62,10 +61,10 @@ func LayoutCpu(fileName string) unison.Paneler {
tabs.NewTab("struct")
*/

top := widget.NewTab("cpu and reg", "", true, TopHSplit)
bottom := widget.NewTab("hex editor and stack", "", true, BottomHSplit)
top := widget.NewTab("cpu and reg", "", false, TopHSplit)
bottom := widget.NewTab("hex editor and stack", "", false, BottomHSplit)
vSplit := widget.NewVSplit(top, bottom, 0.1)
return vSplit
return vSplit.Dock
}

var testRegData = Register{
Expand Down
18 changes: 9 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
)

func main() {
testLayoutCpu()
return
// Run()
// testLayoutCpu()
// return
Run()
return
// testDisassembly()
// return
// testParsePe()
Expand Down Expand Up @@ -61,18 +61,18 @@ func testLayoutCpu() {
pos := float32(0)

dock.DockTo(left, nil, side.Left)
// LeftContainer := widget.NewDockContainer(left)
LeftContainer := unison.Ancestor[*unison.DockContainer](left)
LeftContainer := widget.NewDockContainer(left)
// LeftContainer := unison.Ancestor[*unison.DockContainer](left)
dock.DockTo(right, LeftContainer, side.Right)
RightContainer := widget.NewDockContainer(right)
// RightContainer := widget.NewDockContainer(right)
scale := float32(0.3)
pos = (r.Width/(display.ScaleX*1000)/2 + scale) * 1000
RightContainer.Stack(right, -1)
LeftContainer.Stack(left, -1)
dock.RootDockLayout().SetDividerPosition(pos)
unison.InvokeTaskAfter(func() { dock.RootDockLayout().SetDividerPosition(pos) }, time.Millisecond)

LeftContainer.SetCurrentDockable(left) // left not work
RightContainer.SetCurrentDockable(right) // right not work
LeftContainer.SetCurrentDockable(left) // left not work
// RightContainer.SetCurrentDockable(right) // right not work
content.AddChild(dock)

return
Expand Down
2 changes: 1 addition & 1 deletion ux.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func Run() {
mylog.Check("not support file type")
}
}
pages.Layout()
w.Content().AddChild(pages.Layout())
})
}

Expand Down

0 comments on commit 95933ec

Please sign in to comment.