1
1
mirror of https://github.com/Yvee1/hascard.git synced 2024-11-22 04:33:06 +03:00

Show label fully when field is focused (settings window)

This commit is contained in:
Yvee1 2023-12-21 18:55:42 +01:00
parent 0b877aa855
commit 54327725cd
5 changed files with 17 additions and 5 deletions

View File

@ -21,7 +21,7 @@ description: Hascard is a text-based user interface for reviewing notes
dependencies: dependencies:
- base >= 4.7 && < 5 - base >= 4.7 && < 5
- brick >= 2.1.1 && < 3.0 - brick >= 2.3.1 && < 3.0
- containers > 0.6.0 && < 0.8 - containers > 0.6.0 && < 0.8
- directory >= 1.3.3 && < 1.4 - directory >= 1.3.3 && < 1.4
- filepath >= 1.4.2 && < 1.5 - filepath >= 1.4.2 && < 1.5

View File

@ -137,7 +137,8 @@ chunkSubsetField capacity stLens initialState =
, formFieldLens = stLens , formFieldLens = stLens
, formFieldUpdate = const , formFieldUpdate = const
, formFieldRenderHelper = id , formFieldRenderHelper = id
, formFieldConcat = customConcat } , formFieldConcat = customConcat
, formFieldVisibilityMode = ShowAugmentedField }
okField :: (Ord n, Show n) => Lens' s Bool -> n -> String -> s -> FormFieldState s e n okField :: (Ord n, Show n) => Lens' s Bool -> n -> String -> s -> FormFieldState s e n
okField stLens name label initialState = okField stLens name label initialState =
@ -153,7 +154,8 @@ okField stLens name label initialState =
, formFieldLens = stLens , formFieldLens = stLens
, formFieldUpdate = const , formFieldUpdate = const
, formFieldRenderHelper = id , formFieldRenderHelper = id
, formFieldConcat = vBox } , formFieldConcat = vBox
, formFieldVisibilityMode = ShowAugmentedField }
renderOk :: String -> n -> Bool -> Bool -> Widget n renderOk :: String -> n -> Bool -> Bool -> Widget n
renderOk label _ focus _ = renderOk label _ focus _ =

View File

@ -80,7 +80,8 @@ yesnoField rightAlign stLens name label initialState =
, formFieldLens = stLens , formFieldLens = stLens
, formFieldUpdate = const , formFieldUpdate = const
, formFieldRenderHelper = id , formFieldRenderHelper = id
, formFieldConcat = vBox } , formFieldConcat = vBox
, formFieldVisibilityMode = ShowFocusedFieldOnly }
renderYesno :: Ord n => Bool -> String -> n -> Bool -> Bool -> Widget n renderYesno :: Ord n => Bool -> String -> n -> Bool -> Bool -> Widget n
renderYesno rightAlign label n foc val = renderYesno rightAlign label n foc val =
@ -114,7 +115,8 @@ naturalNumberField bound stLens name postfix initialState =
, formFieldLens = stLens , formFieldLens = stLens
, formFieldUpdate = const , formFieldUpdate = const
, formFieldRenderHelper = id , formFieldRenderHelper = id
, formFieldConcat = vBox } , formFieldConcat = vBox
, formFieldVisibilityMode = ShowAugmentedField }
renderNaturalNumber :: Int -> String -> n -> Bool -> Int -> Widget n renderNaturalNumber :: Int -> String -> n -> Bool -> Int -> Widget n
renderNaturalNumber bound postfix n foc val = renderNaturalNumber bound postfix n foc val =

View File

@ -36,6 +36,7 @@ packages:
# #
extra-deps: extra-deps:
- vty-windows-0.2.0.1 - vty-windows-0.2.0.1
- brick-2.3.1@sha256:4c36e5d77dc360641a5aa9361949d981e4aecc7f1372c862e0b2451d614b5f5c,17394
# - acme-missiles-0.3 # - acme-missiles-0.3
# - git: https://github.com/commercialhaskell/stack.git # - git: https://github.com/commercialhaskell/stack.git
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a # commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a

View File

@ -11,6 +11,13 @@ packages:
size: 2160 size: 2160
original: original:
hackage: vty-windows-0.2.0.1 hackage: vty-windows-0.2.0.1
- completed:
hackage: brick-2.3.1@sha256:4c36e5d77dc360641a5aa9361949d981e4aecc7f1372c862e0b2451d614b5f5c,17394
pantry-tree:
sha256: 7476f449a27ac6736264f1fdde37e0282d43cd803d00da5ebe0ff811ee4035fc
size: 4671
original:
hackage: brick-2.3.1@sha256:4c36e5d77dc360641a5aa9361949d981e4aecc7f1372c862e0b2451d614b5f5c,17394
snapshots: snapshots:
- completed: - completed:
sha256: e176944bc843f740e05242fa7a66ca1f440c127e425254f7f1257f9b19add23f sha256: e176944bc843f740e05242fa7a66ca1f440c127e425254f7f1257f9b19add23f