summaryrefslogtreecommitdiffstats
path: root/scene/gui/grid_container.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix GridContainer minimum size when there's a hidden parentAnni Ryynänen2024-06-201-1/+1
| | | | | | | | | | | | When calculating minimum size, GridContainer only looks at children that are returned from `as_sortable_control()`. That defaults to only showing children visible in the tree, so if the grid has a hidden parent the minimum size becomes (0, 0). After this change only the child itself needs to be visible, making `GridContainer::get_minimum_size()` behave the same way as other controls. Fixes #91722.
* Add as_sortable_control() to unify Container checkskobewi2024-05-081-9/+6
|
* Bind remaining theme properties to their respective classesYuri Sizov2023-09-131-0/+4
| | | | | | | | | | | | 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.
* Register theme properties with ThemeDBYuri Sizov2023-09-111-7/+5
|
* Use BitField<> hint for ArrayFormatJuan Linietsky2023-01-081-2/+2
| | | | This was missing in the conversion of bitflags to BitField<>.
* 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".
* Add a lifecycle method for manual theme item caching to ControlYuri Sizov2022-09-011-13/+14
|
* Add some codes, returnes directly if the value is not changed.风青山2022-08-231-0/+5
| | | | Avoid executing the following value-changed logics if the value does not really change.
* Fixed bug in grid_container with hidden childrenbesh812022-07-141-2/+3
| | | | Fix a bug that occour when there are hidden children in grid_container. The visualization isn't correct due to a wrong calculation of max_col and max_row that mistakenly includes hidden children.
* Add a new HashSet templatereduz2022-05-201-4/+5
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* Use range iterators for RBSet in most casesAaron Record2022-05-191-8/+8
|
* Merge pull request #59799 from Sauermann/fix-gridcontainer-remaining-pixelRémi Verschelde2022-05-161-4/+51
|\
| * Distribute remaining pixel to expanding childs of GridContainerMarkus Sauermann2022-04-011-4/+51
| |
* | Replace most uses of Map by HashMapreduz2022-05-161-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* | Rename theme properties to include underscoresFireForge2022-04-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 `GridContainer` not ignoring toplevel childrenMichael Alexsander2022-04-131-0/+3
|/
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-1/+2
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Rename minimum_size_changed() methodkobewi2021-12-061-2/+2
|
* Use range iterators for `Map`Lightning_A2021-09-301-10/+10
|
* Optimize StringName usagereduz2021-07-181-4/+4
| | | | | | | | | | | * 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.
* Style: Cleanup uses of double spaces between wordsRémi Verschelde2021-06-071-1/+1
| | | | | Or after punctuation. Tried to leave third-party stuff alone, unless it has been heavily modified for Godot.
* Initialize class variables with default values in scene/ [2/2]Rafał Mikrut2021-02-091-3/+1
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* [Complex Text Layouts] Refactor Font class, default themes and controls to ↵bruvzg2020-11-261-7/+21
| | | | | | | | use Text Server interface. Implement interface mirroring. Add TextLine and TextParagraph classes. Handle UTF-16 input on macOS and Windows.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-14/+24
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-9/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Popups are now windows also (broken!)Juan Linietsky2020-03-261-4/+4
|
* Use MOUSE_FILTER_PASS for all containers (but PanelContainer)Rémi Verschelde2020-01-131-2/+0
| | | | | | | | | | Containers are meant to forward mouse input to their the Controls they contain. PanelContainer has a visible Panel stylebox, so it still defaults to STOP. Fixes #34933.
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Merge pull request #32411 from YeldhamDev/fix_grid_overflowRémi Verschelde2019-10-081-1/+1
|\ | | | | Fix GridContainer's children overflowing it when not all slots of a row are occupied
| * Fix GridContainer's children overflowing it when not all slots of a row are ↵Michael Alexsander Silva Dias2019-09-281-1/+1
| | | | | | | | occupied
* | FIX: GridContainer children visibility check for min size evaluationternvein2019-10-011-1/+1
| |
* | Make empty columns automatically expand in GridContainerMichael Alexsander Silva Dias2019-09-281-16/+19
|/
* Updates containers minimum size when some constants are modifiedgroud2019-01-241-0/+4
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Revert "Created a new function named get_element in GridContainer. This ↵Rémi Verschelde2018-10-071-17/+0
| | | | funct…"
* Merge pull request #16977 from SASUPERNOVA/masterRémi Verschelde2018-05-011-0/+17
|\ | | | | Created a new function named get_element in GridContainer. This funct…
| * Updated fork to match current version of Godot.SASUPERNOVA2018-04-151-0/+17
| |
* | Fix GridContainer's children visibility breaking the layoutgroud2018-04-231-8/+15
|/
* Fixes wrong calculation of gridcontainer's children sizeGilles Roudiere2018-03-181-2/+2
|
* Merge pull request #17410 from groud/fix_grid_containerRémi Verschelde2018-03-131-4/+4
|\ | | | | Fixes infinite loop in GridContainer
| * Fixes infinite loop in GridContainerGilles Roudiere2018-03-101-4/+4
| |
* | Fix infinite loop in GridContainer layoutGary Oberbrunner2018-03-101-6/+6
|/ | | | | | | | | I had a grid container and tried to set rect.min_height larger in the editor; that caused an infinite loop in GridContainer::_notification at line 118. The reason is max_index was being set to the *height* of the row, not the *index* of the row. So later when it tried to erase that row and try again, there was nothing to erase. I applied the same fix to the width code.
* Prevent division by zero in GridContainerLeon Krause2018-03-071-2/+2
|
* Fixes a Gridcontainer wrong children fitting with expanded+non-zero minisizeGilles Roudiere2018-01-191-56/+67
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Convert Object::cast_to() to the static versionHein-Pieter van Braam2017-08-241-3/+3
| | | | | | | | | | | | Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/