Commit graph

13 commits

Author SHA1 Message Date
Maximilian Seidler
d94cc3a5ab
widgets: algin rect outline radius with inner border radius (#614)
* widget: add utility functions to calculate borders and make em static

* image: use the rounding util functions

* input-field: use the rounding util functions

* shape: use the rounding util functions
2024-12-29 11:14:49 +00:00
Maximilian Seidler
181294c4d8
widgets: use absolutePath to get last_write_time and ignore when no reloadTime (#615)
* image: use absolutePath to get last_write_time and ignore when no reloadTime

* background: use absolutePath to get last_write_time and ignore when no reloadTime
2024-12-26 15:43:11 +00:00
Maximilian Seidler
2775ab2868
widgets: render frambuffers with alpha 1.0 (#554)
* helpers: update CColor

yoinked from Hyprland

* image: fix border alpha

* shape: fix border alpha
2024-11-12 13:31:27 +00:00
Maximilian Seidler
6c3c444136
core: add border shader and border gradients (#548)
* renderer: add renderBorder function

* config: add CGradientValueData from Hyprland

* input-field: change outer to take gradients

Added gradient support to the following color options:
- `outer_color`
- `fail_color`
- `check_color`
- `capslock_color`
- `numlock_color`
- `bothlock_color``

* image: add gradient border

* shape: add gradient border

* shaders: adapt the new rounded smoothing factor from Hyprland
2024-11-09 16:54:44 +00:00
Maximilian Seidler
4fc133c96f
widgets: add support for specifing size and position options via percentages of output dimensions (#541)
* config: introduce a custom value type for layout related options

* widgets: use CLayoutValueData for size and position options

* widgets: catch bad_any_cast and out_of_range when contructing widgets other than label

* config: rename and restrict CLayoutValueData::fromAny to fromAnyPv

This is only for casting `any` variables that represent a void * to a
CLayoutValueData*, not just any any.

* misc: remove debug prints
2024-11-06 16:50:42 +00:00
Maximilian Seidler
5065788a47
misc: use Vector2D, Box and Mat3x3 from hyprutils (#515)
* misc: use Vector2D, Box and Mat3x3 from hyprutils

* nix: flake update

Fix CI fails. We need hyprutils>=0.2.3

* misc: use a function to convert Hyprlang::VEC2 to Vector2D

* misc: fixup some includes
2024-10-13 13:04:32 +01:00
Maximilian Seidler
cf0e975fed
widgets: move asset updates out of the draw function (#442)
* label: move asset updates out of the draw function

This allows us to check if the label has actually updated after the
callback from the asyncResourceGatherer. If it isn't we can requeue the
renderUpdate() function.

* image: move asset updates out of the draw function
2024-07-24 23:18:11 +02:00
André Silva
768cd3ea52
core: handle null timers in destructors (#350) 2024-05-26 18:46:53 +02:00
8658386f21 image: fix build with libc++
fixes #289
2024-04-22 10:12:42 +01:00
bvr-yr
eb1123fa2e
widgets: add Shape + minor image improve (#266)
* widgets: add Shape

* image: minor improvment

* glClear on FB alloc

* add Nix HM

* always create FB if not xray
2024-04-10 17:24:17 +01:00
bvr-yr
bbbb960e42
image: add reload options (#247)
* image: add reload options

* check for actual file changes

* use modtime

* check only same paths

* add Nix HM
2024-04-07 18:09:25 +01:00
bvr-yr
84c6282d6a
widgets: add rotate option to label and image (#234)
* widgets: add `rotate` option to label and image

* use framebuffer for image
2024-03-29 19:01:11 +00:00
bvr-yr
3e38762e84
widgets: add Image (#191) 2024-03-16 16:44:44 +02:00