Commit graph

244 commits

Author SHA1 Message Date
havi05
e43756c559 Itemlist - fix text_overrun when using fixed_icon_size 2025-02-10 11:34:45 +01:00
havi05
2c35077148 Itemlist - fix text_overrun_behavior 2025-01-24 23:48:38 +01:00
Rémi Verschelde
4dbcced69a Merge pull request #100714 from hpvb/fix-100663
Handle changing ItemLists from signals
2025-01-10 23:05:51 +01:00
havi05
a9af65d368 Add HScrollbar to ItemList 2025-01-10 14:59:12 +01:00
HP van Braam
32ef7306f4 Handle changing ItemLists from signals
We make sure we don't touch the ItemList's items array after signals are
emitted as a signal handler might change the item list, causing the
index we had to be invalid.

This fixes #100663
2025-01-05 02:10:28 +01:00
havi05
0ee78a79cf Itemlist - draw focus stylebox after items 2024-12-16 19:49:14 +01:00
havi05
b05111799b ItemList - highlight selected items && draw cursor last 2024-12-14 19:03:43 +01:00
havi05
b29e93bb51 ItemList - Add Toggle mode 2024-12-12 17:33:04 +01:00
Gamemap
84b15a2ea4 ItemList - Fix right padding missing 2024-10-06 17:34:33 +02:00
Gamemap
1e1dbd8e3a Add Auto width behavior to ItemList
Co-authored-by: Craig Hupin <althar93@hotmail.com>
2024-10-04 08:43:13 +02:00
Rémi Verschelde
5314793ac7
Merge pull request #97519 from timothyqiu/itemlist-at
Add auto translate mode for items in `ItemList`
2024-10-03 15:39:23 +02:00
Gamemap
6a9e50b941 Fix ItemList text trimming and autowrap margin 2024-10-01 17:48:41 +02:00
Haoyu Qiu
0101317d46 Add auto translate mode for items in ItemList 2024-09-27 10:52:04 +08:00
Yuri Rubinsky
af5fc8354b Fix a bunch of orphan StringName errors at ProjectSettings/Editor exit 2024-07-09 19:38:52 +03:00
A Thousand Ships
fbb879debd
[Scene] Add SceneStringNames::text/value_changed 2024-06-19 09:44:38 +02:00
A Thousand Ships
d9e2fc74c7
[Scene] Add SceneStringNames::item_selected 2024-06-19 09:39:05 +02:00
Hilderin
81395cf9bd Fix Huge .tscn Icon and icon in background of File System panel 2024-06-02 09:11:56 -04:00
kobewi
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Gilles Roudière
7705265477 Fix PropertyListHelper::_get_property returning a valid value even if an index is outside the array valid indices
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2024-05-10 10:46:04 +02:00
David Giardi
f63728cb9f Fix item positioning & pointer detection areas of ItemList 2024-02-27 20:03:10 +01:00
David Giardi
c892fd8691 Fix ItemList click detection gaps 2024-02-15 12:16:31 +01:00
kobewi
4f29ef82db Add PropertyListHelper to PopupMenu 2024-02-11 12:09:55 +01:00
Rémi Verschelde
0bda868f40
Merge pull request #84635 from KoBeWi/all_hail_PropertyListHelper
Add PropertyListHelper
2024-02-09 12:14:01 +01:00
A Thousand Ships
15369fdb1d
Remove unnecessary this-> expressions 2024-01-29 09:59:18 +01:00
kobewi
2c14c0885f Add PropertyListHelper 2024-01-19 20:32:04 +01:00
Rémi Verschelde
5eb22a317d
Merge pull request #83577 from DennisManaa/fix-translation-for-item-list
Add automatic translation of items to ItemList
2024-01-04 16:39:36 +01:00
coumcashier
1533292f09 Fix storing invalid item height values in ItemList
The height of the last N items is incorrectly overwritten with
the max height of first row (N = number of columns). This happen
in the first iteration of the while loop. Moving this code inside
if (all_fit) makes sure the last rows height is only updated at
the end when max height (max_h) is calculated for the last row.
2023-11-10 19:54:31 +01:00
DennisManaa
1a1c542836 Implement automatic translation for ItemList 2023-10-23 10:14:08 +02:00
Jakub Marcowski
2e28fb7cdd Remove the separator from ItemList's thumbnail mode 2023-09-24 13:06:11 +02:00
George L. Albany
421e8c5455
Expose force_update_list_size
Rename ItemList::_check_shape_changed to force_update_list_size

`force_update_list_size` is especially useful for updating the auto_height_value early
2023-09-15 13:18:02 -04:00
Yuri Sizov
2924bfd4d3 Register theme properties with ThemeDB 2023-09-11 13:45:23 +02:00
Haoyu Qiu
1bf4c12c0a Fix ItemList not update when icon scale changes 2023-09-03 19:10:24 +08:00
Chia-Hsiang Cheng
749db00227 Draw separators before selected style boxes 2023-08-30 16:32:58 +08:00
Niels Drost
fa63107bd1
ItemList: Clarify distinction between disabled and selected in sending signals
disabled -> not sending any signal at all (activated, selected, deselected, ...)
selected -> only possible when not disabled, and when selectable

Fixes #74086.
2023-08-17 10:34:18 +02:00
Markus Sauermann
890fdd56df Code simplifications
CPPcheck found most of them.

no need to assign the variable twice:
- AnimationTrackEditTypeAudio
- SSEffects

variable is assigned in all if-else clauses:
- EditorHelp
- AndroidInputHandler
- MenuBar
- ShaderCompiler

same if clause:
- ItemList

clearing an empty bitfield has no effect:
- Viewport
2023-06-21 22:37:26 +02:00
bruvzg
343c35e7b0
[ItemList] Fix item text positions in RTL mode. 2023-05-20 22:58:02 +03:00
Ninni Pipping
e5fdce7ca3 Add get_item_rect function to ItemList 2023-05-11 19:01:54 +02:00
Ninni Pipping
fffa577b3b Minor bugfixes to ItemList
* Removed unused position code in `gui_input`
* Ensured `set_fixed_icon_size` updates cached size
2023-05-08 10:25:08 +02:00
Rémi Verschelde
ae7872fd02
Merge pull request #76199 from needleful/incremental_search_property
Add allow_search property to ItemList and Tree to control incremental search
2023-04-25 14:44:06 +02:00
David Giardi
142990d60a Add hovered item style to ItemList 2023-04-18 22:52:39 +02:00
needleful
9a968088db Add allow_search property to ItemList and Tree 2023-04-18 09:21:18 -07:00
Yuri Sizov
a2a524df71 Prevent crash in ItemList when checking for visible items
Also some light code refactoring to make the drawing logic more manageable.
We also store each item's column for more reliable checks.
2023-03-16 12:25:11 +01:00
Marius Hanl
bcf3c81726 ItemList: Check if the index is out bounds before accessing the internal items
The following keys may lead to the exception described above under certain conditions:
- ui_page_up
- ui_page_down
- ui_left
- ui_right
2023-01-27 18:34:18 +01:00
kobewi
c0083e431b Cleanup unused engine code v2 2023-01-19 13:02:18 +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
Haoyu Qiu
8d0fa193c3 Fix crash after executing ItemList.set_icon_scale 2022-12-13 15:53:50 +08:00
kobewi
d9f066d5fa Remove duplicate project settings definitions 2022-11-08 01:29:39 +01:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
Rémi Verschelde
2ffb609658 Merge pull request #66337 from EricEzaM/sprite-frames
Ensure control built-in shortcuts are matched exactly & add shortcuts for SpriteFrames editor
2022-10-13 15:24:39 +02:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00