Commit Graph

1334 Commits

Author SHA1 Message Date
Gareth Smith
5c6239365e
Add a readme link to monomer-flatpak-example. (#321) 2024-05-20 12:03:55 +02:00
Ruslan Gadeev
d0241b27f0
Improve documentation (#293)
* fix comments alignment in animation modules

* escape slashes to avoid italics in haddock

* fix grammar

* remove onClick and onClickReq from config docs for externalLink
2024-03-21 03:34:18 +01:00
Ruslan Gadeev
94d7f244e7
Add missing cursor icons (#289)
* add missing cursor icons

* rename CursorSize to CursorSizeAll
2024-03-21 03:33:09 +01:00
Ruslan Gadeev
465f33c460
Add support for delete key in inputField and textArea (and fix undo bug) (#294)
* add support for delete key in inputField

* add support for delete key in textArea

* add unit tests for delete key

* fix inputField undo behavior

* add more unit tests for textField and textArea
2024-03-21 03:26:22 +01:00
Francisco Vallarino
a16e8599df
Prepare release 1.6.0.1 (#314)
* Relax upper bounds for several packages

* Update Changelog
2024-01-08 02:35:36 +01:00
Francisco Vallarino
58b08083e3
Prepare release 1.6.0.0 (#310)
* Upgrade Stackage nightly

* Update Changelog

* Bump version

* Add 'Project status' section to README
2023-12-05 12:58:01 +01:00
Francisco Vallarino
1f6157c93f
Fix build issues with GHC 9.6 (#308) 2023-11-28 00:03:07 +01:00
Francisco Vallarino
05c5d6c9b5
Depend on latest nanovg-hs hash to use relaxed text and vector upper bounds (#285) 2023-05-21 03:18:29 +02:00
Ruslan Gadeev
bddbf62308
Add more animation widgets (#281)
* add Transform animation widget

* refactor Slide widget using Transform

* refactor Fade widget using Transform

* add Zoom animation widget

* add Wipe animation widget

* add Shake animation widget

* fix instance errors

* use overlay for animations

* add onFinishedReq configuration to animations

* add Strict extensions to animation modules

* convert FadeCfg and ZoomCfg to newtype

* add examples to Transform documentation
2023-05-20 17:50:01 +02:00
Ruslan Gadeev
3fff18280f
Fix typos in documentation (#284)
* fix typo in onChangeIdx description

* fix typos in selectList documentation

* fix typo in readOnly description

* fix typo in titleCaption description for confirm dialog

* fix typo in draggable documentation
2023-05-20 15:51:02 +02:00
Ruslan Gadeev
67f747a61f
Remove redundant imports and fix typos (#275)
* remove redundant imports

* fix dodgy imports and exports

* fix LANGUAGE

* import combinator instances to SizeReq

* fix typos

* fix resizeFactor typos

* fix converter typos

* fix typos in handleSystemEvents and defaultWindowSize descriptions

* fix typo in SetOverlay description
2023-05-17 02:32:22 +02:00
Francisco Vallarino
ed81c987de
Do not generate extra click events (#267) 2023-05-15 06:10:16 +02:00
Francisco Vallarino
a36492cb73
Use parent model for Alert and Confirm modals (#268) 2023-05-09 02:37:43 +02:00
Ruslan Gadeev
fb675f9128
Fix typo in widgetDataSet description (#273) 2023-05-06 17:55:46 +02:00
Ruslan Gadeev
6cd466ea91
Draggable widget: allow to hide the original widget when dragging. (#271)
* add hide origin configuration for draggable widget

* overwrite widgetRender instead of containerRender

* replace draggableHideOrigin with draggableRenderSource
2023-05-06 17:28:47 +02:00
Ruslan Gadeev
f6960cc476
fix Semigroup instance for BoxShadowCfg (#272) 2023-05-03 15:07:29 +02:00
Ruben Astudillo
41830e909b
Better explain how the nodeKey function is related to WidgetKey (#270) 2023-05-03 14:44:59 +02:00
Ruben Astudillo
7036f7aac8
Fix flake.nix definition to work with more recent nixpkgs snapshots (#266)
* Rework flake.nix

* Add devShell environment on flake.nix

* Update flake.lock
2023-05-01 17:21:59 +02:00
Francisco Vallarino
ff2ea3b414
Fix type error in examples (#263)
* Fix type error in examples

* Attempt to run build including examples

* Force build failure

* Revert "Force build failure"

This reverts commit 9728f0b0ac.
2023-02-26 23:18:45 +01:00
Francisco Vallarino
5b90aebae9
Improve development time application reload (#239)
* Consider SDL.TextEditingEvent as an action event

* When a frame requires rendering, make sure the next one is also rendered to avoid artifacts. It still does not render every frame

* Fix lint

* Fix typo

* Add foreign-store dependency

* Reuse window and avoid reinitializing SDL when running on ghci and code is reloaded

* Restore previous model and widget root on code changes

* Attempt to check if model's type changed (failed, since fingerprinting is not reliable)

* Add Show instances to various widgets

* Add configuration for fingerprint functions

* Merge new root with stored root, to account for code changes in new root and data in old

* Store the complete MonomerCtx type for app reload

* Use recover-rtti for model change detection

* Process WidgetResult when merging reloaded widget root

* Validate model changes in Composite

* Fix lint

* Fix unit tests

* Force hpack version in monomer.cabal

* Add appDisableModelReuse configuration option to always ignore previous model version

* Minor setup docs update

* Revert to AppConfig only being parameterized by e

* Restore recover-rtti dependency

* Revert "Revert to AppConfig only being parameterized by e"

This reverts commit 0a66513807.

* Revert to previous version without restore-rtti dependency

* Try to overcome build issue by enforcing ubuntu-20.04

* Do not commit .dylib files

* For hpack version

* Fix docs

* Fix missing imports

* Fix typo
2023-02-24 18:14:08 +01:00
Francisco Vallarino
e88d5d916e
Avoid weird macOS 'command encoder is already encoding to this command buffer' error when resizing window (#234)
* Avoid weird macOS 'command encoder is already encoding to this command buffer' error when resizing window

* Render resized window unconditionally when running on Linux
2023-02-24 17:53:35 +01:00
Darin Minamoto
cb7bb0ad4e
Add renderBezierTo to Renderer for rendering cubic bezier curves (#259) 2023-02-18 21:09:40 +01:00
Francisco Vallarino
ef4f10a07e
Prepare release 1.5.1.0 (#256)
* Bump version

* Update Changelog
2023-02-05 00:30:57 +01:00
Francisco Vallarino
df434983de
Minor clarification in WidgetEnv's widgetKeyMap (#255) 2023-02-04 23:28:51 +01:00
Francisco Vallarino
63189b73be
Add responseIf and responseMaybe helpers (#250)
* Add responseIf and responseMaybe helpers

* Move helper functions into UserUtil, where other similar functions reside
2023-02-04 04:40:25 +01:00
Ruslan Gadeev
0bdd378063
replace antipattern article link with archived version (#254) 2023-02-04 04:19:31 +01:00
Ruslan Gadeev
b8d3b82b50
Fix animation widget raising onFinished event when it is no longer relevant (#252)
* fix animation bug

* update animation tests
2023-02-01 03:00:53 +01:00
Ruslan Gadeev
a9ee596be3
Improve documentation for configuration options of some widgets (#253)
* docs: fix alignMiddle description in configuration options for box

* docs: fix documentation for the confirm dialog

* docs: add description for fitEither in configuration options for image

* docs: improve documentation for combinators

* docs: improve documentation for align configuration options

* docs: complete configuration options for box

* docs: fix description for thumbVisible combinator

* docs: add caretWidth and caretMs descriptions in configuration options
2023-02-01 02:03:46 +01:00
Francisco Vallarino
06388003ac
Update build badge url (#251) 2023-01-30 03:42:40 +01:00
Ruslan Gadeev
9f8ff38a32
Improve documentation (#249)
* docs: add documentation for arguments of widget constructors

* docs: align comments

* docs: fix Haddock

* docs: move some exported functions from Constructors to Configuration section

* docs: fix documentation
2023-01-30 00:41:08 +01:00
Francisco Vallarino
6327dbbf83
Drop shadow in colorPopup by using boxShadow widget (#248)
* Add/export utility functions

* Use correct values for CCW/Solid and CW/Hole in NanoVGRenderer

* Render shadow in popup component (test commit)

* Revert "Render shadow in popup component (test commit)"

This reverts commit 3b8075bf20.

* Re-export boxShadow widget from Widgets module

* Use boxShadow widget in colorPopup
2023-01-29 20:30:32 +01:00
Ruslan Gadeev
674945cb56
export dialD_ (#246) 2023-01-29 01:53:03 +01:00
Francisco Vallarino
0364e86b06
Add color popup widget (#247)
* Add initial version of ColorPopup

* Add theme entry for colorPopup container

* Add minimal Haddock to new widget
2023-01-29 01:34:26 +01:00
Ruslan Gadeev
2c52bc891a
Modify tests for selectList and dropdown (#245) 2023-01-25 14:19:00 +01:00
Ruslan Gadeev
915b68cf6c
fix selectList documentation (#244) 2023-01-13 00:04:45 +01:00
Francisco Vallarino
f9e7679d1a
Fix 'Running the examples' section in Setup docs (#243) 2023-01-12 23:54:27 +01:00
Francisco Vallarino
c233abaf95
Fix build issues (#240)
* Do not commit .dylib files

* Use ubuntu-20.04 container version
2022-12-06 03:18:06 +01:00
Francisco Vallarino
344edc64ed
Avoid infinite resize loop in multiline label (#233)
* Avoid infinite resize loop in multiline label

* Avoid weird macOS 'command encoder is already encoding to this command buffer' error when resizing window

* Render resized window unconditionally when running on Linux
2022-12-06 02:54:27 +01:00
Francisco Vallarino
df6ae02edc
Do not pass events to selectList children when they are not visible (#230) 2022-11-21 13:53:14 +01:00
Francisco Vallarino
ff4ad25928
Upgrade stack.yaml to LTS 20 (GHC 9.2) (#236)
* Use Stackage LTS 20

* Keep copy of stack.yaml for GHC 8.10.7 version

* Update setup docs to include GHCup

* Fix case

* Remove old note about M1 incompatibility

* Use Stackage LTS 20.1
2022-11-21 01:17:30 +01:00
Francisco Vallarino
908de6f48e
Trigger ResizeWidgets when user defined size requests change (#229) 2022-11-17 01:27:24 +01:00
Francisco Vallarino
9a7fcdf186
Upgrade GitHub Actions commands' versions (#235) 2022-11-14 03:39:13 +01:00
Francisco Vallarino
8695391657
Add not for possible Fedora build issue (#231) 2022-11-12 12:31:31 +01:00
Ruslan Gadeev
d4270caafe
Documentation improvements (#222)
* fix typos

* fix haddock link

* fix example link

* fix typos

* fix spelling

* fix typos in tests
2022-11-08 13:24:51 +01:00
Francisco Vallarino
d1ddcc2d40
Fix rendering artifacts (#215)
* Consider SDL.TextEditingEvent as an action event

* When a frame requires rendering, make sure the next one is also rendered to avoid artifacts. It still does not render every frame

* Fix lint

* Fix typo

* Update Changelog
2022-10-31 11:57:39 +01:00
Francisco Vallarino
ba4da4b76b
Add Useful Extensions section to README.md (#221)
* Use complete url for logo to avoid visibility issues on Hackage

* Add Useful Extensions section
2022-10-28 13:26:41 +02:00
Francisco Vallarino
c9343173c7
Update Windows installation docs to reflect comments in https://github.com/fjvallarino/monomer/issues/201 (#220) 2022-10-27 20:47:26 +02:00
Francisco Vallarino
14c87ef176
Use pkg-config for glew linking (#219)
* Use monomer.cabal with correct bounds for text-show

* Use pkg-config for glew linking

* Use correct pkg-config-dependencies field (as defined in hpack)
2022-10-27 20:08:55 +02:00
Francisco Vallarino
51c87b6f6e
Add "examples" flag to optionally build examples and tutorials (#218)
* Add ignore-examples flag to avoid building examples unless required. Add a small dev-test-app executable to help testing of the library

* Rename ignore-examples to examples, make build logic clearer

* Update monomer.cabal

* Update docs
2022-10-27 18:42:44 +02:00
Francisco Vallarino
5b16417591
Bump text-show version to build on Stackage nightly (#217) 2022-10-22 13:16:51 +02:00