@@ -27,6 +27,7 @@ import (
2727type Graph struct {
2828 LeftContainer * fyne.Container
2929 RightContainer fyne.Container
30+ RightBottom fyne.Container
3031 LabelSlider map [float64 ]* canvas.Text
3132 Sliders map [float64 ]* widget.Slider
3233 SliderAbs map [float64 ]* canvas.Text
@@ -110,9 +111,9 @@ func main() {
110111 fyneApp .Window .ShowAndRun ()
111112}
112113
113- func settings () * widget. Form {
114+ func settings () * fyne. Container {
114115 set .Collumns = widget .NewEntry ()
115- set .Collumns .Text = "0 "
116+ set .Collumns .Text = "15 "
116117
117118 set .Abcisses = widget .NewEntry ()
118119 set .Abcisses .Text = "251"
@@ -135,15 +136,28 @@ func settings() *widget.Form {
135136 ui .RightContainer .Refresh ()
136137 },
137138 }
138- return form
139+ largeur := container .NewHScroll (form )
140+ largeur .SetMinSize (fyne.Size {Width : 170 })
141+ returnCon := container .NewVBox (largeur )
142+ return returnCon
139143}
140144
141- func result () * container. Scroll {
145+ func result () * fyne. Container {
142146 set .Result = widget .NewMultiLineEntry ()
143147 set .Result .PlaceHolder = "Data to copy in rawAccel"
144148 scroll := container .NewVScroll (set .Result )
145149 scroll .SetMinSize (fyne.Size {Height : 300 })
146- return scroll
150+
151+ bottomBox := container .NewHBox (
152+ & widget.Separator {},
153+ widget .NewButtonWithIcon ("Copy" , theme .ContentCopyIcon (), func () {
154+ fyneApp .Window .Clipboard ().SetContent (set .Result .Text )
155+ }),
156+ )
157+
158+ result := container .NewVBox (scroll , container .NewCenter (bottomBox ))
159+
160+ return result
147161}
148162
149163func genGraph (loadFromSave bool ) {
@@ -204,9 +218,13 @@ func genGraph(loadFromSave bool) {
204218 ui .SliderAbs [currentInc ] = canvas .NewText (strconv .FormatFloat (increment , 'f' , 0 , 64 ), theme .TextColor ())
205219 ui .SliderAbs [currentInc ].TextSize = 12
206220
207- ui .RightContainer .Add (container .NewMax (ui .Sliders [currentInc ],
208- container .NewVBox (ui .SliderAbs [currentInc ],
209- ui .LabelSlider [currentInc ])))
221+ splitCont := container .NewVSplit (container .NewPadded (ui .Sliders [currentInc ]),
222+ container .NewVBox (container .NewCenter (ui .SliderAbs [currentInc ]),
223+ container .NewCenter (ui .LabelSlider [currentInc ])))
224+ splitCont .Offset = 0.99
225+
226+ ui .RightContainer .Add (splitCont )
227+
210228 increment = increment + collumnsInc
211229 }
212230
0 commit comments