mirror of
https://github.com/ivanizag/izapple2.git
synced 2024-12-22 09:30:19 +00:00
Make device panel scrollable
Previous panel caused main window to resize when device panel was enabled so if the vertical resolution wasn't big enough you'd lose visibility of the toolbar and the text would be noticeably distorted.
This commit is contained in:
parent
4e116182e7
commit
e770dbc058
@ -14,17 +14,20 @@ type panelDevices struct {
|
||||
func newPanelDevices(s *state) *panelDevices {
|
||||
var pd panelDevices
|
||||
pd.s = s
|
||||
pd.w = container.NewVBox()
|
||||
pd.w = container.NewMax()
|
||||
c := container.NewVBox()
|
||||
|
||||
pd.joystick = newPanelJoystick()
|
||||
pd.w.Add(pd.joystick.w)
|
||||
c.Add(pd.joystick.w)
|
||||
|
||||
var cards = s.a.GetCards()
|
||||
for i, card := range cards {
|
||||
if card != nil && card.GetName() != "" {
|
||||
pd.w.Add(newPanelCard(i, card).w)
|
||||
c.Add(newPanelCard(i, card).w)
|
||||
}
|
||||
}
|
||||
|
||||
pd.w.Add(container.NewVScroll(c))
|
||||
|
||||
return &pd
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user