1
0
Fork 0
Commit Graph

104 Commits

Author SHA1 Message Date
Pāvels Nadtočajevs 09822ea1a9 Forward color picker preview mouse button events to the window underneath. 2025-02-08 10:16:03 +02:00
Thaddeus Crews 00564920d8
Merge pull request #101960 from Giganzo/colorpicker-swatches-menubutton
Fix ColorPicker load/save swatches button interactions
2025-01-31 09:15:37 -06:00
Giganzo a36f064204 Fix ColorPicker load/save swatches button interactions 2025-01-22 19:23:29 +01:00
Giganzo e9b164adf7 Fix ColorPicker hide save/load swatches for pressets_visible 2025-01-22 15:36:45 +01:00
WhalesState 6caadd57a9 `ColorPicker` remove unused children and fix sample bugs.
Remove an unused `VBoxContainer`.
Remove 3 unused children from grid (Label, Slider, SpinBox).
Ignore sample input when old color is not displayed.
Fix current color overbright position.
2025-01-17 18:12:36 +02:00
WhalesState 2eded468f9 Add `ColorPicker` cursor background and reuse the cursor for wheel.
Add a cursor's background to fill the picker cursor.
Unhardcode the wheel radius.
Reuse the picker cursor image for the HSV wheel.
2025-01-10 09:55:54 +02:00
LuoZhihao 9eeeadb037 ColorPicker: Improve the accuracy of hue slider in OKHSL mode 2025-01-04 21:36:27 +08:00
bruvzg 9fece033ab [macOS, Windows] Add support for excluding windows from a screenshot. 2024-12-10 11:00:13 +02:00
Nông Văn Tình e6a49ab6ac Save color palette as resources to reuse later
Co-authored-by: Micky <66727710+Mickeon@users.noreply.github.com>
2024-12-06 20:16:06 +07:00
Thaddeus Crews 0ee60dd543
Merge pull request #99516 from KoBeWi/quantum_entanglement_of_source_files
Untangle ColorPicker includes
2024-11-26 13:04:54 -06:00
kobewi 289e548e34 Untangle ColorPicker includes 2024-11-22 21:42:50 +01:00
LuoZhihao f6751d8d17 ColorPicker: fix OKHSL circle in HSV mode 2024-11-21 13:26:05 +08:00
kobewi 82b53b1e1b Fix legacy picking label bounds 2024-10-22 13:50:49 +02:00
Zi Ye d827b34ea8 Fixed undo/redo behaviour of color picker and added ability to cancel/confirm color selection. 2024-03-24 15:12:11 -05:00
Hugo Locurcio 079f1c8ead
Display a revert icon on ColorPicker's old sample
This denotes that the color can be clicked to revert to the old color.
2023-11-07 10:04:39 +01:00
ajreckof 3160add2b0 Fix ColorPicker deferred mode not working for sliders. 2023-10-13 14:35:47 +02:00
Yuri Sizov fe000277ea Bind remaining theme properties to their respective classes
This adds binds for GraphEdit/GraphElement/GraphNode, which were
skipped before due to a rework. This also adds binds for Window,
which was skipped before due to a complicated code organization.

Also adds theme cache entries/direct cache access to a few places
that previously missed it. Some theme properties are now exposed
to other classes via friendships or public getters for convenience.

This removes all string-based theme access from scene/ classes.
2023-09-13 19:31:35 +02:00
Yuri Sizov 2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +02:00
Rémi Verschelde 14256a2395
Merge pull request #78468 from KoBeWi/enmarginalization
Fix ColorPicker margin theme property
2023-08-08 16:55:32 +02:00
Hendrik Brucker a29a680920 Extract StyleBoxFlat, StyleBoxTexture and StyleBoxLine in their own file 2023-07-17 13:25:00 +02:00
dinoplane 3f02b0cfde Moved HSV and OKHSL caching logic into color_mode 2023-07-05 07:15:58 -07:00
dinoplane e11e9d2b9a Use cached saturation for color picker when value is 0 2023-06-21 15:18:20 -07:00
kobewi 9c3afcc898 Fix ColorPicker margin theme property 2023-06-20 12:47:52 +02:00
dinoplane a374c7d519
Use cached hue for color picker when saturation is 0
Fixes #76968.
2023-06-12 10:59:33 +02:00
kobewi b76ddeda45 Improve color picking 2023-05-19 14:21:43 +02:00
kobewi 14cb9b5b26 Add center_grabber property to Slider 2023-04-22 17:53:17 +02:00
Yuri Sizov e401540264 Implement theme item cache in ColorPicker and friends 2023-04-03 18:01:11 +02:00
Markus Sauermann 888add8418 Fix Color Picking
With the 4.x-introduction of Windows the previous method for
color picking was no longer working.

