Improve code prettiness
This commit is contained in:
parent
562fdbe26f
commit
ea88ef84ea
@ -81,8 +81,7 @@ makeMyGladeGUI = do
|
||||
<*> xmlGetWidget xml castToButton "drawButton"
|
||||
<*> xmlGetWidget xml castToButton "saveButton"
|
||||
<*> xmlGetWidget xml castToButton "quitButton"
|
||||
<*> xmlGetWidget xml castToFileChooserButton
|
||||
"filechooserButton"
|
||||
<*> xmlGetWidget xml castToFileChooserButton "filechooserButton"
|
||||
<*> xmlGetWidget xml castToDrawingArea "drawingarea"
|
||||
<*> xmlGetWidget xml castToDrawingArea "treedrawingarea"
|
||||
<*> xmlGetWidget xml castToHScale "hscale"
|
||||
@ -124,7 +123,8 @@ makeGUI startFile = do
|
||||
_ <- onClicked (delButton mygui) $ drawDiag mygui
|
||||
_ <- onClicked (saveButton mygui) $ saveDiag mygui
|
||||
_ <- onClicked (quitButton mygui) mainQuit
|
||||
_ <- onResponse (aboutDialog mygui) (\x -> case x of
|
||||
_ <- onResponse (aboutDialog mygui)
|
||||
(\x -> case x of
|
||||
ResponseCancel -> widgetHideAll (aboutDialog mygui)
|
||||
_ -> return ())
|
||||
-- have to redraw for window overlapping and resizing on expose
|
||||
|
@ -258,9 +258,9 @@ treePretty = Diag f
|
||||
-- by the dimensions given in xDimension from DiagProp.
|
||||
xAxis :: Diag
|
||||
xAxis =
|
||||
Diag hRule <>
|
||||
Diag segments <>
|
||||
Diag labels
|
||||
Diag hRule
|
||||
<> Diag segments
|
||||
<> Diag labels
|
||||
where
|
||||
hRule p _ =
|
||||
arrowAt (p2 (diagXmin p, if diagYmin p <= 0 then 0 else diagYmin p))
|
||||
@ -286,9 +286,9 @@ xAxis =
|
||||
-- by the dimensions given in yDimension from DiagProp.
|
||||
yAxis :: Diag
|
||||
yAxis =
|
||||
Diag vRule <>
|
||||
Diag segments <>
|
||||
Diag labels
|
||||
Diag vRule
|
||||
<> Diag segments
|
||||
<> Diag labels
|
||||
where
|
||||
vRule p _ =
|
||||
arrowAt (p2 (if diagXmin p <= 0 then 0 else diagXmin p, diagYmin p))
|
||||
|
Loading…
Reference in New Issue
Block a user