Improve code prettiness

This commit is contained in:
hasufell 2014-11-16 16:45:51 +01:00
parent 562fdbe26f
commit ea88ef84ea
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
3 changed files with 39 additions and 39 deletions

View File

@ -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

View File

@ -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))