* widget: add click handling and point containment methods to IWidget interface
* core: add onClick method to handle mouse click events
- renderer: move getOrCreateWidgetsFor method declaration to public section
* core: update mouse event handling to track mouse location and button clicks
* widget: add onclick command handling and point containment to CLabel
- config: add onclick special config value to label
* assets: add label configuration for keyboard layout switching
* config: add onclick configuration for label widgets
- add CLICKABLE macro for onclick configuration
- replace direct onclick assignment with CLICKABLE macro
* core: fix cursor shape initialization and pointer handling
- ensure pointer is available before setting cursor shape
- initialize cursor shape device if not already done
* core: add hover handling and cursor shape updates
- implement onHover method to manage widget hover states
- update cursor shape based on hover status
- ensure all outputs are redrawn after state changes
* widgets: add hover state management and bounding box calculations
- add setHover and isHovered methods to manage hover state
- implement containsPoint method for hit testing
- override getBoundingBox in CLabel for accurate positioning
- add onHover method in CLabel to change cursor shape
* core: add hover handling in pointer motion
- invoke onHover method with current mouse location
* widgets: add hover handling and bounding box for password input field
- add getBoundingBox method to calculate the widget's bounding box
- implement onHover method to update cursor shape on hover
* widgets: update hover behavior for label widget
- modify cursor shape setting to only apply when onclickCommand is not empty
* core: optimize hover handling and rendering for lock surfaces
- Improve hover state tracking for widgets
- reduce unnecessary redraw calls by tracking hover changes
- remove redundant renderAllOutputs() call
* widgets: add onclick and hover to shape and image
* core: trigger hover and onclick only for the currently focused surface
* core: handle fractionalScale in onclick and hover
* core: don't trigger onclick or hover when hide_cursor is set
* misc: remove braces
* core: run onclick commands asnychronously
---------
Co-authored-by: Memoraike <memoraike@gmail.com>
Includes examples from wiki with minor modifications.
Date and time labels inspired by https://github.com/catppuccin/hyprlock
Aims to improve out-of-the-box experience and basic stuff reference.
Makes more sense than clearing the input buffer in the auth impl.
Also added a check for the password buffer length to reset the fail
color as soon as the password length > 0.
* cmake: allow passing commit and version commit
* nix: don't set HYPRLOCK_VERSION_COMMIT
(Nix) Makes it so `--version` always prints the short commit hash, instead of not printing it.
* input-field: fixup dynamic width
- Instead of not rendering placeholder text,
if it does not fit into the input-field width,
render it up until the input field size.
- Improve updateWidth.
* input-field: make sure dots center does not change during width anim
When numlock is enabled but numlock_color is fallback, `targetGrad`
remains nullptr. This causes Hyprlock to crash in updateColors().
This commit aligns the condition check for assigning `targetGrad` with
later usages.
src/renderer/widgets/IWidget.cpp:123:11: error: no type named 'time_zone' in namespace 'std::__1::chrono'; did you mean 'date::time_zone'?
123 | const std::chrono::time_zone* pCurrentTz = nullptr;
| ^~~~~~~~~~~~~~~~~~~~~~
| date::time_zone
/usr/include/date/tz.h:785:7: note: 'date::time_zone' declared here
785 | class time_zone
| ^
src/renderer/widgets/IWidget.cpp:127:39: error: no member named 'locate_zone' in namespace 'std::__1::chrono'
127 | pCurrentTz = std::chrono::locate_zone(name);
| ~~~~~~~~~~~~~^