A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Context menu should always be entirely on the screen

+18 -5
+17 -4
src/Applications/UI/ContextMenu.elm
··· 16 16 -- 🗺 17 17 18 18 19 - view : Maybe (ContextMenu Msg) -> Html Msg 20 - view m = 19 + view : Float -> Maybe (ContextMenu Msg) -> Html Msg 20 + view viewportWidth m = 21 21 case m of 22 22 Just (ContextMenu items coordinates) -> 23 + let 24 + ( height, width ) = 25 + ( 250, 170 ) 26 + 27 + left = 28 + coordinates.x 29 + |> max (width / 2 + 12) 30 + |> min (viewportWidth - width / 2 - 12) 31 + 32 + top = 33 + coordinates.y 34 + |> max (250 / 2 + 12) 35 + in 23 36 brick 24 - [ style "left" (String.fromFloat coordinates.x ++ "px") 25 - , style "top" (String.fromFloat coordinates.y ++ "px") 37 + [ style "left" (String.fromFloat left ++ "px") 38 + , style "top" (String.fromFloat top ++ "px") 26 39 27 40 -- 28 41 , style "min-width" "170px"
+1 -1
src/Applications/UI/View.elm
··· 103 103 ----------------------------------------- 104 104 -- Context Menu 105 105 ----------------------------------------- 106 - , Lazy.lazy UI.ContextMenu.view model.contextMenu 106 + , Lazy.lazy2 UI.ContextMenu.view model.viewport.width model.contextMenu 107 107 108 108 ----------------------------------------- 109 109 -- Notifications