Add some other minor visual fixes

This commit is contained in:
Danila Fedorin 2019-05-31 23:58:27 -07:00
parent 7c5a62d57a
commit 452056f71c

View File

@ -22,6 +22,9 @@ disabledButton attrs = button (attrs ++ [ disabled True ])
dangerButton : String -> Msg -> Html Msg
dangerButton s m = button [ onClick m, class "btn-danger" ] s
infoButton : String -> Msg -> Html Msg
infoButton s m = button [ onClick m, class "btn-info" ] s
primaryButton : String -> Msg -> Html Msg
primaryButton s m = button [ onClick m, class "btn-primary" ] s
@ -105,8 +108,8 @@ viewRawCacheModelHierarchy rcmh =
Ok _ -> viewError True ""
Err e -> viewError False e
newButton = primaryButton "Add level" CreateRawModel
useButton = resultButton checkedResult [ class "btn-primary" ] "Start simulation" (UseHierarchy << Just)
newButton = infoButton "Add level" CreateRawModel
useButton = resultButton checkedResult [ class "btn-info" ] "Start simulation" (UseHierarchy << Just)
in
div []
[ h2 [] [ text "Cache hierarchy" ]
@ -167,7 +170,7 @@ viewAccessView m av =
[ h2 [] [ text "Access Simulation" ]
, p [] [ text ("Simulating access of address " ++ String.fromInt av.blockAddr) ]
, buttonToolbar
[ [ primaryButton "Back" AccessViewBack, primaryButton "Forward" AccessViewForward ]
[ [ infoButton "Back" AccessViewBack, infoButton "Forward" AccessViewForward ]
, [ dangerButton "Stop" AccessViewCancel ]
]
, h3 [] [ text "Access event log" ]
@ -219,7 +222,7 @@ viewAccessInput m =
case parseResult of
Ok is -> if is == [] then Err "Please enter at least one number." else Ok is
Err e -> Err <| parseErrorToString e
accessButton = resultButton checkedResult [ class "btn-primary" ] "Access address" Access
accessButton = resultButton checkedResult [ class "btn-info" ] "Access address" Access
errorHtml =
case checkedResult of
Ok _ -> viewError True ""