1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00
Commit Graph

118 Commits

Author SHA1 Message Date
Mounir Tohami
a07bd3fd31 Move ColorPicker shaders to ColorPickerShape class 2025-10-24 02:49:12 +03:00
Lukas Tenbrink
33689d7beb Remove transitive mesh.h, rendering_server.h and shader.h includes from node.h. 2025-10-08 12:16:52 +02:00
LuoZhihao
7b4c95e6d8 ColorPicker: Add okhsl HS and HL rectangular picker shapes 2025-06-07 22:30:40 +08:00
LuoZhihao
8a9409257b ColorPicker: Add intensity slider
Add intensity slider to all color modes. Replace raw mode by linear mode, which uses linear color space.

When color is overbright, automatically switch hex text to script text. Allow executing expression in script text field to set color. Add the "script" icon to the default theme.
2025-05-23 12:45:29 +08:00
Haoyu Qiu
daaf4119de Improve ColorPicker 2025-04-30 11:50:35 +02:00
Pāvels Nadtočajevs
e6d3cf63fb [ColorPicker, macOS] Add link to request required screen recording permission. 2025-04-23 22:25:10 +03:00
Rémi Verschelde
5045d549f9 Merge pull request #99515 from KoBeWi/shapez.godot
Refactor ColorPicker shapes
2025-03-19 14:53:57 +01:00
kobewi
ef0408e704 Refactor ColorPicker shapes 2025-03-18 18:57:26 +01:00
Thaddeus Crews
49fcd4ce46 Merge pull request #101546 from bruvzg/portal_color_picker
[Linux] Implement native color picker.
2025-03-17 10:52:29 -05:00
Konrad Gadzina
e6f812c056 Modify color in ColorPicker with keyboard or joypad 2025-03-11 22:41:41 +01:00
Thaddeus Crews
deb9705b77 Merge pull request #99662 from beicause/color-picker-wheels-in-okhsl
ColorPicker: Allow other color wheels in okhsl mode
2025-03-11 14:00:59 -05:00
Thaddeus Crews
324512e11c Style: Replace header guards with #pragma once 2025-03-07 17:33:47 -06:00
LuoZhihao
67c2115c50 ColorPicker: allow other color wheels in okhsl mode
remove `get_shape_override` in ColorMode
2025-02-09 16:18:54 +08:00
Pāvels Nadtočajevs
09822ea1a9 Forward color picker preview mouse button events to the window underneath. 2025-02-08 10:16:03 +02:00
Pāvels Nadtočajevs
05ca80632d [Linux] Implement native color picker. 2025-02-03 16:30:44 +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