Commit graph

226 commits

Author SHA1 Message Date
Rémi Verschelde 7bf9787921 SCons: Format buildsystem files with psf/black
Configured for a max line length of 120 characters.

psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:

- Manually wrapped strings will be reflowed, so by using a line length
  of 120 for the sake of preserving readability for our long command
  calls, it also means that some manually wrapped strings are back on
  the same line and should be manually merged again.

- Code generators using string concatenation extensively look awful,
  since black puts each operand on a single line. We need to refactor
  these generators to use more pythonic string formatting, for which
  many options are available (`%`, `format` or f-strings).

- CI checks and a pre-commit hook will be added to ensure that future
  buildsystem changes are well-formatted.

(cherry picked from commit cd4e46ee65)
2020-06-10 15:30:52 +02:00
Michael Alexsander 2652a2d184 Add generic file icon and its modulation to the 'FileDialog'
(cherry picked from commit 637927f803)
2020-06-10 15:30:52 +02:00
PouleyKetchoupp 18c5ef5473 Add style for highlighted Slider grab area
(cherry picked from commit 4c8173af0f)
2020-04-16 12:47:17 +02:00
Haoyu Qiu 7cfcf1824b Completes doc for ItemList and Tree
(cherry picked from commit 7a41c44be2)
2020-02-12 15:05:02 +01:00
Michael Alexsander 8b5992f665 Make possible to edit the GraphEdit's selection rect colors 2020-01-07 23:20:48 -03:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
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.
2020-01-01 11:16:22 +01:00
Michael Alexsander fd2c181a35 Revert "Merge pull request #34315 from YeldhamDev/editor_theme_optionbutton_arrow"
This reverts commit 0da0eec6cc, reversing
changes made to ec97535ea3.
2019-12-28 14:16:51 -03:00
Michael Alexsander af67e97445 Remove unused theme elements in H/VSlider 2019-12-13 21:17:51 -03:00
Michael Alexsander d92123ed97 Add "panel" style to PopupDialog 2019-10-27 19:45:03 -03:00
Hugo Locurcio c5279432fd
Fix the default TextEdit background color
This closes #32724.
2019-10-25 14:51:59 +02:00
Hugo Locurcio c8a8be6dd1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2019-10-12 23:23:33 +02:00
Hugo Locurcio 70c4e96623
Draw an indicator to denote overbright colors in ColorPicker
This makes it faster to distinguish overbright colors from
"standard" colors.
2019-09-27 15:28:42 +02:00
Hugo Locurcio 40a5de97e6
Remove an unused icon and constant in Tree 2019-09-20 17:50:13 +02:00
Chaosus89 8fd8589547 Fix resizer icon visiblity on light theme in GraphNode 2019-09-01 09:12:26 +03:00
Rémi Verschelde 791d7f78b5
Merge pull request #31593 from SaracenOne/project_theme_shutdown_fix
Fixes issue with project_default_theme not being cleaned up
2019-08-23 11:26:33 +02:00
Saracen 08ceef2e39 Fixes issue with project_default_theme not being dereferenced on cleanup. 2019-08-23 09:18:42 +01:00
Hugo Locurcio e1b9004b0f
Rename FileDialog's folder icon custom color to folder_icon_modulate
The custom color introduced in be8d569744
had the same name as the "folder" icon, which could cause conflicts
in the generated documentation.

The new name is also more self-explanatory.
2019-08-21 18:43:01 +02:00
Hugo Locurcio be8d569744
Use a different color for folder icons in file dialogs
This makes them easier to distinguish from files for quick
visual grepping.

