Skip to content

Commit 51fe521

Browse files
committed
tweak the layout
1 parent 34c3f78 commit 51fe521

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ui/scoreTable.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ func (t *scoreTable) Table() *gtk.TreeView {
118118

119119
func (t *scoreTable) ShowScore(score core.Score) {
120120
t.score = score
121+
t.showScoreInTable(score)
121122
}
122123

123124
func (t *scoreTable) showScoreInTable(score core.Score) {

ui/scoreView.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@ func setupNewScoreView(colors colorProvider, clock core.Clock) *scoreView {
2929

3030
result.graph = newScoreGraph(colors, clock)
3131
result.graphArea, _ = gtk.DrawingAreaNew()
32+
result.graphArea.SetSizeRequest(400, 250)
3233
result.graphArea.SetHExpand(true)
33-
result.graphArea.SetVExpand(true)
34+
result.graphArea.SetVExpand(false)
3435
result.graphArea.SetHAlign(gtk.ALIGN_FILL)
3536
result.graphArea.SetVAlign(gtk.ALIGN_FILL)
3637
result.graphArea.SetCanFocus(false)
3738
result.graphArea.Connect("draw", result.graph.Draw)
3839
result.graphArea.Connect("style-updated", result.graph.RefreshStyle)
3940

4041
result.table = newScoreTable(colors)
42+
result.table.Table().SetVAlign(gtk.ALIGN_START)
4143

4244
result.rootGrid.Attach(result.graphArea, 0, 0, 1, 1)
4345
result.rootGrid.Attach(result.table.Table(), 0, 1, 1, 1)

0 commit comments

Comments
 (0)