Commit Graph

281 Commits

Author SHA1 Message Date
Yuri Sizov 0eb3b49c39 Make EditorHelp respect font size settings 2023-02-11 20:09:57 +01:00
Yuri Sizov bbbcd77217 Make use of a theme cache in EditorHelp and ensure it's updated
- Migrates the existing cache to the standard theme cache struct
- Moves some parts of the codebase to use cache instead of ad-hoc fetching
- Adds hooks to editor settings previously missing from theme regeneration
2023-02-11 20:09:35 +01:00
Rémi Verschelde b342dcdf04
Remove some unused signals
Part of #37604.
2023-01-31 18:54:04 +01:00
Rémi Verschelde fd66a86d72
Merge pull request #71330 from Geometror/richtextlabel-fit-content
[RichTextLabel] Match minimum size calculation of Label (proper content fitting)
2023-01-25 09:16:38 +01:00
Yuri Sizov 752402cf35 Clean-up, harmonize, and improve StyleBox API
- Make all margin properties follow the same naming convention (their getter and setter too).
- Remove a virtual counterpart of `get_style_margin` from API.
- Allow to override `get_minimum_size` from scripting and remove `get_center_size`.
2023-01-19 20:02:21 +03:00
Yuri Sizov 4c1f11944e Update all outdated online documentation links 2023-01-14 19:38:00 +03:00
Hendrik Brucker e59d6b1b8c [RichTextLabel] Match minimum size calculation of Label
(optional via fit_content property)
2023-01-13 15:17:26 +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
Micky 5760bfc712 Fix left-aligned EditorHelp when first opened 2022-12-09 18:54:52 +01:00
trollodel c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
Rémi Verschelde 855402dfee
Merge pull request #68904 from aaronfranke/texture-methods
Rename TextureButton set_*_texture methods to set_texture_*
2022-11-20 15:37:37 +01:00
Micky e791f4fce2 Double precision of `String.split_floats` 2022-11-20 12:29:50 +01:00
Aaron Franke f6714858bf
Rename TextureButton set_*_texture methods to set_texture_* 2022-11-19 17:33:40 -06:00
Yuri Sizov 270c810343 Add more call-to-action notes when documentation is missing 2022-11-17 22:33:55 +03:00
Rémi Verschelde e1ddd74b23
Merge pull request #68159 from Mickeon/doc-help-return-array
Change docs' Typed Array & void representation
2022-11-15 16:24:43 +01:00
Micky 0f82aaea73 Change docs' Typed Array & void representation
Typed Arrays now look the same as to how they're defined in GDScript.
Also modifies "void" to be darkened and show a tooltip.
2022-11-15 14:19:07 +01:00
Rémi Verschelde a90d435e9b
Merge pull request #68132 from Mickeon/doc-help-colourful
Improve Editor Documentation colors
2022-11-14 11:10:19 +01:00
Rémi Verschelde f7c611ab71
Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Micky 8feb1da1f8 Improve Editor Documentation colors 2022-11-01 19:16:13 +01:00
Rémi Verschelde 5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde 9cfcc9131f
Merge pull request #68079 from Mickeon/doc-help-hint
Add tooltip to method qualifiers in Documentation Help
2022-10-31 13:14:28 +01:00
Micky 610864d1db Add tooltip to method qualifiers in Documentation Help 2022-10-31 12:17:33 +01:00
kobewi c7eb814ede Remove override_selected_font_color property 2022-10-26 12:59:18 +02:00
kobewi e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +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
SaracenOne cc4bda8500 Add ability to flag classes as experimental or deprecated. 2022-09-11 00:11:33 +01:00
Yuri Sizov 8442d77614 Fix theming error in EditorHelp due to order of operations issue 2022-09-06 16:08:40 +03:00
Micky 126216eda0 Improve Docs' inheritance tree icons on newline
Uses a Non-Breaking Space to prevent the icon from detaching from the name on newline, improving the look considerably.
2022-09-02 15:56:28 +02:00
Aaron Franke 10a56981dc
Rename String `plus_file` to `path_join` 2022-08-29 19:38:13 -05:00
Rémi Verschelde fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

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()`).
2022-08-29 11:11:29 +02:00
Rémi Verschelde f7f8af232c
Merge pull request #64885 from Mickeon/rename-tooltip-hint
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-28 17:43:01 +02:00
Rémi Verschelde dd9602e74c
Merge pull request #64847 from Mickeon/editor-docs-hierarchy-icons
Add type icons to editor docs' hierarchy
2022-08-28 17:09:34 +02:00
Aaron Record 4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
Micky ef5b9a06a9 Rename `hint_tooltip` to `tooltip_text` & setget
`hint_tooltip` -> `tooltip_text`
`set_tooltip` -> `set_tooltip_text`
`_get_tooltip` -> `get_tooltip_text`

Updates documentation, too.
2022-08-27 01:35:01 +02:00
Micky 2b063eebee Add type icons to editor docs' hierarchy
The "Inherits" and "Inherited by" section of the docs now display the icon of each Object on the side.

Also scales the main class' icon to match title font
2022-08-25 11:45:05 +02:00
Yuri Sizov a0995182fe Add documentation for all annotations 2022-08-19 15:06:39 +03:00
Yuri Sizov 35c1eae8d7 Add support for [param foo] syntax in valid documentation contexts 2022-08-08 22:18:38 +03:00
Juan Linietsky d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Hugo Locurcio 976d12c3c1
Add padding for code blocks in the editor help
This improves their appearance, making them look closer to code blocks
in the online manual.
2022-07-17 22:55:20 +02:00
Rémi Verschelde a0f0eb5e03
Merge pull request #62710 from Calinou/editor-help-improve-code-kbd-ref-highlight 2022-07-13 23:55:59 +02:00
Rémi Verschelde 1e553e34fb
Merge pull request #62108 from bruvzg/font_config_v3 2022-07-07 12:22:49 +02:00
Rémi Verschelde 635d447a69
Merge pull request #62713 from YuriSizov/docs-scripting-annotations 2022-07-06 15:31:19 +02:00
bruvzg 344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
reduz 5ac42cf576 Implement a BitField hint
Allows to specify the binder that an enum must be treated as a bitfield.
2022-07-05 22:13:37 +02:00
Hugo Locurcio a347650fd6
Improve visibility of code, kbd and clickable references in editor help
This adds a background color for inline code, code blocks, keyboard
shortcuts and clickable references (such as `[member something]`).
2022-07-05 19:35:51 +02:00
Yuri Sizov a9098e6147 Add support for documenting built-in annotations 2022-07-04 20:21:39 +03:00
Yuri Rubinsky c6f57c30c3 Fix `help_title_font_size` editor property to correctly apply to docs 2022-06-29 15:08:54 +03:00
Rémi Verschelde c762ec1343
Merge pull request #60984 from fire-forge/doc-icon
Show class icon in the documentation page header
2022-06-01 18:34:39 +02:00
bruvzg 96cc3c74da
Fix help links with threaded RTL. 2022-05-30 10:05:14 +03:00
FireForge a65404e6ac Add type icon to documentation page header 2022-05-25 19:18:23 -05:00