This commit is contained in:
Thomas Forgione 2022-02-19 16:39:05 +01:00
parent 2900823554
commit ba8b57e5e4
2 changed files with 8 additions and 5 deletions

View File

@ -3,6 +3,7 @@ port module Main exposing (..)
import Browser
import Element exposing (Element)
import Element.Border as Border
import Element.Font as Font
import Element.Input as Input
import Emoji
import Html
@ -109,7 +110,7 @@ update msg model =
view : Model -> Html.Html Msg
view model =
[ header model, panel (modelEmojis model) ]
|> Element.column [ Element.width (Element.px 512), Element.height (Element.px 512) ]
|> Element.column [ Font.size 25, Element.width (Element.px 1024), Element.height (Element.px 768) ]
|> Element.layout []
@ -129,8 +130,10 @@ header model =
else
Border.width 1
, Border.rounded 5
, Element.width Element.fill
, Element.height Element.fill
]
{ label = Element.el [] (Element.text (Emoji.categoryEmoji x).unicode)
{ label = Element.el [ Element.centerX, Element.centerY ] (Element.text (Emoji.categoryEmoji x).unicode)
, onPress = Just (CategoryClicked x)
}
)
@ -151,10 +154,10 @@ header model =
panel : List Emoji.Emoji -> Element Msg
panel em =
em
|> regroup 10
|> regroup 20
|> List.map (\x -> List.map maybeEmoji x)
|> List.map (Element.row [ Element.width Element.fill ])
|> Element.column [ Element.width (Element.px 512), Element.height (Element.px 512), Element.scrollbarY ]
|> Element.column [ Element.width (Element.px 1024), Element.height (Element.px 748), Element.scrollbarY ]
emoji : Emoji.Emoji -> Element Msg

View File

@ -17,7 +17,7 @@ fn main() {
web_view::builder()
.title("Elmojinput")
.content(Content::Html(html_content))
.size(512, 512)
.size(1024, 768)
.resizable(false)
.debug(true)
.user_data(())