# HG changeset patch # User Benjamin Weber # Date 1666183879 -7200 # Wed Oct 19 14:51:19 2022 +0200 # Node ID 68a60e002b1b35e2bf54893542752bd425aa8df0 # Parent 52318a998e6a5250dbb265ff5e940684df9a1b9e viewStep: make border around all steps instead of single in RoundMode diff --git a/src/Main.elm b/src/Main.elm --- a/src/Main.elm +++ b/src/Main.elm @@ -495,7 +495,7 @@ in viewWrapper <| column [ spacing 10, padding outerPadding, centerX, centerY, width fill, height <| px 800 ] <| - [ row [ spacing 10, width fill, height fill ] [ drawField squareSize perRow model.nkit <| "NKIT", column [ spacing 10, width fill, paddingXY 10 0, centerY ] [ counter, playInterface, viewStep model.step ], drawField squareSize perRow model.kit "KIT" ] + [ row [ spacing 10, width fill, height fill ] [ drawField squareSize perRow model.nkit <| "NKIT", column [ spacing 10, width fill, paddingXY 10 0, centerY ] [ counter, playInterface, viewStep model.incrementMode model.step ], drawField squareSize perRow model.kit "KIT" ] --, row [ padding 30, width fill, height fill ] [ viewStats model ] , row [ width fill, height fill, padding 30 ] <| diff --git a/src/Views.elm b/src/Views.elm --- a/src/Views.elm +++ b/src/Views.elm @@ -368,8 +368,8 @@ List.map flowTime >> printFlowTimes -viewStep : StepVariant -> Element Msg -viewStep s = +viewStep : AutoPlayMode -> StepVariant -> Element Msg +viewStep im s = let headToContent = [ 2, 4 ] @@ -383,7 +383,7 @@ focus n = let isFocused = - stepVToInt s == n - 1 || (s == lastStepOfRound && n == 0) + im == StepMode && (stepVToInt s == n - 1 || (s == lastStepOfRound && n == 0)) baseAttrs = [ width fill, height fill ] @@ -400,6 +400,14 @@ else unfocusedAttrs + roundBorder = + case im of + RoundMode -> + [ Border.width 1, Border.color black, Border.dashed ] + + StepMode -> + [ padding 1 ] + colHead = stepRow -1 [ rowHead "next" "meaning", contentCells [ contentCell [] [ text "NKIT" ], contentCell [] [ text "KIT" ] ] ] @@ -433,7 +441,7 @@ step7 = stepRow 7 [ rowHead "7" "ensure fifo:", contentCells [ contentCell [ Background.color orange ] [ text "prioritise", text "older on todo (w0)" ], contentCell [] [ text "N/A" ] ] ] in - column [ {- Element.explain Debug.todo, -} width fill, height fill, Font.size 11 ] [ colHead, step0, step1, step2, step3, step4, step5, step6, step7 ] + column [ {- Element.explain Debug.todo, -} width fill, height fill, Font.size 11 ] [ colHead, column ([ width fill, height fill ] ++ roundBorder) [ step0, step1, step2, step3, step4, step5, step6, step7 ] ] doneCount : Field -> Int