Commit graph

3189 commits

Author SHA1 Message Date
bruvzg
7c3c5603d0 [Text Server] Improve object (image/table) inline alignment. 2021-08-08 22:35:47 +03:00
Paulb23
738b0fdae5 Redraw on item list custom bg/fg colour change 2021-08-07 12:08:46 +01:00
Rémi Verschelde
de2c2be19b
Shortcut: Rename shortcut property to event
Having a property which has the same name as its class leads to confusing
situations (e.g. `BaseButton` has a `shortcut` property of type `Shortcut`
which has a `shortcut` property of type `InputEvent`).

Also renames `is_event` to `matches_event`, and `is_valid` to `has_valid_event`
to better reflect what the methods check.
2021-08-05 13:48:43 +02:00
Rémi Verschelde
e0b560fb6f
Merge pull request #51177 from kleonc/tab_container-drop-tab-index-fix
TabContainer Fix moving dropped tab to incorrect child index
2021-08-03 09:34:51 +02:00
Hugo Locurcio
3ea3addc79
Improve CodeEdit's callhint highlight visibility
This makes the currently edited parameter more visible in the
script editor's code completion hint.
2021-08-02 23:16:16 +02:00
Rémi Verschelde
c620ede327
Merge pull request #50122 from Paulb23/code_edit_auto_brace_completion 2021-08-02 20:44:39 +02:00
kleonc
a5a4532378 TabContainer Fix moving dropped tab at incorrect child index 2021-08-02 14:15:51 +02:00
Gilles Roudière
ad8b5cd5a4 Implements TileMap layers and move TileSetPlugins's functions to the TileMap node instead 2021-08-02 13:54:39 +02:00
Paulb23
809a32c045 Clean up and complete CodeEdit inspector and docs 2021-08-01 12:24:19 +01:00
Paulb23
dd5a37f556 Move symbol lookup into CodeEdit 2021-08-01 12:06:33 +01:00
Paulb23
8f900ac178 Move line length guidelines into CodeEdit 2021-08-01 12:06:33 +01:00
Paulb23
d1a1ad127e Move brace matching into CodeEdit 2021-08-01 12:06:33 +01:00
Paulb23
12f0053555 Move auto brace completion to CodeEdit 2021-08-01 12:06:33 +01:00
Yuri Sizov
7137ebdaf6 Make theme item overrides more obvious in the Inspector 2021-07-31 23:46:24 +03:00
Michael Alexsander
b70b9c4ede Fix "Custom *" theme sections being inside "Auto Translate" 2021-07-30 13:55:07 -03:00
Michael Alexsander
94a64d557e Add auto_translate toggle for automatic translation 2021-07-29 18:30:34 -03:00
Michael Alexsander
79fc188fc4 Multiple cosmetic fixes for embedded windows 2021-07-27 23:55:06 -03:00
Michael Alexsander
478b6d6a13 Make switch_on_hover work on embedded windows 2021-07-26 14:45:26 -03:00
Rémi Verschelde
738205d923
Merge pull request #50835 from bruvzg/optimize_is_rtl
Optimise `is_layout_rtl`.
2021-07-25 12:55:46 +02:00
Rémi Verschelde
ff0b5f8fa1
Merge pull request #50809 from akien-mga/iterators-const-references 2021-07-25 12:52:58 +02:00
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
luz paz
3564c16cb8
Fix various typos with codespell
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
2021-07-25 11:21:51 +02:00
bruvzg
9bb03e60d9 Optimise is_layout_rtl by caching its return value. 2021-07-25 10:33:00 +03:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
jfons
944b5ee639 Fix popup submenu in single-window mode
The internal processing code only works for OS windows, since it takes
the mouse position relative to the window and not the viewport. Now we
make sure it's not called in single-window mode.
2021-07-23 19:45:30 +02:00
Michael Alexsander
a690cd9251 Make MenuButton's switch_on_hover work again 2021-07-22 14:27:30 -03:00
PouleyKetchoupp
0b4037fe64 Fix logic for Popup closing when parent is focused
The member popped_up is used to avoid closing a Popup before it had a
chance to be focused. It wasn't reset properly when the popup is hidden,
causing the Popup to close right after showing in some random cases
(spotted on X11, might not happen on Windows).
2021-07-21 12:03:03 -07:00
Rémi Verschelde
693f9b4e20
Merge pull request #50655 from JFonS/sname_opt
Editor StringName and Viewport optimizations
2021-07-20 21:49:32 +02:00
Joan Fons
a6adb58493 Editor StringName and Viewport optimizations
* Added explicit return type to the SNAME macro.
* Add some extra SNAME usages.
* Change some ClassDB methods to use const StringName & arguments.
* Cache the Window parent in Control because it's used in
  is_layout_rtl(), which is called often.
