summaryrefslogtreecommitdiffstats
path: root/scene/gui/scroll_container.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@8004c7524fb9f43425c4d6f614410a76678e0f7cSpartan3222024-10-301-3/+3
|\
| * Set clang-format `RemoveSemicolon` rule to `true`Adam Scott2024-10-251-3/+3
| | | | | | | | - Set clang-format `Standard` rule to `c++20`
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Fix ScrollContainer configuration warningskobewi2024-09-211-1/+1
|
* Add SCROLL_MODE_RESERVE to ScrollContainerkobewi2024-09-121-11/+21
|
* Fix scroll container min size calculationJordyfel2024-09-101-14/+14
|
* Fix rtl on follow focusGiganzo2024-07-231-2/+2
| | | | Change right_margin to side_margin
* [Scene] Add `SceneStringNames::text/value_changed`A Thousand Ships2024-06-191-2/+2
|
* Add visibilty mode to as_sortable_control()kobewi2024-06-031-1/+1
|
* Fix scrollbar issues in `ScrollContainer`Michael Alexsander2024-05-191-14/+16
|
* Add as_sortable_control() to unify Container checkskobewi2024-05-081-14/+5
|
* Enabled 'Scrolling' signal when scrolling with middle mouse on ↵Sofox2024-04-221-14/+14
| | | | RichTextLabel/ScrollContainer
* Use `Vector*` component-wise `min/max/clamp` functions where applicableA Thousand Ships2024-03-201-2/+1
|
* Revert "Update Node::get_configuration_warnings signature"Rémi Verschelde2024-02-171-2/+2
| | | | This reverts commit d3852deaa450d77edb30df2bb1c77bd7bc45befc.
* Update Node::get_configuration_warnings signatureRedMser2024-02-081-2/+2
|
* Update deferred calls to use Callableskobewi2024-01-091-3/+1
|
* [Scene,Main] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-09-121-1/+1
|
* Register theme properties with ThemeDBYuri Sizov2023-09-111-6/+3
|
* Expose horizontal/vertical custom_step as editor property for the ↵Marius Hanl2023-04-291-0/+24
| | | | ScrollContainer
* 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".
* Fix Determining Window for TouchscreenMarkus Sauermann2022-12-071-2/+2
| | | | | | | | | DisplayServer::screen_is_touchscreen will likely never utilize its parameter p_screen. This PR replaces this function by DisplayServer::is_touchscreen_available() with the same functionality. This solves the problem, that a SubViewport was used for determining the screen, which resulted in error messages.
* Code simplificationsMarkus Sauermann2022-11-071-5/+3
| | | | | | | | | | | | | | | | | CanvasItemEditor: - p_result == ADD_MOVE is always true in this switch-clause - both parts of the if-else-clause do the same thing and simplified an affine_inverse call ControlEditorToolbar: - private function ControlEditorToolbar::_anchor_to_position is used nowhere. Looks like copy and paste from CanvasItemEditor::_anchor_to_position ScrollContainer: - screen_is_touchscreen is always true, because otherwise the function already returned TextLine: - both parts of the if-else-clause do the same thing and simplified return statement
* Use more reasonable scrollable conditions in `ScrollContainer`Rindbee2022-10-181-40/+67
| | | | | | | | | | The visibility of the `ScrollBar` was used as a condition for judging whether it should scroll. **Visible** and **scrollable** are currently not the same in some cases (`SCROLL_MODE_SHOW_NEVER`). This makes `SCROLL_MODE_SHOW_NEVER` not working properly. This patch will make `SCROLL_MODE_SHOW_NEVER` available, so that the external `SrollBar` can share the internal `ScrollBar`'s data, we can achieve the purpose of replacing the internal `ScrollBar` with a custom external one.
* Fix ScrollContainer touch-scrolling not working.Zae2022-09-291-1/+1
|
* Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron2022-09-191-2/+2
|
* Improve naming of theme properties throughout GUI codeYuri Sizov2022-09-061-6/+6
| | | | | | | | | | | | | | Rename ItemList's bg -> panel Rename ItemList's bg_focus -> focus Rename ProgressBar's bg -> background Rename ProgressBar's fg -> fill Rename Tree's bg -> panel Rename Tree's bg_focus -> focus Rename ScrollContainer's bg -> panel Rename FileDialog's *_icon_modulate -> *_icon_color Rename FileDialog's files_disabled -> file_disabled_color Rename CheckButton's on/off -> checked/unchecked Rename check_v_adjust -> check_v_offset
* Add a lifecycle method for manual theme item caching to ControlYuri Sizov2022-09-011-9/+11
|
* Rename `CanvasItem.update()` to `queue_redraw()`Micky2022-08-291-1/+1
| | | | | | | | | | 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`.
* Revert "Remove NOTIFICATION_ENTER_TREE when paired with ↵Rémi Verschelde2022-08-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTIFICATION_THEME_CHANGED" This reverts commit 4b817a565cab8af648c88cfc7ab6481e86ee3625. Fixes #64988. Fixes #64997. This caused several regressions (#64988, #64997, https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605) which point at a flaw in the current logic: - `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with `NOTIFCATION_THEME_CHANGED` as introduced in #62845. - Some classes use their `THEME_CHANGED` to cache theme items in member variables (e.g. `style_normal`, etc.), and use those member variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE` notification is now deferred, they end up accessing invalid state and this can lead to not applying theme properly (e.g. for EditorHelp) or crashing (e.g. for EditorLog or CodeEdit). So we need to go back to the drawing board and see if `THEME_CHANGED` can be called earlier so that the previous logic still works? Or can we refactor all engine code to make sure that: - `ENTER_TREE` and similar do not depend on theme properties cached in member variables. - Or `THEME_CHANGE` does trigger a general UI update to make sure that any bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE` does arrive for the first time. But that means having a temporary invalid (and possibly still crashing) state, and doing some computations twice which might be heavy (e.g. `EditorHelp::_update_doc()`).
* Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGEDAaron Record2022-08-271-3/+2
|
* Fix toggling after scrolling resulted in blank spaceRindbee2022-07-311-54/+33
| | | | | | | | | | Previously, the data used by `update_scrollbars()` and `_update_dimensions()` in their calculations depended on each other, which caused some problems. Now, the calculation of `child_max_size` is put into `get_minimum_size()`, as the containers call `update_minimum_size()` before calling `queue_sort()`. Make the semantics of variable/function names more clear. Co-authored-by: Aaron Record <aaronjrecord@gmail.com>
* Merge pull request #62093 from Rindbee/fix-undecided-min_size-in-ScrollContainerRémi Verschelde2022-07-221-10/+17
|\
| * Fix indeterminate minimum size in ScrollContainerRindbee2022-07-211-10/+17
| |
* | Merge pull request #63295 from ↵Rémi Verschelde2022-07-221-0/+1
|\ \ | |/ |/| | | winterpixelgames/master-allow-scroll-container-scroll-to-be-set-instantly
| * Call update_scrollbars() in sort_children() so the max is set properly so ↵Jason Knight2022-07-211-0/+1
| | | | | | | | you can set scroll_container.scroll_vertical instantly after adding children to a scroll container.
* | Add suffixes to all nodes and resourcesFireForge2022-06-111-2/+2
|/
* String: Remove TTR and DTR defines in non-tools buildRémi Verschelde2022-03-281-1/+1
| | | | | This ensures we don't use TTR in runtime code, as it's specifically meant to source translations for the editor.
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-86/+91
|
* Improve compilation speed (forward declarations/includes cleanup)Hendrik Brucker2022-02-121-0/+2
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #55487 from YeldhamDev/scroll_bikesheddingRémi Verschelde2022-01-031-4/+4
|\
| * Rename all methods that return `ScrollBar` nodes to `get_*_scroll_bar()`Michael Alexsander2021-11-301-4/+4
| |
* | ScrollContainer's scrollbar visibility is now enumkobewi2021-12-071-63/+34
| |
* | Rename minimum_size_changed() methodkobewi2021-12-061-2/+2
|/
* Fix style issue after #54148Rémi Verschelde2021-11-161-1/+1
|
* Merge pull request #54148 from miraz12/fix-scrollContrainer-notification-crashRémi Verschelde2021-11-161-1/+3
|\
| * Fixed crash in `ScrollContainer` _notificationAnton Christoffersson2021-10-231-1/+3
| |
* | Use "enum class" for input enumsAaron Franke2021-11-121-5/+5
|/