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
0dcf31292d
icon-browser: Use #pragma once consistently
...
That is the current coding style.
2023-12-20 10:24:05 -05:00
Matthias Clasen
4ab18b6657
gtk4-demo: Use #pragma once consistently
...
This is our current coding style.
2023-12-20 09:55:11 -05: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
Carlos Garnacho
39b08b82ca
gtk-demo: Fix typo
...
Close the quotes in alert dialog message.
2023-12-11 14:22:30 +01:00
Matthias Clasen
3ab7b2d7ce
Merge branch 'va-fixes-reported-by-pvs' into 'main'
...
Fix issues spotted by PVS-Studio
See merge request GNOME/gtk!6558
2023-11-15 00:27:08 +00:00
Andrey Kutejko
540a83327f
Fix issues spotted by PVS-Studio
2023-11-14 08:56:40 +01:00
Matthias Clasen
d32ab7544d
gtk-demo: Enable offload in the video player
2023-11-13 22:27:51 +01:00
Kleis Auke Wolthuizen
d0f76b6ab4
widget-factory: Remove insert-image icon
...
This icon is already present in the hicolor icon theme.
2023-10-28 20:25:53 +02:00
Kleis Auke Wolthuizen
4c7206343a
widget-factory: Remove view-grid-symbolic icon
...
No longer needed as it's included in the hicolor icon theme now.
2023-10-28 20:25:53 +02:00
Sergey Bugaev
e8ecbb2009
demo: Use the frame time for animation
...
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-10-10 11:38:13 +03:00
Matthias Clasen
12ad6b3157
gtk-demo: Add a demo for printing a stream
...
Add a Print button to the path fill demo,
and implement it using gtk_print_dialog_print.
2023-10-01 09:30:38 -04:00
Matthias Clasen
fda9fd5ced
print dialog: Some API revisions
...
Make gtk_print_dialog_setup_finish return a GtkPrintSetup
object, which encapsulates all the data that needs to be
transferred between the setup and print calls, and make
the print_file and print methods take an extra GtkPrintSetup
argument.
Change the print call to return an output stream, rather
than take an input stream. The results are now returned
when the output stream is closed.
With some further cleanup, this makes the GtkPrintDialog
object a proper builder object - you can create multiple
print dialogs from the same GtkPrintDialog object, in
parallel, and they won't interfere with each other.
2023-10-01 09:30:38 -04:00
Matthias Clasen
bbda833b01
demos: Cosmetics
2023-09-30 21:30:15 -04:00
Matthias Clasen
b55117334c
gtk-demo: Add a print dialog
2023-09-27 20:50:52 -04:00
Matthias Clasen
d8b14cd3e3
gtk-demo: Fix a refcounting mishap
...
gtk_font_dialog_button_new's argument is
transfer full.
Fixes : #6113
2023-09-23 07:47:09 -04:00
kramo
0b2cebe3d8
docs: Update cursor images
2023-09-21 19:51:11 +02:00
Matthias Clasen
76df3ade18
gtk-demo: Update some ifdefed code
...
This was from a time when we had arcs.
2023-09-20 22:12:09 -04:00
Matthias Clasen
f94a0624fa
gtk4-demo: Fix a crash
...
This conversion of GtkStatusbar was a bit too
quick.
Fixes : #6107
2023-09-19 14:47:59 -04:00
Carlos Garnacho
cbbd3e8fc3
demos: Add step/page-increment to path_walk demo spinbutton
...
It had 0 defaults, so it didn't get to spin when interacted.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/6098
2023-09-18 20:09:42 +02:00
Matthias Clasen
ed44f37de4
gtk-demo: Add sound to the path maze
...
Its a game, after all.
2023-09-14 11:32:22 -04:00
Matthias Clasen
5721c3cb8f
demos: Drop an unused variable
2023-08-28 20:50:38 -04:00
Matthias Clasen
827bbc0cc1
Change gsk_path_get_closest_point to return distance
...
We already compute it, so lets return it.
Bindings seems fine with this change - they
already return (success, point) as a tuple
anyway.
2023-08-28 11:22:30 -04:00
Matthias Clasen
6f823d2d0d
gtk-demo: Add a few path benchmarks
...
The Tiger and Graph examples in the fishbowl test
path handling.
2023-08-27 12:59:10 -04:00
Benjamin Otte
2582fd45e4
demos: Add cute maze demo
2023-08-27 12:45:25 -04:00
Matthias Clasen
1db75e521d
Simplify the path spinner demo
...
The transforms were obscuring a simple
calculation here.
2023-08-27 07:43:55 -04:00
Matthias Clasen
0bf1ae033d
Document node format for stroke and fill nodes
2023-08-26 07:39:23 -04:00
Benjamin Otte
e2d2b57f0e
demos: Add a text-on-path demo
2023-08-25 20:23:08 -04:00
Matthias Clasen
6c1a128ea3
Make the map demo more interesting
...
Add marching arrows to it.
With this, it can also serve as a performance
test for rendering medium complexity paths.
2023-08-25 20:23:08 -04:00
Matthias Clasen
a906dbea35
demo: Fix a bug without GL
...
The gears widget was just not unrealizing properly
when GL is not available. Fix that.
Fixes : #6059
2023-08-25 08:37:22 -04:00
Matthias Clasen
0b5a6ecbff
demos: Cosmetics
2023-08-23 23:20:17 -04:00
Matthias Clasen
9a6aac0459
path spinner demo: Don't crash
2023-08-23 23:18:59 -04:00
Matthias Clasen
7a12abdea3
Incorporate review feedback
2023-08-23 14:16:43 -04:00
Matthias Clasen
36ca1f10dc
Add an arc demo
...
Make a circular spinner to see how well arcs
do for circles.
2023-08-23 13:45:12 -04:00
Sergey Bugaev
122176a3a1
gtk-demo: Turn world map path into a resource
...
The C string literal way way too long for MSVC.
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
2023-08-16 14:35:35 +03:00
Matthias Clasen
93a90bafc3
Add some statistics to the map demo
2023-08-15 13:55:46 -04:00
Matthias Clasen
e807a84967
gtk-demo: Clean up path walk demo
2023-08-14 15:19:42 -04:00
Benjamin Otte
90f0733673
demos: Add a map demo
...
For now, this just shows a world map.
Once we have measures, we can make this
a little more interesting.
2023-08-14 08:41:16 -04:00
Matthias Clasen
60e07335a1
demos: Add stroking to the path fill demo
2023-08-07 13:02:57 -04:00
Benjamin Otte
97f605f811
demos: Add a simple demo filling a path
2023-08-06 21:01:11 -04:00
Matthias Clasen
8e57818a52
Merge branch 'wip/otte/scroll-to' into 'main'
...
a scroll_to() for list widgets
See merge request GNOME/gtk!6227
2023-08-05 02:20:38 +00:00
Benjamin Otte
c278c78378
gtk-demo: Make arrowing in suggestionentry scroll the dropdown
2023-08-05 03:51:53 +02:00
Matthias Clasen
b4ab398e0d
constraint-editor: Deprecation cleanup
...
Drop all uses of deprecated API.
2023-08-03 22:15:27 -04:00
Matthias Clasen
26018107d6
print-editor: Deprecation cleanup
...
Drop all uses of deprecated API.
2023-08-03 22:15:27 -04:00
Matthias Clasen
3e066a0a15
gtk-demo: Deprecation cleanup
...
Remove many uses of deprecated api in gtk4-demo.
Remaining uses are demos of wholly deprecated objects
that will just be dropped in GTK5.
2023-08-03 22:15:27 -04:00
Matthias Clasen
40d3b30770
gtk-demo: Use GtkBuilderScope more
...
Under circumstances I haven't fully tracked down,
these demos refuse to run, failing to locate their
callbacks. So use the machinery we have, and set up
a GtkBuilderCScope for each of the problematic cases.
2023-08-02 19:49:03 +00:00
Christian Hergert
7cc29ce236
demo: use --set-section-alignment when using objcopy
...
If we don't set the alignment then there is a chance that it ends up
commonly on a 4-byte boundary and GResources will have to malloc/memcpy
the static data.
With --set-section-alignment (which takes a byte offset not ^2) available
in objcopy >= 2.33 we ensure that expectation is met.
2023-07-27 17:09:43 -07:00
Matthias Clasen
bad2324318
Merge branch 'dboles/gtk-demo_dnd_dark' into 'main'
...
gtk-demo/dnd: Fix, generalise detecting dark theme
See merge request GNOME/gtk!6157
2023-06-29 10:26:41 +00:00
Daniel Boles
15458b5af3
gtk-demo/dnd: Fix, generalise detecting dark theme
...
Our default theme is now Default, not Adwaita, & HighContrastInverse was
renamed to Default-hc. So these checks did not work anymore. Rather than
hard-coding the new names, & possibly running into the same issue again,
we can just look for the convention of appending -dark to the theme name
and/or the Settings:prefer-dark-theme prop. The latter, we can & likely
SHOULD also apply to all themes - not just ours as before. We also check
for the :dark suffix as that means the theme variant - & before checking
GtkSettings check the GTK_THEME env var, just as GtkSettings itself does
2023-06-28 14:40:06 +01:00
Matthias Clasen
70edacc68d
build: Move objcopy checks to one place
...
We were doing the same thing in three places.
Move it to the toplevel meson.build, so we
can change it in one place.
2023-06-28 07:11:51 -04:00
Matthias Clasen
8b25481c26
widget-factory: Set a11y labels on scale buttons
...
Just to check that this works now.
2023-06-25 22:28:23 -04:00
Matthias Clasen
a3e98558d3
gtk-demo: Some a11y improvements
...
Add missing labels to the applauncher demo
and the clocks demo.
2023-06-19 22:19:54 -04:00
Matthias Clasen
a2fdeb99e0
gtk-demo: Improve a11y for applauncher
...
Use the new listitem properties to make
orca read the selected item in the applauncher
demo.
2023-06-19 21:21:55 -04:00
Matthias Clasen
8d9a59f698
gtk-demo: Miscellaneous a11y improvements
2023-06-19 08:09:48 -04:00
Matthias Clasen
de622c592d
gtk-demo: a11y improvements
...
Make the clipboard demo come up clean in the
a11y checker.
2023-06-17 22:39:56 -04:00
Emmanuele Bassi
6bf4ad866f
Apply suggestions from review
2023-06-17 21:26:53 -04:00
Matthias Clasen
a9f8ec71a4
gtk-demo: Misc a11y improvements
2023-06-17 19:29:53 -04:00
Matthias Clasen
caa8fb4fac
gtk-demo: Fix a crash
...
This was broken in 6b2c088a29
.
2023-06-17 17:56:41 -04:00
Matthias Clasen
e251e7583f
gtk-demo: Misc a11y fixes
...
Add some missing labels.
2023-06-17 16:50:36 -04:00
Matthias Clasen
115f60796f
gtk-demo: Cosmetics
2023-06-17 11:52:37 -04:00
Matthias Clasen
0652e05e0b
gtk-demo: Add an example for dropdown sections
...
Make one of the dropdowns in the Selections
demo have sections.
2023-06-16 21:13:26 -04:00
Matthias Clasen
deac44962a
Fix a crash in gtk-demo
...
Fixes #5889
2023-06-12 12:12:49 -04:00
Matthias Clasen
1b829c7d01
gtk4-demo: Some a11y improvements
...
Add some labels in the pickers demo.
2023-06-11 20:29:25 -04:00
Matthias Clasen
e606313ad1
gtk-demo: Change sidebar tab behavior
...
Change the sidebar to use the 'item' tab
behavior.
Fixes : #3543
2023-06-10 00:02:29 -04:00
Benjamin Otte
ac6f18da12
gtk-demo: make the sidebar request proper width
...
- 25 chars sounds about right for the texts we use
- don't use min width so we allow shrinking the widget (large text or
small mobile devices)
- ellipsize the text instead of clipping it.
2023-06-07 16:00:44 +02:00
Benjamin Otte
0d7069452b
gtk-demo: Remove random numbers
...
There were 3 different random numbers set to determine the sidebar width
and all of them were wrong. Remove them.
Instead, propagate the natural width of the listitems.
2023-06-07 16:00:44 +02:00
Matthias Clasen
3b105a637c
widget-factory: Align some widgets better
2023-05-22 08:36:13 -04:00
Matthias Clasen
6b2c088a29
demos: Stop using deprecated api
...
Use texture apis instead of pixbuf ones.
2023-05-16 16:25:59 -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
59343e4efb
gtk-demo: Rename the new Settings demo
...
"v2" does not look great in the sidebar.
Lets call this "Alternative Settings".
2023-05-11 20:14:58 -04:00
Matthias Clasen
41219ae489
gtk-demo: Fix a typo
2023-05-11 19:53:42 -04:00
Matthias Clasen
ba6a618d44
build: Rename another option
2023-05-09 21:41:27 -04:00
Matthias Clasen
ff920d98ec
Use GTK_ALIGN_BASELINE_FILL
...
Replace GTK_ALIGN_BASELINE with its new name
everywhere.
2023-05-09 14:28:26 -04:00
Matthias Clasen
91ca6d0851
Merge branch 'wip/ebassi/gen-version-macros' into 'main'
...
Generate version and deprecation macros at build time
See merge request GNOME/gtk!5945
2023-05-09 18:23:40 +00:00
Matthias Clasen
526ddfa866
Merge branch 'wip/otte/sections' into 'main'
...
Add GtkSectionModel
See merge request GNOME/gtk!5818
2023-05-09 16:36:55 +00:00
Emmanuele Bassi
33d0cfd4f8
demos: Drop symbol visibility macros from demo types
...
Since the corresponding source files do not include "config.h", and are
not compiled with `GTK_COMPILATION`, they will generate the wrong symbol
exporting under Windows.
2023-05-09 16:43:35 +01:00
Emmanuele Bassi
265bc90524
build: Use Meson's gnu_symbol_visibility
...
Instead of injecting `-fvisibility=hidden` depending on a compiler check
ourselves, let Meson do it for us.
This also avoids us having to filter `-fvisibility=hidden` when reusing
the common compiler flags.
2023-05-09 16:43:25 +01:00
Benjamin Otte
a959fba18a
Merge branch 'wip/otte/no-vsync' into 'main'
...
Add GDK_DEBUG=no-vsync
See merge request GNOME/gtk!5944
2023-05-09 15:16:43 +00:00
Benjamin Otte
ddefbfa8b5
gtk-demo: Add alternative settings demo
...
This one displays a long list of all settings with sections and allows
filtering the list to quickly search for keys.
2023-05-09 17:03:35 +02:00
Benjamin Otte
435a405c55
gtk-demo: Split out code from the settings demo
...
I want to add another demo using settings and share relevant code.
2023-05-09 17:01:20 +02:00
Benjamin Otte
30acf00bf8
gtk-demo: Update fps with higher priority
...
We want to make sure to always update it, so make sure it has a higher
priority than redraws.
2023-05-09 16:29:41 +02:00
Matthias Clasen
082ba6d7c8
Introduce GTK_ALIGN_BASELINE_FILL/CENTER
...
It turns out that the old behavior of GTK_ALIGN_BASELINE
was actually used in libadwaita, so bring it back, and
introduce a new GtkAlign value for the new behavior.
2023-05-07 21:26:09 -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
Daniel Boles
2c15d563e2
gtk-demo/listbox: Fix 0 space between nick & date,
...
by restoring the right-alignment that gtk-3-24 has here, but we had lost
– I guess because we dropped the default child expand and pack-end props
2023-04-30 16:39:16 +01:00
Matthias Clasen
5b6f8d7002
gtk4-demo: Stop using gtk_widget_get_allocated_size
2023-04-29 14:30:21 -04:00
Matthias Clasen
c237643b24
node-editor: Plug a memory leak
2023-04-27 13:42:03 +02:00
Matthias Clasen
d8b46c16cc
Merge branch 'stylus-fixes' into 'main'
...
gtk-demo: Test stylus-only mode
See merge request GNOME/gtk!5804
2023-04-12 10:10:11 +00: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
d4a34b1a0b
gtk-demo: Stop using gtk_widget_get_allocation
2023-04-09 08:38:14 -04:00
Matthias Clasen
b7f48b7763
gtk-demo: Add a keyword
...
Make the demo using the 'bluroverlay' come up when you type 'blur'.
2023-04-09 08:38:14 -04:00
Matthias Clasen
7f906bef06
gtk-demo: Work without stylus
...
In the paint demo, don't assume that the event
backlog contains pressure. It won't, if we are
working with a plain old mouse.
2023-04-09 08:35:03 -04:00
Matthias Clasen
5970a14217
gtk-demo: Test stylus-only mode
...
Add a checkbutton to toggle the stylus-only
mode of GtkGestureStylus, so we can test this.
2023-04-09 08:35:03 -04:00
Matthias Clasen
b1f0ca7dc4
gtk-demo: Update the GLArea examples
2023-04-03 23:05:38 -04: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