summaryrefslogtreecommitdiffstats
path: root/scene/gui/button.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Register theme properties with ThemeDBYuri Sizov2023-09-111-40/+37
|
* Remove unnecessary validity checks from `Button` and `TextureRect`A Thousand Ships2023-09-061-4/+2
| | | | | The one in `TextureRect` appears to be a leftover from earlier code, and the one in `Button` was copied from there.
* Fix Button text when overrun is not trim nothingHaoyu Qiu2023-08-081-3/+4
|
* Unify and streamline connecting to Resource changeskobewi2023-07-171-3/+2
|
* Fix Button clipping when internal margins existHaoyu Qiu2023-07-141-4/+5
|
* Make `TextureButton` and `Button` update on texture changeNinni Pipping2023-05-291-2/+21
|
* Update size or size cache when toggling `expand_icon` in `Button`Rindbee2023-05-171-0/+4
| | | | | | When the `expand_icon` is switched, the size cache can be updated to solve the issue that the cache cannot be updated when the `OptionButton` is enabled with `fit_to_longest_item`.
* Implement vertical icon alignment for buttonsFlorian Kothmeier2023-05-011-12/+57
|
* Make icons of scripted and custom classes fit the editor UIYuri Sizov2023-03-311-4/+19
| | | | | | | | | | | Also: - Add an option to limit the icon size in PopupMenu. This is similar to how this works in Tree and TreeItem. - Add the same option to TabBar. - Add a theme constant for Tree, PopupMenu, Button, and TabBar to apply this limit on the control level. Co-authored-by: Daylily-Zeleen <daylily-zeleen@foxmail.com>
* Add more sections to Button and BaseButtonVolTer2023-01-251-1/+5
|
* Removed unused property hints and `Object::get_translatable_strings()`Juan Linietsky2023-01-091-1/+1
| | | | | | | | | | | | | | | | * Remove unused `EditorPropertyMember` and related hints, previouly used by VisualScript. Such logic should be implemented in the VS module itself. * As the above broke compatibility with the VS module, clean up the other hacks that were still in core in support of VisualScript. * `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's `get_translatable_strings()`, which is a legacy function not used anywhere. So both are removed. * Reordered some usage flags after the above removal to minimize the diff. * General clean up. Fixes #30203. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | 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".
* Remove redundant Variant-types initializationsMarkus Sauermann2022-11-141-1/+1
|
* Add a lifecycle method for manual theme item caching to ControlYuri Sizov2022-09-011-44/+88
|
* [TextServer] Add support for trimming edge spaces on line break.bruvzg2022-09-011-1/+1
|
* Rename `CanvasItem.update()` to `queue_redraw()`Micky2022-08-291-13/+13
| | | | | | | | | | Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
* Fix case where `h_separation` might not work in `Button`Rindbee2022-08-121-6/+4
| | | | | | This patch mainly solves two things: 1. The typo of `h_separation`; 2. Negative values of `h_separation` will be treated as `0` when used, to prevent the button's minimum `width` from being reduced by `h_separation`.
* Round icon position and size in buttons to make them look sharperYuri Sizov2022-08-051-1/+2
|
* Add fit_to_longest_item to OptionButtonkobewi2022-08-021-37/+56
|
* Use BitField hint for the TextServer enums. Add missing parts for BitField ↵bruvzg2022-07-151-1/+1
| | | | support to the GDextension API.
* Fix regressions from Font refactorbruvzg2022-07-081-1/+5
| | | | | Remove unnecessary font override Fixes button outline draw when it should not, causing button colors to be slightly off
* Refactor Font configuration and import UI, and Font resources.bruvzg2022-07-061-85/+6
|
* Move duplicate AutoWrap, Overrun and VisibleChar behavior enums to the ↵bruvzg2022-06-161-5/+5
| | | | TextServer.
* Add overrun behavior to the Button.bruvzg2022-06-081-3/+21
|
* Merge pull request #60867 from KoBeWi/μtextRémi Verschelde2022-05-171-5/+5
|\ | | | | Remove font height restriction from Button
| * Remove font height restriction from Buttonkobewi2022-05-081-5/+5
| |
* | Fix button icon expansion calculation with empty textHendrik Brucker2022-05-101-1/+2
|/
* Rename theme properties to include underscoresFireForge2022-04-231-9/+9
| | | | | | | | | | | | | | - check_vadjust -> check_v_adjust - close_h_ofs -> close_h_offset - close_v_ofs -> close_v_offset - commentfocus -> comment_focus - hseparation -> h_separation - ofs -> offset - selectedframe -> selected_frame - state_machine_selectedframe -> state_machine_selected_frame - table_hseparation -> table_h_separation - table_vseparation -> table_v_separation - vseparation -> v_separation
* Fix text clipping on the right side.bruvzg2022-03-131-1/+1
|
* Add optional constructor arguments to more Control nodesHugo Locurcio2022-03-041-1/+1
| | | | | | | | | 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.
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-0/+3
|
* Revert "Add missing SNAME macro optimization to all theme methods call"Rémi Verschelde2022-02-081-1/+1
| | | | | | | | This reverts commit a988fad9a092053434545c32afae91ccbdfbe792. As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used everywhere but only in critical code paths. For theme methods specifically, it was by design that only getters use `SNAME` and not setters.
* Add missing SNAME macro optimization to all theme methods calljmb4622022-02-061-1/+1
|
* Fix button icon_color_disabled alpha channelmashumafi2022-01-301-3/+2
|
* Improve locale detection.bruvzg2022-01-181-1/+1
| | | | | Use separate language, script and country lists. Add locale selection dialog and property hint.
* Merge pull request #55225 from bruvzg/fix_ligature_cursor_and_ot_featuresRémi Verschelde2022-01-101-3/+3
|\
| * [TextServer] Improve ligature cursor handling.bruvzg2022-01-091-3/+3
| | | | | | | | | | | | Fix mid-grapheme hit test. Fix OpenType features property handling, add default features override option. Enable mid-grapheme cursor by default.
* | Fix button multiline text alignment.bruvzg2022-01-091-0/+2
|/
* Merge pull request #54441 from ↵Rémi Verschelde2022-01-051-3/+2
|\ | | | | | | Geometror/checkbutton-checkbox-font-hover-pressed-color
| * Fix CheckButton and CheckBox font hover pressed colorHendrik Brucker2021-10-311-3/+2
| | | | | | | | Co-authored-by: Kjetil Fosse <kjetil.fosse@outlook.com>
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | | | | | Happy new year to the wonderful Godot community!
* | Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-2/+2
| | | | | | | | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* | align to horizontal_alignment, valign to vertical_alignment, relatedNathan Franke2021-12-091-43/+40
| |
* | Rename minimum_size_changed() methodkobewi2021-12-061-7/+7
|/
* Add focus font color to Button and derivativesYuri Sizov2021-10-261-3/+12
|
* Fix missing argument names in bindingsRémi Verschelde2021-10-091-10/+10
| | | | | | While at it, tweak some boolean setters to use `p_enabled` for the bool. Also renames `draw_minimap()` to `set_draw_minimap()`.
* Add `auto_translate` toggle for automatic translationMichael Alexsander2021-07-291-2/+2
|
* Optimize StringName usagereduz2021-07-181-57/+57
| | | | | | | | | | | * Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
* Add alignment options to icons on buttons.jitspoe2021-06-291-54/+83
| | | | | | They can now be centered and right-aligned. Fixes #11380.
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-1/+1
|