1
1
mirror of https://github.com/Yvee1/hascard.git synced 2024-11-21 17:50:12 +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:
- base >= 4.7 && < 5
- brick >= 2.1.1 && < 3.0
- brick >= 2.3.1 && < 3.0
- containers > 0.6.0 && < 0.8
- directory >= 1.3.3 && < 1.4
- filepath >= 1.4.2 && < 1.5

View File

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

View File

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

View File

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

View File

@ -11,6 +11,13 @@ packages:
size: 2160
original:
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:
- completed:
sha256: e176944bc843f740e05242fa7a66ca1f440c127e425254f7f1257f9b19add23f