* Only enable internal processing for viewports that need it.
* Change CanvasItem::group to be a StringName because it's only used as
  that.
2021-07-20 20:35:41 +02:00
Rémi Verschelde
394191c02f
Merge pull request #50605 from Calinou/tweak-shader-code-style
Use C++11 raw literals for shader code to improve readability
2021-07-20 10:05:13 +02:00
Rémi Verschelde
a0bc2f359d
Merge pull request #50588 from bruvzg/menu_gen
Optimize LineEdit and TextEdit menu item generation.
2021-07-19 22:56:53 +02:00
Rémi Verschelde
dfc1ec7fb9
Merge pull request #50606 from Chaosus/textedit_fix_guttertype
Fixed typos in `TextEdit::GutterType` enum
2021-07-19 16:40:42 +02:00
Yuri Roubinsky
1597045b09 Fixed typos in TextEdit::GutterType enum 2021-07-19 11:18:54 +03:00
Hugo Locurcio
abc38b8d66
Use C++11 raw literals for shader code to improve readability
In files that have lots of branching, `\t` was replaced with a
tab character instead.
2021-07-19 08:19:50 +02:00
bruvzg
1ac7a126f1 Optimize LineEdit and TextEdit menu item generation. 2021-07-19 08:19:09 +03:00
reduz
6631f66c2a Optimize StringName usage
* 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.
2021-07-18 21:20:02 -03:00
reduz
a3fb76cd45 Create many types of popups on demand
* LineEdit popups created on demand.
* TextEdit popups created on demand.
* SpinSlider popups created on demand.
* ResourcePicker popups created on demand.

Improves editor responsiveness.
2021-07-17 10:57:14 -03:00
Rémi Verschelde
29c56f33a4
Merge pull request #48502 from KoBeWi/visual_button
Add set_pressed_no_signal method to BaseButton
2021-07-14 15:05:50 +02:00
kobewi
f4b361dd15 Add header theme type variations to labels 2021-07-13 15:42:09 +02:00
Rémi Verschelde
b44b277f6f
Merge pull request #50169 from pycbouh/theme-type-variations 2021-07-13 15:13:00 +02:00
kobewi
50c63bdc4c Add set_pressed_no_signal method to BaseButton 2021-07-13 13:57:26 +02:00
Rémi Verschelde
aab6dc301c
Merge pull request #50086 from Geometror/label-improve-layout-options
Improvements to Label's layout options
2021-07-13 13:10:42 +02:00
Rémi Verschelde
3adb129a54
Merge pull request #50135 from KoBeWi/🌲.update()
Update Tree when modified
2021-07-13 09:03:40 +02:00
Yuri Sizov
4ee0e6ddf5 Add type variations to Theme 2021-07-13 02:26:28 +03:00
Francois Belair
94a464f555 Add cache to color picker for presets
This prevents loading from the project metadata more than once,
significantly saving performance with nodes that have color pickers.
2021-07-07 14:17:44 -04:00
Rémi Verschelde
e4c940ee6a
Merge pull request #50208 from kleonc/accept_dialog-remove_button
Add AcceptDialog::remove_button method
2021-07-07 09:12:03 +02:00
Hugo Locurcio
ce941397e5
Merge pull request #49890 from voxelv/fix_tree_range_click_timeout_crash_46648
Avoid using a nullptr root in Tree._range_click_timeout().
2021-07-07 01:21:32 +02:00
kleonc
714e6a595d Add AcceptDialog::remove_button method 2021-07-06 18:14:20 +02:00
Rémi Verschelde
9a1ce8e6c3
LineEdit: Respect max_length by truncating text to append
When appending text (either via `set_text()` or by pasting from clipboard),
if the input would make the `LineEdit` exceed its configured `max_length`,
the input text is truncated to fit. The discard part is passed as a parameter
in the `text_change_rejected` signal.

Fixes #33321.
Fixes #41278.

Also cleaned up unimplemented `max_chars` property in `TextEdit`.

Co-authored-by: Tony-Goat <70238376+Tony-Goat@users.noreply.github.com>
2021-07-06 18:03:03 +02:00
reduz
f4379cbc82 Clean up Tree
Fixes some problems introduced by #49917

* Tree used minimum size as a stretch ratio, so it forced a minimum size of 1.
* Minimum size redone, stretch ratio moved to a separate setting
* Fitting to contents was enforced, this is more intuitive, but in many situations this is undesired.
* Added a clip content option for situations where fit to contents does not apply.
* Icon would scroll with the item, making it invislbe if the item is too long.
* Made icon always appear to the right (or left if RTL is enabled) of the visible item space.
2021-07-04 13:13:53 -03:00