This can also be used in projects by setting the FileDialog "folder"
color. The default value (`Color(1, 1, 1)`) has no visual impact,
for compatibility with existing projects.
2019-08-20 00:10:27 +02:00
IAmActuallyCthulhu 82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
merumelu 908f0eadba Default theme: make toggle_off_disabled.png the same dimension as other CheckButton images 2019-08-06 22:12:58 +02:00
Hugo Locurcio 31eb116d49
Make make_header.py functional when run from any location
This removes the need to `cd` to `scene/resources/default_theme/`
to get the expected result.
2019-07-22 14:02:33 +02:00
Hugo Locurcio 28d3a6051c
Use base Color() constructors instead of Color::html()
This results in slightly smaller binaries (-17 KB for an editor binary)
as no strings need to be allocated.
2019-07-08 21:17:10 +02:00
Hugo Locurcio 1327e04fd3
Remove unused icons in the default theme 2019-07-03 22:45:28 +02:00
Gwyneth Lowe 45f78d786a Give TextEdit a custom color for font when read only is set
Previously there was some transparency hard coded into TextEdit when in read only mode.
This change adds a custom color for adjusting the font in read only mode.
It also applies when syntax highlighting is on.
2019-06-24 20:00:05 -05:00
Gwyneth Lowe f07e5ac153 Give LineEdit a custom font color when un-editable
By default the LineEdit's text when editable is unchecked had some transparency hardcoded.
This change adds a custom color to LineEdit for adjusting the font when editable is off.
Addresses issue 29814
2019-06-24 20:00:05 -05:00
Rémi Verschelde 24ee8c3566 Add script to fix style issues and copyright headers
This is only meant to check the validity of the whole codebase every
now and then, or to apply clang-format config changes when relevant.
2019-06-17 13:35:47 +02:00
Michael Alexsander Silva Dias be6d48fcad Add toggle for hidden file visibility in FileDialog 2019-06-10 00:20:24 -03:00
Bojidar Marinov 8a1a067b91
Fix GraphNode not adding seperation after the first node
Fixes #29446
2019-06-04 16:05:23 +03:00
Rémi Verschelde 63e7d2db08
Merge pull request #28218 from KoBeWi/b00km4rk5
Add bookmarks for easier code navigation
2019-05-20 22:39:19 +02:00
Max Hilbrunner ee5ba3e097
Merge pull request #28366 from iwek7/feature/issue28355/showSpacesInEditor
Add feature to show spaces in code editor
2019-05-17 20:38:40 +02:00
Tomasz Chabora 0bfcf8bc2f Add bookmarks for easier code navigation 2019-05-05 18:57:53 +02:00
Rémi Verschelde 7b64a24eb3
Merge pull request #28548 from YeldhamDev/check_button_disabled_icon
Add "disabled" icon for 'CheckButton'
2019-05-03 14:55:32 +02:00
Bojidar Marinov 3d47dad2b1
Remove unused panelf and panelnc styles
Fixes godotengine/godot-docs#2426
2019-05-03 09:44:46 +03:00
Michael Alexsander Silva Dias acadfe0a49 Add "disabled" icon for 'CheckButton' 2019-05-02 13:39:56 -03:00
miwanczuk c86b03abd8 Expose TextEdit's drawSpaces feature to GDScript 2019-05-01 11:32:54 +02:00
Rémi Verschelde 23147ae2c3
Merge pull request #28101 from MunWolf/debugger_cursor
Added a marker in text_edit that tells which row is executing.
2019-04-29 18:38:38 +02:00
Michael Alexsander Silva Dias 350bcce041 Expose 'TextEdit's tab drawing and folding to GDScript 2019-04-24 12:42:12 -03:00
Rikhardur Bjarni Einarsson 9bfa63496a Added a marker in text_edit that tells which row is executing. 2019-04-23 21:51:01 +01:00
Hugo Locurcio fa586289c6
Brighten the RichTextLabel color in the default theme
This makes its default color match Label's color, which leads to
a more consistent appearance.

