Commit Graph

517 Commits

Author SHA1 Message Date
Yuri Sizov edf47f1ee4 Delay initialization of the visual shader editor UI
This makes sure that the theme is ready to be used before the
methods is called.
Also add missing icons (and update some existing).

Co-authored-by: Samuel Wilson <yokomeshi@gmail.com>
2023-05-23 15:20:42 +02:00
trollodel b4d6b47c17 Add multi window code and shader editors 2023-05-10 09:14:21 +02:00
Fredia Huya-Kouadio 30824e9818 Adds a `scale_gizmo_handles` entry to the `Touchscreen` editor settings
When enabled, this scales the editor icons to improve usability on touchscreen devices.
In addition this commit fixes touch detection for the collision_shape_2d_editor_plugin so it scales with the icons size.
2023-05-07 15:55:28 -07:00
Rémi Verschelde cedd3378f5
Merge pull request #69053 from KoBeWi/grabbercentrism
Add center_grabber theme property to Slider
2023-04-27 08:18:37 +02:00
Rémi Verschelde dfee04ae2a
Merge pull request #74632 from davthedev/tabs-hover
Add theming support for hovered tabs
2023-04-24 16:42:38 +02:00
kobewi 14cb9b5b26 Add center_grabber property to Slider 2023-04-22 17:53:17 +02:00
David Giardi 9f1e18e64c Add theming support for hovered tabs
Tabs can now be styled differently when hovered by the mouse pointer.
2023-04-19 01:38:09 +02:00
David Giardi 142990d60a Add hovered item style to ItemList 2023-04-18 22:52:39 +02:00
kobewi f462efd7f1 Add missing LineEdit constants in editor theme 2023-04-17 22:55:27 +02:00
Rémi Verschelde 12f2c753fe
Merge pull request #75923 from dalexeev/editor-rtl-selection-color
Editor Theme: Set `selection_color` property of `RichTextLabel`
2023-04-11 19:40:59 +02:00
Rémi Verschelde fff0ee0fc4
Merge pull request #75822 from YeldhamDev/no_multi_zero
Remove unnecessary zero multiplications
2023-04-11 19:40:40 +02:00
Danil Alexeev 306308d957
Editor Theme: Set `selection_color` property of `RichTextLabel` 2023-04-11 10:53:42 +03:00
Michael Alexsander 2ea4f8bc78 Fix bottom of `LineEdit`s in the editor being rounded 2023-04-08 09:50:17 -03:00
Michael Alexsander f057d755ab Remove unnecessary zero multiplications 2023-04-08 09:31:05 -03:00
Haoyu Qiu 498d538578 Add scrollbar offset theme constants to Tree 2023-04-06 15:04:28 +08:00
Yuri Sizov ada406f2f5
Merge pull request #75566 from Maran23/4-x-theme-values-affects-editor
Fix some theme values affect the editor by setting a default value for them
2023-04-04 17:30:30 +02:00
Rémi Verschelde 5c5f065325
Merge pull request #74729 from YuriSizov/project-manager-baked-with-love
Improve code structure, layout, and theming of the project manager
2023-04-03 17:09:09 +02:00
Marius Hanl c0905bc0af Fix some theme values affect the editor by setting a default value for the theme constant 'h_separation' for MenuBar and Button and a default value for the theme color 'background_color' for TextEdit 2023-04-01 16:28:28 +02:00
Yuri Sizov 1522762dc9 Make icons of scripted and custom classes fit the editor UI
Also:
- Add an option to limit the icon size in PopupMenu.
This is similar to how this works in Tree and TreeItem.
- Add the same option to TabBar.
- Add a theme constant for Tree, PopupMenu, Button, and
TabBar to apply this limit on the control level.

Co-authored-by: Daylily-Zeleen <daylily-zeleen@foxmail.com>
2023-03-31 21:39:02 +02:00
Yuri Sizov aa47427cc7 Improve theming support in the Project Manager 2023-03-16 12:36:26 +01:00
Yuri Sizov 64215ad119 Generate empty textures for theme icons if the SVG module is disabled 2023-03-07 15:31:19 +01:00
Fredia Huya-Kouadio 445053a62d Enable granular control of touchscreen related settings 2023-02-22 00:16:39 -08:00
Rémi Verschelde f0c9ed4b55
Merge pull request #71475 from Maran23/4-x-theme-outline-affects-editor
Fix custom theme outline settings affects the editor theme as well
2023-02-17 14:07:22 +01:00
Yuri Sizov e14cacb8da
Merge pull request #71862 from RedMser/splitcontainer-fixes
Fix SplitContainer rendering and theming
2023-02-03 23:09:18 +03:00
Fredia Huya-Kouadio 63c88df3f7 Add a theme usability setting which updates the touch area of UI elements (e.g: scrollbar) for the editor on touchscreen devices 2023-01-28 00:21:05 -08:00
Yuri Sizov 9b7124b49c Remove size restrictions from StyleBoxTexture 2023-01-26 17:11:37 +01:00
RedMser 386f62df96 Fix SplitContainer rendering and theming 2023-01-22 16:34:56 +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
Marius Hanl e1e7237b9a Fix custom theme outline settings affects the editor theme as well
- font_outline_color and outline_size is now set in the default theme for every control using it
2023-01-15 22:43:27 +01:00
Pedro J. Estébanez d0e37cd04c Add framework for avoidance of color flash in new windows 2023-01-12 21:42:51 +01:00
Juan Linietsky 0e0a6bb39b
Removed unused property hints and `Object::get_translatable_strings()`
* Remove unused `EditorPropertyMember` and related hints, previouly used by
  VisualScript. Such logic should be implemented in the VS module itself.