This PR uses the following approach to reintroduce color-picking.
When the Color-Picking-Button is pressed, a quasi-screenshot of the
Window-content is created and displayed in a new Popup-Window.
This new Window allows selecting colors by Mouse-Click.
A Preview of the targeted Color is also displayed.
2023-02-09 01:00:54 +01:00
Rémi Verschelde 906ee0b219
Merge pull request #67253 from KoBeWi/PICKER_USAGE_NO_EDITOR
Remove editor dependencies from ColorPicker
2023-01-21 20:52:16 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Rémi Verschelde b04bc49443
Merge pull request #68255 from jbcolli2/ColorPickerBug
Fixed Issue #68194 involving ColorPicker being allowed to align horizontally when it shouldn't
2022-12-21 22:25:14 +01:00
jbcolli2 c685c47f8a Fixed ColorPicker so the vertical option is not available in editor. 2022-11-04 13:59:25 -04:00
Chris Ridenour 286e7da162 Modularize the Color Picker via properties. 2022-11-04 00:08:46 -04:00
Haoyu Qiu 3aed3edc06 Allow selecting SpinBox & LineEdit text when focus enters 2022-10-29 09:58:42 +08:00
kobewi a3661ad079 Remove editor dependencies from ColorPicker 2022-10-11 16:09:27 +02:00
Vitika9 1dce43d417 ColorPicker UX improvements
- Tabs and MenuButton for mode selection and enabling/disabling colorized sliders
- MenuButton for shape selection with new icon for each shape
- Drag and drop functionality for presets to arrange order
- A chronological list of recently selected presets which are global for the editor
- Presets are now highlighted as being active or inactive
- Thicker sliders for easy targeting
- `grabber_offset` theme constant for Slider
- Uncolorized sliders
2022-09-06 21:42:20 +05:30
Johan Aires Rastén 26ebea7286 Fix ColorPicker color and hsv sync issue
ColorPicker has both a Color and HSV values for the currently selected
color, fixed a few cases where those were not kept in sync.

Refactored a little regarding this, and removed a redundant update.

Solves #63777
2022-08-01 23:05:44 +02:00
Rémi Verschelde 90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
Vitika9 0011d93c81 ColorPicker Refactor 2022-07-06 22:11:43 +05:30
K. S. Ernest (iFire) Lee 1b776a6e7a Allow picking similar colours using OKHSL. 2022-06-07 05:53:27 -07:00
Hugo Locurcio a06f82ca4d
Add optional constructor arguments to more Control nodes
This can be used to make editor code more compact.
However, as of writing, these constructor arguments cannot be used
from the scripting API.

This was already provided for Label and CheckBox, but it was missing
for other Control nodes where it made sense to provide a default value.
2022-03-04 09:48:41 +01:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Yuri Sizov bdbb7b3999 Remove EDSCALE dependency from /scene/gui 2021-10-04 15:25:08 +03:00
Hendrik Brucker ff9901f51e Reimplement ColorPicker presets 2021-08-18 02:09:48 +02:00
Francois Belair 94a464f555 Add cache to color picker for presets
This prevents loading from the project metadata more than once,
significantly saving performance with nodes that have color pickers.
2021-07-07 14:17:44 -04:00
Gregory Basile 8ab13f8ace Documentation search fixes
Updates rich_text_label so that the built-in documentation can be searched
Previously, it would only find the first result and would not select other results
Renames "_entered" functions to "_submitted"
2021-06-16 09:43:34 -07:00
kobewi 877dbda209 Create ColorPicker shaders statically 2021-05-17 11:39:20 +02:00
Hugo Locurcio 1e063595c3
Implement reverting to the old color when clicking it in ColorPicker 2021-05-10 18:13:33 +02:00
Hugo Locurcio 9e1bfe2e9e
Display the old color in ColorPicker for easier comparison
This only affects ColorPickerButton nodes that spawn a ColorPicker,
not standalone ColorPickers.

This partially addresses #7366.
2021-05-06 03:08:05 +02:00
Kongfa Waroros 6294507acb Add Various ColorPicker shapes 2021-04-06 22:48:03 +07:00