This partially addresses #24570.
2019-04-10 20:00:29 +02:00
Hendrikto 49a81308c0 Remove unused imports 2019-04-06 18:05:05 +02:00
Michael Alexsander Silva Dias e322fd140e Add disabled tab style 2019-02-10 18:12:17 -02:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Michael Alexsander Silva Dias b86b497cec General fixes for the AnimationTree editor 2018-12-17 21:03:58 -02:00
Michael Alexsander Silva Dias bfab0fe3db Remove "panel" theme property from ButtonGroup 2018-12-10 17:28:56 -02:00
Juan Linietsky 0f7a86ca52 If using relationship lines (now default) hide guides. 2018-11-18 22:00:31 -03:00
Juan Linietsky 397b12727c No one seems to like the error icon, so I made it invisible. Fixes #16344 2018-11-14 21:34:39 -03:00
Rémi Verschelde 62ecb44035 Fix warning about functions defined but not used [-Wunused-function]
Fixes the following GCC 5 warnings:
```
core/io/zip_io.h:128:26: warning: 'zlib_filefunc_def zipio_create_io_from_file(FileAccess**)' defined but not used [-Wunused-function]
core/script_debugger_remote.cpp:110:17: warning: 'ObjectID safe_get_instance_id(const Variant&)' defined but not used [-Wunused-function]
drivers/unix/socket_helpers.h:103:12: warning: 'int _socket_create(IP::Type&, int, int)' defined but not used [-Wunused-function]
drivers/unix/socket_helpers.h:45:15: warning: 'size_t _set_sockaddr(sockaddr_storage*, const IP_Address&, int, IP::Type)' defined but not used [-Wunused-function]
drivers/unix/socket_helpers.h:76:15: warning: 'size_t _set_listen_sockaddr(sockaddr_storage*, int, IP::Type, IP_Address)' defined but not used [-Wunused-function]
editor/editor_fonts.cpp:40:24: warning: 'Ref<BitmapFont> make_font(int, int, int, int, const int*, const Ref<Texture>&)' defined but not used [-Wunused-function]
editor/editor_themes.cpp:85:26: warning: 'Ref<StyleBoxFlat> change_border_color(Ref<StyleBoxFlat>, Color)' defined but not used [-Wunused-function]
editor/import/editor_import_collada.cpp:493:13: warning: 'void _generate_normals(const PoolVector<int>&, const PoolVector<Vector3>&, PoolVector<Vector3>&)' defined but not used [-Wunused-function]
editor/import/editor_import_collada.cpp:524:13: warning: 'void _generate_tangents_and_binormals(const PoolVector<int>&, const PoolVector<Vector3>&, const PoolVector<Vector3>&, const PoolVector<Vector3>&, PoolVector<float>&)' defined but not used [-Wunused-function]
editor/pvrtc_compress.cpp:118:13: warning: 'void _compress_etc(Image*)' defined but not used [-Wunused-function]
modules/etc/image_etc.cpp:89:13: warning: 'void _decompress_etc1(Image*)' defined but not used [-Wunused-function]
modules/etc/image_etc.cpp:93:13: warning: 'void _decompress_etc2(Image*)' defined but not used [-Wunused-function]
modules/gdscript/editor/gdscript_highlighter.cpp:46:13: warning: 'bool _is_whitespace(CharType)' defined but not used [-Wunused-function]
scene/2d/cpu_particles_2d.cpp:510:14: warning: 'float rand_from_seed_m1_p1(uint32_t&)' defined but not used [-Wunused-function]
scene/3d/cpu_particles.cpp:474:14: warning: 'float rand_from_seed_m1_p1(uint32_t&)' defined but not used [-Wunused-function]
scene/resources/default_theme/default_theme.cpp:123:20: warning: 'Ref<Shader> make_shader(const char*, const char*, const char*)' defined but not used [-Wunused-function]
scene/resources/default_theme/default_theme.cpp:130:24: warning: 'Ref<BitmapFont> make_font(int, int, int, int, const int*, const Ref<Texture>&)' defined but not used [-Wunused-function]
```

Had to split `core/io/zip_io.h` into header and .cpp file without 'static' keyword.

Not fixed yet (static definition in header used in some files but not all):
```
modules/websocket/lws_helper.h:111:13: warning: 'void _lws_make_protocols(void*, int (*)(lws*, lws_callback_reasons, void*, void*, size_t), PoolVector<String>, _LWSRef**)' defined but not used [-Wunused-function]
```

Also fixed a couple other warnings missed in previous commits.
2018-09-29 22:26:12 +02:00
Rémi Verschelde 3a2ca68af3 SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
2018-09-28 14:07:39 +02:00
DualMatrix 99e3309296 Added hover_pressed style to CheckBox and CheckButton
Added hover_pressed style to CheckBox and CheckButton.
If no style is defined for this property it will default to the pressed property.
2018-09-24 02:31:03 +02:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00