* As the above broke compatibility with the VS module, clean up the other
  hacks that were still in core in support of VisualScript.
* `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's
  `get_translatable_strings()`, which is a legacy function not used anywhere.
  So both are removed.
* Reordered some usage flags after the above removal to minimize the diff.
* General clean up.

Fixes #30203.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-09 16:56:01 +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
Rémi Verschelde 2fadc1299d
Merge pull request #67871 from Calinou/editor-theme-add-oled-preset
Add Black (OLED) editor theme preset
2022-11-28 08:46:12 +01:00
Rémi Verschelde d3b8faac74
ImageLoaderSVG: Improve error reporting 2022-11-23 13:27:31 +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
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
kobewi c7eb814ede Remove override_selected_font_color property 2022-10-26 12:59:18 +02:00
Hugo Locurcio f613db0db9
Add Black (OLED) editor theme preset
This preset uses a fully black background to reduce power usage on OLED
displays, leading to increased battery life on laptops with OLED displays.

This preset is also useful for late night sessions, as OLED displays
have a near-infinite contrast ratio.

This also adds a Draw Extra Borders editor setting which draws borders
around some interactive nodes. This setting is required for good
usability of a theme with a fully black background.

Visibility of disabled text (including unselected tab names) has been
slightly increased for better accessibility, regardless of the editor
theme preset in use.
2022-10-26 01:23:53 +02:00
kobewi e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
Pedro J. Estébanez f82deaa5b3 Polish rendering driver refactor further (take 2) 2022-10-11 19:06:55 +02:00
Rémi Verschelde 5b7f62af55 Merge pull request #62910 from Vitika9/gsoc-colorpicker-ux
ColorPicker UX
2022-10-07 09:49:29 +02:00
Rémi Verschelde 166df0896c Fix typos with codespell
Using codespell 2.3-dev from current git.

And fix typo in `methods.py` for `vsproj=yes` option (still won't work
though).
2022-09-30 14:23:36 +02:00
Yuri Sizov 02572f2c62 Improve icon generation in the editor theme 2022-09-16 23:34:01 +03:00
Rémi Verschelde 1513d76cb9 Fix some errors affecting the Web editor
- Don't warn about minimized/maximized modes not being available.
- Blender and FBX export both depend on running thirdparty applications,
  which can't be done (easily at least) for Web and Android editors.
- Editor theme complained about not being able to retrieve texture data
  for an icon. It was only used once so instead of flipping at runtime,
  let's just add a flipped icon.

Part of #65702.
2022-09-12 16:29:45 +02:00
Yuri Sizov 817d4db21f Allow images to be imported "for editor use" and respect editor settings 2022-09-07 23:31:31 +03:00
Rémi Verschelde e0c7916f73 Merge pull request #59069 from fire-forge/stylebox_margin_functions
Add all/individual setters for StyleBox default margins and StyleBoxTexture margin size and unbind `StyleBox*.set_*_individual()` methods
2022-09-07 17:52:58 +02:00
Rémi Verschelde 48705b1f03 Merge pull request #65355 from groud/split_container_min_grab_thickness
Allow SplitContainer to have a grab area larger than its visual grabber
2022-09-07 17:51:52 +02:00
FireForge dd7ee37c8a Add set_default_margin_all/individual to StyleBox 2022-09-07 16:37:36 +03:00
Gilles Roudière 4cbcb5acda Allow SplitContainer to have a grab area larger than its visual grabber 2022-09-07 12:33:02 +02:00
Rémi Verschelde 2841bc358c Merge pull request #65446 from YuriSizov/dialogs-make-styleboxes-matter
Make `AcceptDialog` and derivatives utilize `StyleBox` fully
2022-09-07 09:09:15 +02:00
Yuri Sizov 5eaf82b4f0 Make AcceptDialog and derivatives utilize StyleBox fully 2022-09-07 01:42:11 +03:00
Yuri Sizov 43f03e2ce6 Improve naming of theme properties throughout GUI code
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
2022-09-06 22:53:17 +03:00
Vitika9 1dce43d417 ColorPicker UX improvements
- Tabs and MenuButton for mode selection and enabling/disabling colorized sliders
- MenuButton for shape selection with new icon for each shape
- Drag and drop functionality for presets to arrange order
- A chronological list of recently selected presets which are global for the editor
- Presets are now highlighted as being active or inactive
- Thicker sliders for easy targeting
- `grabber_offset` theme constant for Slider
- Uncolorized sliders
2022-09-06 21:42:20 +05:30
FireForge 6e8dc5130d Various editor UI fixes (bottom panel corner radius and scene tab bar)
- Fix top corners of bottom panel not having rounded corners
- Fix scene tab bar background expanding vertically by corner radius
- Remove two unneccesary theme items from the editor theme:
	- EditorStyles/SceneTabFG
	- EditorStyles/SceneTabBG
- Remove an instance where the scene TabBar was having its styleboxes overriden to the default value, which has no effect.
2022-09-05 15:11:57 -05:00
Yuri Sizov 00fa4e23e4
Merge pull request #65230 from fire-forge/itemlist-spacing 2022-09-05 19:59:06 +03:00
Rémi Verschelde 9dfa14d5c2 Merge pull request #65181 from fire-forge/corner-details 2022-09-02 23:19:51 +02:00
RedMser 7664ea8c97 EditorTheme: Remove rounded corners for all popups
Expands #59045 to apply to all kinds of popups,
since they all render as separate windows.
2022-09-02 18:24:33 +02:00
FireForge 77121efdff Increase ItemList v_separation in editor theme
ItemList now uses the same value for v_separation as PopupMenu. This makes it easier to select items.
2022-09-01 21:51:17 -05:00
kobewi 73929bef73 Rework oriented containers 2022-09-01 22:13:46 +02:00
FireForge b42d692648 Decrease StyleBoxFlat corner detail in editor theme
Also makes some minor changes to other areas of the editor theme.
2022-09-01 10:01:10 -05:00
Rémi Verschelde 292b94b97c
Merge pull request #65089 from YuriSizov/editor-launch-bar-with-style
Improve style and add contextual highlight to the editor launch pad
2022-08-30 21:18:41 +02:00
Rémi Verschelde e27b61d291
Merge pull request #65042 from YuriSizov/editor-docks-tabbar-bg 2022-08-30 18:53:54 +02:00
Yuri Sizov a462d6e402 Improve style and add contextual highlight to the editor launch pad 2022-08-30 18:10:45 +03:00
Yuri Sizov 8b196be855 Add background to TabContainer's tabbar and editor docks 2022-08-29 23:43:32 +03:00
Yuri Sizov 88ab58821d Fix some editor theme regressions 2022-08-29 18:01:41 +03:00
Yuri Sizov c78cbb523f Extract editor color map and simplify SVG color conversion 2022-08-24 15:59:14 +03:00
SaracenOne dd814a0dca Disable editing properties in foreign resources
from imported scenes or objects returning
true from a function named '_is_read_only' and
disable resaving imported resources.
2022-08-23 23:16:13 +01:00
Hugo Locurcio 7849331ec5
Create a SVG default project icon in new projects
This allows the icon's scale to be changed using the `svg/scale`
import option, including to scales greater than the default 128×128.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-08-20 01:01:11 +02:00
Yuri Sizov 0d95b8bff2
Merge pull request #59045 from Calinou/editor-theme-popup-no-rounded-corners
Don't use rounded corners for PopupMenus in the editor theme
2022-08-19 02:42:17 +03:00
Max Hilbrunner 420a8c888e
Merge pull request #63950 from bruvzg/menu_bar3
Implement MenuBar control to wrap Popup menus or native menu, use native menu for editor.
2022-08-19 01:24:24 +02:00
Hugo Locurcio ce8b402f3a
Don't use rounded corners for PopupMenus in the editor theme
PopupMenus use separate windows by default in the editor, and windows
no longer support per-pixel transparency for now in 4.0.
Even if per-pixel transparency was reimplemented, we can't assume
that it'll always work in practice (e.g. when compositing is disabled).
2022-08-18 22:17:55 +02:00
bruvzg 8c56a7416b
Implement `MenuBar` control to wrap `PopupMenu`s or native menu, use native menu for editor. 2022-08-18 22:25:44 +03:00
Yuri Sizov 7a60cc7737 Improve editor toolbar for Control nodes 2022-08-16 17:36:16 +03:00
kobewi e06cd2742f Add missing properties to default theme 2022-08-11 14:15:04 +02:00
Hugo Locurcio 3dab891691
Tweak PopupMenu item spacing in the editor theme
- Increase spacing between items for easier clicking with the mouse.
- Increase lateral margins for better visual appearance.
- Decrease margin at the top and bottom to compensate for the increased
  per-item height.
2022-08-05 11:29:12 +02:00
Michael Alexsander 1bd9efae36 Fix text position when hovering pressed `CheckButton/Box` elements in the editor 2022-08-03 11:08:30 -03:00
Hugo Locurcio dc0ac50f45
Visually line up the selected tab with the underlying panel with borders 2022-08-03 11:01:33 +02:00
Yuri Sizov 86798d36db Remove `CustomPropertyEditor` completely 2022-08-01 22:57:05 +03:00
Hugo Locurcio 0a24d40836
Improve script editor's light theme syntax colors for better readability
New colors were hand-picked to have a better contrast rate,
while still following the general coloring of the previous light theme.

This improves the light theme's accessibility, especially in outdoor
environments with direct sunlight.
2022-07-31 23:40:48 +02:00
PhoenixFlame101 dd8cee4b50 Fix code folding icon color not matching defined color
Caused by reusing icons from the main editor in the code editor. These
icons were converted based on the main editor theme and not the code
editor theme.

 - Create new icons for use specifically in the code editor
 - Add these icons to the exceptions when converting dark theme icons
   to light theme automatically
 - Change the default value of the code folding color to match previous
   color
 - Code folding icon is now pure white by default to correctly match
   the color defined in settings
2022-07-20 23:05:47 +03:00
kobewi d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
MinusKube 336400dc42 Add the ability to drag the code completion scrollbar using the mouse click 2022-07-03 23:47:52 +02:00
Rémi Verschelde a2b20c15be
Merge pull request #61698 from raulsntos/icon_color-editor-theme
Add icon colors to editor theme
2022-06-24 09:09:30 +02:00
Raul Santos 842a3efe84
Add icon colors to editor theme
Add `icon_normal_color`, `icon_pressed_color`, and
`icon_disabled_color` to `Button`, `OptionButton`,
`CheckButton`, and `CheckBox`.
2022-06-23 20:02:27 +02:00
FireForge d605d13324 Add margins to Array and Dictionary editors 2022-06-11 10:44:15 -05:00
Rémi Verschelde efcf0d88e4
Merge pull request #61454 from fire-forge/round-script 2022-06-10 10:53:19 +02:00
Rémi Verschelde 4922fee09e
Merge pull request #59770 from fire-forge/rounded-corners 2022-06-10 10:53:09 +02:00
Rémi Verschelde ab2fd4a671
Merge pull request #59776 from fire-forge/more-round 2022-06-10 10:52:44 +02:00
kobewi 9036fcbe5e Remove TooltipPanel and TooltipLabel 2022-06-09 22:23:11 +02:00
Guilherme Felipe de C. G. da Silva 4bf5047fb0 Fix state machine style 2022-06-03 14:59:00 -03:00
Rémi Verschelde 532e253a7c
Merge pull request #61455 from fire-forge/tab
Add color contrast to TabContainer backgrounds in the editor
2022-05-31 12:52:03 +02:00
Hendrik Brucker 70c234f3e3 Improve Graphedit connection lines 2022-05-30 17:33:01 +02:00
FireForge eb573da2b5 Use "odd" style for TabContainers on base BG color
- Use the "odd" style for TabContainers that are on a background with the same color as the default TabContainer background color to add contrast
2022-05-26 21:19:15 -05:00
FireForge c159c64a28 Add rounded corners to the script editor 2022-05-26 20:36:21 -05:00
kobewi e7b0e7e35a Improve style of inspector buttons 2022-05-25 22:54:47 +02:00
FireForge 42d1a96904 Add rounded corners to the contextual toolbar
- Move contextual toolbar stylebox to the editor theme because it's the same in the 2D and 3D editors
2022-05-25 15:43:40 -05:00
FireForge 9bc6f44c80 Add rounded corners to EditorProperty and EditorSpinSlider
- Adds rounded corners to the EditorProperty child background, EditorSpinSlider label background, and resource sub-inspector borders and background.
- Allows customizing EditorSpinSlider label background through a new Theme StyleBox property, label_bg.
- Makes margins consistent in resource sub-inspectors.
- Removes space between buttons in NodePath, Resource, and multiline string editors.
- Adds space between label background and content for vertical property editors.
2022-05-25 15:31:30 -05:00
Hugo Locurcio 97f41379b1
Increase saturation of accent color on the Gray editor theme preset
This also renames the Gray editor theme preset to use US spelling.
2022-05-23 10:01:43 +02:00
reduz 45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00