Matthias Clasen
48dc7df5b7
Update the node format docs
...
Mention the new syntax for naming and reusing textures.
2024-01-15 07:46:18 -05:00
Matthias Clasen
550e98090a
node-editor: Redo crash recovery UX
...
Switch from a dialog to an in-app notification, and make use
of the new auto-reload property for it.
2024-01-14 14:40:51 -05:00
Matthias Clasen
2771befdd9
node-editor: Add a menu items for auto reloading
...
Expose the auto-reload property as a toggle action, and add
a menu item for it.
2024-01-14 14:40:51 -05:00
Matthias Clasen
911730493d
node-editor: Add an auto-reload property
...
This is not exposed anywhere yet.
2024-01-14 14:40:51 -05:00
Matthias Clasen
d41fb7c5a6
node-editor: Add commandline options
...
Add --reset to remove the autosave file. While we're at it, also
add --version.
2024-01-12 20:50:34 -05:00
Matthias Clasen
3b28c46595
node-editor: Add autosave
...
Save the buffer contents to a file in ~/.cache/gtk4-node-editor
and restore it on startup.
2024-01-12 20:50:34 -05:00
Matthias Clasen
4882514234
node-editor: Make test fonts available
...
Add the directory containing test fonts for gsk tests to the
font configuration, so that node files from the testsuite using
these fonts just work.
2024-01-10 21:10:36 -05:00
Benjamin Otte
ee14b96c28
node-editor: Don't #include <gsk/gl/gskglrenderer.h>
2024-01-07 14:47:22 +01:00
Benjamin Otte
f57e211ba9
node-editor: Use gsk_renderer_realize_for_display()
...
... in all the places where we used realize (NULL) before.
2024-01-07 14:47:22 +01:00
Benjamin Otte
5f03053569
gsk: include Vulkan renderer in public header
...
The Vulkan renderer can just be public API, because it doesn't expose
any Vulkan-specific APIs.
And it can just exist when compiled without Vulkan, because it can fail
to realize.
Also move get rid of the gsk/vulkan/gskvulkanrenderer.h header. It was
experimental and isn't necessary now that the renderer is included via
gsk.h.
2024-01-07 14:47:22 +01:00
Benjamin Otte
10f934f782
node-editor: Add the new renderer(s)
2024-01-07 07:22:49 +01:00
Benjamin Otte
1e54e838e0
vulkan: Remove GskVulkanRenderer
...
We want to introduce a new one next.
Technically, this breaks API, because gsk_vulkan_renderer_new() is going
away, but practically, we're gonna bring it back once we introduce that
renderer in a few commits.
2024-01-07 07:22:49 +01:00
Matthias Clasen
d21a691f44
node-editor: Convert headers to #pragma once
...
That is our current coding style.
2023-12-20 09:51:19 -05:00
Matthias Clasen
0bf1ae033d
Document node format for stroke and fill nodes
2023-08-26 07:39:23 -04:00
Benjamin Otte
bac41ce644
node-editor: Print default renderer in title
...
If there is a value passed to GSK_RENDERER, display it in the window
title.
This is mostly so that when I show off screenshots, people know what
renderer I'm using.
2023-05-16 18:53:53 +02:00
Matthias Clasen
f2a297f56d
Stop using gtk_css_provider_load_from_data
2023-05-13 19:59:17 -04:00
Matthias Clasen
823f56d263
Cleanup
2023-05-07 09:32:09 -04:00
Matthias Clasen
87332920d5
node-editor: Add some editor smarts
...
Allow control-clicks on some fields to bring up
a more specific UI. This functionality is also
available via Ctrl-E and the context menu.
At this point, it can edit colors, fonts and
files in some places, as well as a few enums.
2023-05-07 09:19:44 -04:00
Matthias Clasen
d2a358206c
Fix a typo in the node format definition
2023-05-07 09:19:44 -04:00
Matthias Clasen
1fba59f1d1
node-editor: Be a bit better about saving
...
When we have a file, suggest it for saving.
This has the side benefit of giving us a test case
for gtk_file_dialog_set_initial_file.
2023-05-05 14:18:40 -04:00
Matthias Clasen
c237643b24
node-editor: Plug a memory leak
2023-04-27 13:42:03 +02:00
Matthias Clasen
3eee1c0724
node-editor: Typo fixes
...
Fix some typos in the node format documentation.
2023-04-10 16:04:17 +02:00
Matthias Clasen
6182f4a332
node-editor: Improve the scaling
...
We only want to scale the main rendering, not whats
shown in the sidebar. Also, make the scale logarithmic.
2023-04-03 22:33:34 -04:00
Benjamin Otte
47ba29bc14
docs: Document additions to the node format
2023-03-29 03:53:52 +02:00
Matthias Clasen
0a3eceb15d
node-editor: Embed textures in testcases
...
It is useless to have node files with references
to external files in the testsuite, so turn such
textures into data urls by doing a serialization
roundtrip.
2023-03-19 10:04:46 -04:00
Benjamin Otte
7c96003471
node-editor: Add more export options
...
Auto-detect tiff and svg and if those are chosen, save to that format.
2023-03-11 00:08:44 +01:00
William Roy
aaeec84d75
Fix compile_resources present source directory
...
In certain scenarios, address the issue where gnome.compile_resources
fails to transmit the present source directory. This is most notably
visible with MSBuild.
2023-03-07 21:59:50 +00:00
Matthias Clasen
0d97d03fc1
Document mask node parser format
2023-02-14 19:07:01 -05:00
Matthias Clasen
dc3a72cf38
nodeparser: Support texture-scale nodes
2023-02-11 15:09:38 -05:00
Benjamin Otte
e2f730c0bf
filedialog: Add gtk_file_dialog_set_initial_file()
...
A shortcut for setting initial-folder and initial-name at the same time.
We can remove all arguments from the actual async calls this way.
2022-12-24 07:56:57 -05:00
Benjamin Otte
8a2d35b9fb
filedialog: Add gtk_file_dialog_set_initial_name()
2022-12-24 07:56:57 -05:00
Benjamin Otte
26cec4a021
filedialog: Rename current-folder to initial-folder
...
It's not the current one - unlike in GtkFileChooser - because there are
no live updates. So we use a more descriptive name.
2022-12-24 07:56:57 -05:00
Matthias Clasen
3007b0fd7f
Remove leftover debug spew
2022-12-09 10:04:42 -05:00
Matthias Clasen
96b9ac84f8
node-editor: Redo saving location
...
Determine the location to save testcases in dynamically,
trying first a GTK_SOURCE_DIR environment variable
and then the current directory as the GTK source dir,
ultimatively falling back to just saving in the current
directory.
This avoids leaking details of the build environment
into the produced artifacts and should make GTK builds
more reproducible.
Fixes : #5403
2022-12-09 09:35:32 -05:00
Matthias Clasen
e7de4c1f99
node-editor: Port to async dialog API
2022-10-29 13:31:41 -04:00
Matthias Clasen
63c61340ac
Merge branch 'test-coverage' into 'main'
...
node-editor: Make the help more helpful
See merge request GNOME/gtk!4874
2022-07-15 22:34:02 +00:00
Marco Melorio
d8a73cbd03
picture: Add content-fit property
...
It allows to specify the resize mode of the paintable inside the
GtkPicture allocation. This also deprecates the keep-aspect-ratio
property.
Fixes #5027 .
2022-07-15 23:01:23 +02:00
Matthias Clasen
35e6a2fdb8
node-editor: Sort help better
...
Move the gshader section where it belongs.
2022-07-15 15:46:06 -04:00
Matthias Clasen
69336fa5f1
node-editor: Make the help more helpful
...
I struggled to remember how newlines vs strings work in
this format, so put it in the docs.
2022-07-15 15:46:06 -04:00
Emmanuele Bassi
f4f683a469
Rename clear_template to dispose_template
...
Make it more clear that the function is supposed to be called during the
dispose sequence of a widget.
2022-07-11 18:24:37 +01:00
Emmanuele Bassi
bf75a21deb
Port node editor to gtk_widget_clear_template()
2022-07-11 18:24:37 +01:00
Matthias Clasen
27db4b5c2f
node-editor: Add a zoom button
...
This is a bit more convenient than manually
adding a transform node in the text editor.
2022-06-07 13:39:22 -04:00
Matthias Clasen
726a92200f
Install gtk4-node-editor
...
It is an application worth having around.
2022-05-07 07:18:36 -04:00
Matthias Clasen
78d34c098e
node-editor: Add things
...
Add a desktop file and appdata.
2022-05-07 07:18:36 -04:00
Emmanuele Bassi
6f2ff620bd
build: Replace deprecated 'gui_app'
...
Use `win_subsystem: 'windows'` instead.
2021-12-24 15:51:11 +00:00
Benjamin Otte
8d1956921d
node-editor: Display errors
...
When opening a file or pasting DND fails, display the error as the
actual node.
2021-11-30 14:12:10 +01:00
Matthias Clasen
6690197673
node-editor: Don't make paned shrinkable
...
When the handle is dragged all the way to the left,
it is impossible to get it back. Which is not fun.
2021-11-18 17:25:29 -05:00
Matthias Clasen
96778fca92
Fix formatting error in demo about dialogs
...
Try harder to format things nicely.
2021-11-16 16:45:56 -05:00
Benjamin Otte
869d2f281a
node-editor: Create renderers surfaceless
2021-10-20 21:49:32 +02:00
Matthias Clasen
144f727d5a
Rename ngl to gl
...
We have only one gl renderer now, and it is
a bit odd for it not be called gl.
2021-10-07 13:05:53 -04:00