Emmanuele Bassi
6039a36183
Merge branch 'ebassi/for-master' into 'master'
...
Clean up the build system
See merge request GNOME/gtk!2955
2020-12-15 16:54:59 +00:00
Matthias Clasen
7335e166b7
Update the node format docs
...
Update this document to mention all the render nodes we
have, and the default values for their properties.
2020-12-15 10:30:18 -05:00
Emmanuele Bassi
99e0929d6c
build: Use a consistent style for Meson files
2020-12-15 12:46:59 +00:00
Matthias Clasen
c0ed89be9a
widget-factory: Autoplay the video
...
The empty video on the frontpage is a bit of a letdown, since
the big arrow can't be clicked.
2020-12-09 10:52:55 -05:00
Matthias Clasen
ade4bcb125
Remove NoDisplay from demo desktop files
...
When these are installed (in particular, as flatpaks),
we should not hide them.
Fixes : #2932
2020-12-09 10:09:06 -05:00
Sophie Herold
a36ccd7f42
gtk-demo: Remove potentially ableist metaphor
2020-12-08 23:02:03 +00:00
Jonas Ådahl
27077d5be8
gtk/window: Make 'default-size' adapt to configured size
...
This commit changes the behavior of window size computation and the
default size properties to:
* The default-width and default-height properties are updated to the
current window size unless the size is fixed by e.g. being maxmized,
tiled etc.
* The compute-size semantics are to just pick the default size, or if
not adequate, use the measured size, and consequently update the
default size, unless unresizable.
* gtk_window_get_size() is removed, what's more likely relevant is the
gtk_window_get_default_size() which will now contain more sensible
values.
Various places that used gtk_window_get_size() were updated to use
gtk_window_get_default_size() to remember and restore previous sizes.
This also changes the default value of 'default-width' and
'default-height' from -1 to 0. The gtk builder simplify tool is taught
how to omit when the default size is set to both -1 and 0.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
2cddec7798
gtk/popover: Use gtk_popover_present() instead of going via GtkNative
...
This makes it more explicit that managers of popovers make it "present".
2020-12-07 20:37:29 +01:00
Matthias Clasen
423b8209a1
gtk-demo: Use a native filechooser in the words demo
2020-12-03 22:31:05 -05:00
Matthias Clasen
d83554121f
gtk-demo: Use a native file chooser in the svg demo
2020-12-03 19:44:45 -05:00
Matthias Clasen
2688b94133
gtk-demo: Use a native filechooser in the video demo
2020-12-03 19:44:34 -05:00
Matthias Clasen
e035baee8a
gtk-demo: Remove empty row in the pickers demo
...
The file chooser button is gone.
2020-12-03 19:25:04 -05:00
Christian Hergert
8e62ff50fe
demos: make alienplanet demo work on macOS OpenGL
...
On the macOS OpenGL implementation, the use of noise2 as a
function within the glsl shader collides with the builtin noise2 of a
different signature.
This changes the name to something similar (noize2) so that we
do not risk colliding names when linking.
With this commit, the shadertoy alienplanet demo works on mac
OpenGL (albeit still with the Cairo renderer).
2020-12-03 10:23:13 -08:00
Matthias Clasen
6e67d44aa3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3429
See merge request GNOME/gtk!2912
2020-12-03 03:43:19 +00:00
Benjamin Otte
eb9c204535
gtk: Remove GtkFileChooserButton
...
... as discussed in the meeting.
2020-12-03 02:02:27 +01:00
Matthias Clasen
714c610d6b
gtk-demo: Add a search button
...
Easter eggs are great, but search shouldn't be one.
2020-12-02 19:53:55 -05:00
Matthias Clasen
b75b359f19
Drop devel styling from our windows
...
We are about to do a stable release. Time to get used
again to plain old, boring header bars.
2020-11-23 12:10:01 -05:00
nana-4
3e996f61ae
icon-browser: Add .sidebar style class in the main window
...
So the sidebar can get the proper background and border colors.
2020-11-23 10:51:58 +01:00
nana-4
56eac4f846
gtk-demo: Add .sidebar style class in the main window
...
So the sidebar can get the proper background and border colors.
2020-11-23 10:51:58 +01:00
Matthias Clasen
8e4cc59a7a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2870
2020-11-20 02:02:10 +00:00
Matthias Clasen
a2ce6268b2
gtk-demo: Make a more interesting constraints demo
...
Show various ways to influence spacing. This is more or
less modeled on the way Androids constraint layout lets
you set up 'chains'.
2020-11-19 20:35:15 -05:00
Emmanuele Bassi
a4c3bee4a1
a11y: Hide children of GtkFishBowl
...
The fishbowl widget is purely presentational, and its children should
not be visible in the accessibility tree.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
5afa985e85
demo: Make GtkFishBowl a presentation widget
...
It has no accessible content, even if it displays widgets.
2020-11-19 15:20:56 +00:00
Matthias Clasen
09fd2d61c4
gtk-demo: Rename some demos
...
This is just to make it easier for myself to
find the right sources.
2020-11-18 18:58:45 -05:00
Matthias Clasen
04c4b387a0
gtk-demo: Add more keywords
...
Add GtkShortcutController as a keyword to some demos that
show its use.
2020-11-18 10:48:57 -05:00
Matthias Clasen
36ef94b002
constraint-editor: Fix creating constant constraints
...
We were not making the button sensitive in the case
of a constant constraint, and we were not properly
creating constant constraints either.
2020-11-17 23:16:57 -05:00
Matthias Clasen
831ebe3ef2
constraint-editor: Fix saving of constraints
...
g_file_replace_contents take a gsize, so passing -1
for string length does not work here.
2020-11-17 23:14:29 -05:00
Matthias Clasen
de461712a1
constraint-editor: Improve display of constraints
...
No need to go for ALGOL60 style operators when we
have Unicode.
2020-11-17 21:52:15 -05:00
Christian Hergert
3003f37e9d
node-editor: fix length of text during save
...
The length parameter for g_file_replace_contents() is a gsize, so -1 is
unsuitable here. Just use strlen() directly.
2020-11-17 14:34:11 -08:00
Matthias Clasen
835c807d7a
widget-factory: Remove an unused size group
...
This was left behind when 361407201b
removed
the unused popover that this size group applied to.
2020-11-17 07:34:53 -05:00
Alexander Mikhaylenko
2abee57421
widget-factory: Fix caption style class name
...
It's lowercase.
2020-11-17 13:16:47 +05:00
Matthias Clasen
121e61cf01
gsk: Avoid using gtk css types in public api
...
Using GtkCssSection in public headers here may be
ok from the C perspective, since it all ends up in
the same library anyway. But it causes circular
dependency problems for our gir files that are still
split by namespace.
To avoid this problem, copy the GtkCssLocation struct
struct as GskParseLocation, and pass take two of them
instead of a GtkCssSection in the error callback.
Update all users.
Fixes : #2454
2020-11-16 23:27:44 -05:00
Matthias Clasen
361407201b
widget-factory: Remove an unused popover
...
We are no longer using the hand-rolled variant of that
popover on page 3, so drop it from the ui file.
2020-11-16 15:22:12 -05:00
Matthias Clasen
08d6db4ab6
gtk-demo: Plug a memory leak
...
The Characters demo was leaking its columns.
2020-11-15 23:03:30 -05:00
Emmanuele Bassi
75f9b83b1e
Establish a control relation between demo search and list
...
The search entry changes the content of the list view, so we should
mention that relation to assistive technologies.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
0d6e4f7a6e
demo: Add more accessibility labels to the UI
2020-11-12 21:46:05 +00:00
Matthias Clasen
a2897e1868
gtk-demo: Add suggestion entry demos
...
Add a possible replacement for GtkEntryCompletion
as a demo.
Move the Dropdowns demo to Lists/Selections, and make
it show both GtkDropDown and the suggestion entry, with
some variations.
2020-11-11 15:54:43 -05:00
Matthias Clasen
5ed3ad6cc8
gtk-demo: Split off SvgPaintable
...
Put the SvgPaintable implementation into its
own source files, for ease of copying.
2020-11-11 10:35:54 -05:00
Matthias Clasen
74a7f73239
Merge branch 'matthiasc/builder-requires' into 'master'
...
Matthiasc/builder requires
See merge request GNOME/gtk!2806
2020-11-11 03:53:52 +00:00
Chun-wei Fan
a76f37a501
gtk-demo: Fix building scrolling demo without PangoFT2
...
For builds that do not have PangoFT2, the demo fails to link because we weren't
building listview_ucd.c. Fix the build by building listview_ucd.c with
script-names.c and unicode-names.c for all builds, as we now require a Pango
version that already always depends on HarfBuzz and those sources do not use
anything from PangoFT2.
2020-11-11 11:15:05 +08:00
Matthias Clasen
d6c753bde7
gtk4-demo: Remove <requires> from ui files
...
No need to check requires for things that are shipped
with GTK.
2020-11-10 18:37:40 -05:00
Matthias Clasen
3e8260d528
gtk-demo: Plug a memory leak
2020-11-09 23:29:03 -05:00
Matthias Clasen
192f515682
gtk-demo: Tweak a demo title
2020-11-09 23:28:45 -05:00
Matthias Clasen
a745dbfc15
gkt-demo: Add a columview to the scroll demo
...
This is an interesting case, since it has many labels,
and we are struggling to provide good scrolling performance.
2020-11-09 20:07:09 -05:00
Matthias Clasen
14be50839e
gtk-demo: Improve consistency
...
Make the shortcut triggers demo big enough
to not ellipsize the window title.
2020-11-09 19:54:17 -05:00
Matthias Clasen
a85d9cda07
gtk-demo: Improve consistency
...
Make the paintable svg demo follow the same
pattern we use for other demos.
2020-11-09 19:53:44 -05:00
Matthias Clasen
7d49f1e250
gtk-demo: Improve consistency
...
Make the paintable emblems demo follow the same
pattern we use for other demos.
2020-11-09 19:52:28 -05:00
Matthias Clasen
6fa2936956
gtk-demo: Set default size for drawingarea demo
...
Set a default size, so we don't ellipsize the window
title when the window is presented.
2020-11-09 18:50:43 -05:00
Matthias Clasen
b81463e7d3
gtk-demo: Plug a memory leak
2020-11-09 18:48:10 -05:00
Matthias Clasen
b622745501
gtk-demo: Plug a memory leak
2020-11-09 18:48:10 -05:00
Arnaud Bonatti
db6d7dccd8
Drop “gtk+” plus sign in GtkBuilder <requires>.
2020-11-07 16:16:55 +01:00
Matthias Clasen
d2a7ecf72c
gtk-demo: Simplify the run button
...
Don't create the label manually. It is not necessary,
and letting the button do it also improves the
accessibility setup.
2020-11-04 12:54:48 -05:00
Matthias Clasen
f220a1e3c7
gtk-demo: Set some accessible properties
...
Set labels in the builder demo. The ARIA authoring practices
say that both menubars and toolbars *must* have an accessible
label.
2020-11-04 12:53:23 -05:00
Emmanuele Bassi
425d8ad02a
Set accessible label on GTK Demo's primary menu
...
Otherwise its label is going to be "GtkMenuButton".
2020-11-04 17:15:13 +00:00
Matthias Clasen
bb24b350ac
gtk-demo: Set an accessible role
...
Set an accessible role for the toolbar in the
builder demo. This tests accessibility support
in GtkBuilder.
2020-11-04 11:36:52 -05:00
Matthias Clasen
7624f66fec
widget-factory: Make sure we close popover on page 3
...
We don't want the popover to stay open when we open
an about dialog or shortcuts window. Since cascade-popdown
would also affect e.g. the context menu of the text widgets,
do this explicitly.
2020-11-03 12:09:43 -05:00
Matthias Clasen
dab11ea841
popover: Change default for cascade-popdown
...
We've found a number of cases where this cascading
has unexpected side-effects. So, turn it off by
default, and only set it for menus.
2020-11-03 11:00:32 -05:00
Matthias Clasen
c6ef1943e4
gtk-demo: Remove more gtk3-demo icon uses
...
Use our own logo everywhere.
2020-11-02 22:50:03 -05:00
Matthias Clasen
a3c9f8594a
gtk-demo: Tweak images demo
...
Use our own logo instead of the gtk3-demo one, and
tweak the headings to refledct what we show.
2020-11-02 22:43:44 -05:00
Matthias Clasen
354f2b65fa
gtk-demo: Reanimate floppy buddy
...
Implement a GdkPaintable wrapper around GdkPixbufAnimation,
so floppy buddy can waive again.
2020-11-02 21:38:02 -05:00
Matthias Clasen
b3657d5f2e
widget-factory: Restore modality of the about dialog
...
Make the about dialog of widget-factory modal again.
This was lost in 87a8fda163
.
2020-11-02 21:37:55 -05:00
Matthias Clasen
fb028f0fe7
gtk-demo: Renovate the paned demo
...
Make this look less like testgtk from GTK 2.
2020-11-02 13:56:19 -05:00
Matthias Clasen
8a13909bab
fixup: window titles
2020-11-02 12:02:19 -05:00
Matthias Clasen
4e745f06e9
gtk-demo: Polish all entry demos
...
Make the spacing a bit more consistent, and tweak
some strings here and there.
2020-11-02 12:01:11 -05:00
Matthias Clasen
14b65a3c4f
gtk-demo: Polish the search bar demo
...
Rename this, and make it look a bit less like a
debugging tool, and more like a demo.
2020-11-02 12:00:24 -05:00
Matthias Clasen
64ad490bc1
gtk-demo: Tweak tagged entry styling
...
Move the tags closer together, and avoid resizing too much.
2020-11-02 11:59:22 -05:00
Matthias Clasen
d2d7a4bcab
gtk-demo: Tweak window titles
...
This is an attempt to improve consistency in the sidebar
and the window titles.
2020-11-02 11:11:44 -05:00
Matthias Clasen
14cbd13ef2
gtk-demo: Use typographic style classes
...
We don't need to hardcode <u> in markup anymore.
Use the heading style class instead.
2020-11-02 08:38:20 -05:00
Matthias Clasen
19052d4360
gtk-demo: Tweak descriptions of constraints demos
...
Make these a little longer, and include more details.
2020-10-30 15:26:37 -04:00
Matthias Clasen
588fe5b5c1
gtk-demo: Tweak the new constraints demo
...
With these somewhat random ordering changes, things get
closer to working the same as the code example. Still,
the guide doesn't work right.
2020-10-30 15:04:13 -04:00
Matthias Clasen
49bdc4f0c2
Add another constraints demo
...
This one attempts to use constraints in a ui file.
It doesn't work.
2020-10-30 15:04:13 -04:00
Matthias Clasen
a0ee25a21e
gtk-demo: Remove unnecessary code
...
I was distracted by this code that sets names
on widgets in the constraints demo - the names
aren't used and aren't needed, so remove them.
2020-10-30 15:01:50 -04:00
Matthias Clasen
d5b9489408
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #3282
See merge request GNOME/gtk!2755
2020-10-27 22:38:58 +00:00
Matthias Clasen
907fc30fac
gtk-demo: Add checkmarks to all dropdown demos
...
This follows the mockups that these demos are
copied from. Unfortunately, it has to be implemented
for every item factory, so we repeat it here.
Fixes : #3291
2020-10-27 16:13:44 -04:00
Matthias Clasen
0faadef36f
widget-factory: Add a scale to the gear menu
...
This tests the custom menuitem support, and lets you
control the transition duration for the main stack.
2020-10-26 22:43:12 -04:00
Timm Bäder
85702f8f5d
dnd demo: Make the transform code a bit more idiomatic
2020-10-22 17:46:34 +02:00
Timm Bäder
56e89e8d26
demos: Remove a dead assignment
2020-10-22 17:46:34 +02:00
Timm Bäder
3a1e019e83
print-editor: Fix a wrong comparison
...
If error is NULL, replacing the file contents worked and we don't
show the error dialog. The previous version pretty explicitly
dereferenced a NULL pointer by first ensuring that error is NULL and
then accessing error->message.
Found by scan-build
2020-10-22 17:46:33 +02:00
Matthias Clasen
44c6619660
gtk-demo: Speed up image demo
...
The progressive loading demo here was so slow as to appear
broken. Make it faster, and ensure that it updates regularly.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ef7499a31b
gtk-demo: Add alternative text to a GtkPicture
...
This lets us text GtkPicture a11y support.
2020-10-22 07:51:44 -04:00
Matthias Clasen
80e0e3fe4f
gtk-demo: Set an accessible role
...
Set the expected accessible role on the tagged entry
widget in the demo of the same name. Accessible tools
may decide to ignore widgets that have the wrong role,
so setting an appropriate role is important.
2020-10-19 12:56:50 -04:00
Matthias Clasen
92585b75fa
Fix compiler warnings
2020-10-15 16:33:35 -04:00
Matthias Clasen
0bd5a96d71
gtk-demo: Fix some issues with the multi view demo
...
The nested window was not modal, causing it to be
inoperable. And the nested views within were all
shrunk down to nothingness. Give them some width.
Fixes : #3257
2020-10-15 14:42:43 -04:00
Matthias Clasen
8cf955731f
gtk-demo: Fix up image handling in the clipboard demo
...
Using GtkIconPaintable+GtkPicture is not good for symbolic
icons - they don't get properly colored that way. So change
things around to use the icon name if we have it.
Fixes : #3252
2020-10-15 09:19:17 -04:00
Timm Bäder
20bd8e56ee
gtk4-demo: Add missing margin-bottom
...
This was setting margin-end twice
2020-10-14 15:06:12 -04:00
Timm Bäder
df2d7c56c7
gtk4-demo: Remove connection to removed signal
2020-10-14 15:06:12 -04:00
Timm Bäder
0dc0b03d6f
glarea demo: Add min size to gl area
2020-10-14 15:06:12 -04:00
Matthias Clasen
8a361f901d
gtk-demo: Keep undisplayable resources out of view
...
No point in showing an apologetic tab for a blob of binary data.
gtk4-demo shows the resources under /DEMONAME/ for each demo,
so move the data to /DEMONAME_data/.
2020-10-14 15:05:46 -04:00
Matthias Clasen
2273e27808
gtk-demo: Ellipsize columns in the characters demo
...
some of the columns have uneven widths, causing them
to bounce around as you scroll. Ellipsize them and
give them a fixed with.
2020-10-14 15:05:46 -04:00
Emmanuele Bassi
43300b4047
Tone down a user visible message
...
Self-deprecating humour badly translates to a demo message.
2020-10-09 10:14:41 +01:00
Matthias Clasen
3d9eb61bba
gtk-demo: Fix an off-by-one error
...
This was found by the asan build in our ci.
2020-10-07 15:16:31 -04:00
Matthias Clasen
5a9547da41
gtk-demo: Add an svg paintable demo
...
It is a little annoying that this demo will not show up
if we don't find librsvg, but I think showing how easy
this paintable is outweights the annoyance.
2020-10-06 15:12:09 -04:00
Matthias Clasen
25cbc1a15a
gtk-demo: Recognize .svg as images
...
We can't guarantee that we can load it, but worst
case you'll get a missing image.
2020-10-06 15:11:08 -04:00
Matthias Clasen
67c6f0a08a
gtk-demo: Mention dataset size for Characters
2020-10-05 14:43:38 -04:00
Matthias Clasen
74d99766e4
gtk-demo: Fix up the Characters demo
...
Move the Unicode names to a separate source file,
and only build the demo if we have harfbuzz (since
we use script names, and those are only available
with harfbuzz).
Also, fix a forgotten type name.
2020-10-05 09:56:04 -04:00
Matthias Clasen
5d26d11868
gtk-demo: Add a column view demo
...
Make a column view that is showing some Unicode data.
2020-10-04 22:53:45 -04:00
Matthias Clasen
34f33b36f8
Prevent a crash with script names
...
We can't pass NULL to gettext().
2020-10-04 21:20:48 -04:00
Matthias Clasen
bea3bc5d27
Update the copy in gtk-demo too
2020-10-04 19:48:46 -04:00
Matthias Clasen
8ca612c966
scale: Make draw-value default to FALSE
...
This is rarely what you want, so lets turn it off
by default.
Update the one place in our demos where we want to
draw a value, add support for this to gtk-builder-tool,
add a test and mention this change in the migration
guide.
2020-10-04 08:26:44 -04:00
Matthias Clasen
9a2faf2197
widget-factory: Enable emoji completion somewhere
...
Without a quick way to test this, it is bound to
fall apart. As it has.
2020-10-03 19:41:26 -04:00
Matthias Clasen
5640208f31
node-editor: Don't insert hyphens
...
This can be a bit confusing in multi-line strings.
2020-10-03 13:11:20 -04:00
Matthias Clasen
279d3c08a9
gtk-demo: Rename the transition shader files
...
Easier to find them when their name matches the title
that we show in the UI.
2020-10-03 00:01:25 -04:00
Matthias Clasen
19d760f9dd
gtk-demo: Fix a typo
2020-10-02 23:54:15 -04:00
Matthias Clasen
72eb89eda7
gtk-demo: Add the shader paintable sources
...
This is currently not public GTK api, just part of
the demo. So we should show it here.
2020-09-30 15:41:05 -04:00
Matthias Clasen
fd631937f3
transition demo: Make buttons symbolic
...
It looks better.
2020-09-30 13:43:36 -04:00
Matthias Clasen
77ec961126
Merge branch 'ebassi/for-master' into 'master'
...
demo: Replace g_print with g_debug
See merge request GNOME/gtk!2645
2020-09-30 15:22:57 +00:00
Matthias Clasen
924e510512
gtk-demo: Update text for the transitions demo
...
The fire is gone, but we have wobbly widgets!
2020-09-30 11:19:12 -04:00
Alexander Larsson
d6648871b1
gtk-demo/gltransition: Replace fire background with more mellow blobs
2020-09-30 16:38:50 +02:00
Alexander Larsson
5d4a6940fa
gtk-demo: Use duck in transitions to get some alpha example
2020-09-30 16:25:30 +02:00
Emmanuele Bassi
b0a0f07bd7
demo: Replace g_print with g_debug
...
The GtkGears widget is a bit too chatty, especially when used inside
demos like the fishbowl. Let's use g_debug() instead of g_print() for
the GL debugging message.
2020-09-30 12:35:31 +01:00
Alexander Larsson
e9885f9cde
gtk-demo: Make gltransitions demo a bit snazzier
...
This adds a bunch of snazz to the gltransitions demo. It is perhaps
a bit overloaded now, but it demos everything that we can do.
Changes:
* The fire shader is now not a bin, it just renders an animating
background with no textures involved.
* The stacks don't all start on the same page.
* The shaderbin passes the mouse coordinate to the shader.
* The shaderbin allows specifying a "border" so that you can
cause effects outside the bin child (something that is new to gtk4).
* All the buttons and the stacks are now in shader-bins that runs
a wobbly-widget effect based on the mouse position that
wobbles outside the child allocation.
2020-09-30 11:40:37 +02:00
Alexander Larsson
e76cb3e1e4
gtk-demo: Add a shader paintable to the fishbowl
...
This gets around 500 instances at 60fps on my system.
2020-09-29 09:51:16 +02:00
Alexander Larsson
8bcb031418
gtk-demo: Add GskGLShaderNode demo
...
Add adds a demo showing off GskGLShaderNode in various ways.
It has a transistion widget, using some examples from
gl-transitions.com, with child widgets being both images, a GL area
and real widgets (that let you edit the transition shaders
themselves.
It also has a fancy fire effect on hove on the buttons.
2020-09-29 09:51:16 +02:00
Alexander Larsson
16cdb33c6c
shadertoy demo: Fix GLSL on GLES
...
I was getting "assignment to varying fragColor" errors
2020-09-29 09:51:16 +02:00
Florian Müllner
12189bc10f
buildable: Rename set_name() to set_buildable_id()
...
GtkBuildable's get_name()/set_name() methods may shadow
GtkWidget's methods. Avoid that by renaming the API to
get_buildable_id()/set_buildable_id(), which also reflects
the name of the XML attribute the API refers to.
https://gitlab.gnome.org/GNOME/gtk/-/issues/3191
2020-09-26 02:16:05 +02:00
Matthias Clasen
d5e315c470
gtk-demo: Improve the pickers demo
...
"Two of every kind..." Add some customized pickers
here. This found a number of issues that have been
fixed in the preceding commits.
2020-09-21 11:53:48 -04:00
Matthias Clasen
6b708e9b60
textbuffer: Redo insert markup a little bit
...
Redo the tag insertion function to avoid quadratic
behavior, and at the same time, fix handling of
alpha for color attributes.
Update the copy of this function in gtk4-demo
as well.
2020-09-19 14:17:28 -04:00
Matthias Clasen
a8adbfbc9f
gtk-demo: Cosmetic changes
...
Polish the text view demos a little bit.
2020-09-17 21:38:10 -04:00
Matthias Clasen
cf1ed3a72a
gtk-demo: Fix toggle- vs checkbutton confusion
2020-09-16 23:07:21 -04:00
Matthias Clasen
18e46bd6f8
gtk-demo: Beef up the hypertext demo
...
Its almost a dictionary.
2020-09-16 23:01:49 -04:00
Matthias Clasen
a1e21c1acb
Merge branch 'wip/sadiq/headerbar-demo' into 'master'
...
gtk-demo: Add a switch to headerbar demo
See merge request GNOME/gtk!2571
2020-09-16 23:12:26 +00:00
Matthias Clasen
d71337513f
gtk-demo: Add another demo
...
Show how to add a context menu to a custom widget,
and how to make a GtkPicture lookalike.
2020-09-15 22:40:13 -04:00
Matthias Clasen
e4d29ba9fd
Merge branch 'master.win32' into 'master'
...
Some more fixes for Windows
Closes #3157
See merge request GNOME/gtk!2580
2020-09-15 11:12:27 +00:00
Matthias Clasen
9eb4eef48b
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2582
2020-09-15 11:04:54 +00:00
Chun-wei Fan
c766e31e8f
demos: Fix minesweeper demos on Windows
...
Make sure the callback functions in the .ui files are exported, so that
those functions can be recognized at runtime so that things run
properly.
2020-09-15 15:53:20 +08:00
Timm Bäder
d0f182757a
sizegroup demo: Fix a checkbutton/togglebutton mixup
2020-09-15 05:21:54 +02:00
Matthias Clasen
50400879e0
gtk-demo: Add more detail to the dnd demo text
2020-09-14 17:49:16 -04:00
Matthias Clasen
b20e67dc83
gtk-demo: Add some keywords
...
Make the builder demo show up in searches for toolbar and
menubar.
2020-09-14 17:33:12 -04:00
Matthias Clasen
a3dcfafba6
gtk-demo: Improve the builder demo
...
Make the keyboard shortcuts work.
2020-09-14 17:06:34 -04:00
Matthias Clasen
82ce1a9d6b
gtk-demo: Improve the builder demo
...
Make the toolbar look right.
2020-09-14 16:51:05 -04:00
Matthias Clasen
cc6faeab50
gtk-demo: More space
...
Increase the inter-paragraph spacing in the info
text, to make paragraphs more clearly separated.
2020-09-14 16:21:13 -04:00
Matthias Clasen
aa32613beb
gtk-demo: Cosmetic change
2020-09-14 16:20:52 -04:00
Matthias Clasen
6a3e12cfae
gtk-demo: Add some details
2020-09-14 16:11:11 -04:00
Matthias Clasen
7a2400c8a1
widget-factory: Fix the toggle buttons on page 3
...
They should not both be active initially.
2020-09-14 11:19:39 -04:00
Jakub Steiner
7dd819dffc
icon-browser: use content-view
...
- make content prominent by using content-view style for the main grid.
2020-09-14 14:18:52 +02:00
Mohammed Sadiq
bd900fe8c9
gtk-demo: Add a switch to headerbar demo
...
We don't have any demos with a switch in headerbar.
2020-09-14 17:11:13 +05:30
Matthias Clasen
9f03462ffb
gtk-demo: Improve the scrolling demo
...
Add an fps label to the scrolling demo.
2020-09-13 23:43:45 -04:00
Matthias Clasen
3b11896581
gtk-demo: Impove the fishbowl demo
...
Use tnum for the fps label to avoid jiggling.
2020-09-13 23:43:45 -04:00
Matthias Clasen
c66a8cb941
gtk-demo: Use gdk_frame_clock_get_fps
...
Remove another copy of this code in the theme
switching benchmark.
2020-09-13 23:43:45 -04:00
Matthias Clasen
9d6990fdb9
gtk-demo: Don't offer to run titles
...
When a group is selected (such as 'Benchmark'),
make the run button insensitive - there is nothing
to run.
2020-09-13 17:55:10 -04:00
Matthias Clasen
3f1fa66479
Demo thyself
...
Make gtk-demo show itself as a useful example.
2020-09-13 17:54:58 -04:00
Matthias Clasen
d732c869c2
gtk-demo: Add keywords to demos
...
Add the names of the main widgets as keywords to
our demos, but also things like "game". This helps
finding relevant demos in our growing list. You
can now for example type "label", and find the
"error states" and "links" demos showing GtkLabel
features.
2020-09-13 15:00:14 -04:00
Matthias Clasen
691261c71a
gtk-demo: Support keywords for search
...
Filter the sidebar on keywords that can be provided
by the demos. We extract keywords from the doc comment
at the top of each demo source by looking for words that
look like class names. We also allow to specify keywords
explicitly.
2020-09-13 15:00:14 -04:00
Matthias Clasen
fe6f70efe1
gtk-demo: Ignore some lines in info
...
Ignore lines starting with # in the info comment at
the top of source files. This will be used to add
keywords for search in following commits.
2020-09-13 14:42:03 -04:00
Matthias Clasen
a90801e696
gtk-demo: Add another demo
...
This one is a more or less direct copy of the
settings dialog from widget-factory, demonstrating
error states and builder scopes.
2020-09-13 12:36:30 -04:00
Matthias Clasen
7518fd0d70
gtk-demo: Make F11 toggle fullscreen
...
In the video player demo, we have a button to make
the window fullscreen, but no easy way back. Add
the usual F11 keybinding, to make things at least
somewhat recoverable.
2020-09-13 02:31:41 -04:00
Matthias Clasen
52304fe7da
gtk-demo: Add some example videos
...
Add buttons to show the gtk-logo animation and
the Big Buck Bunny trailer.
2020-09-13 01:51:55 -04:00
Matthias Clasen
8f593827cf
widget-factory: Fix error states demo
...
Fix a corner case of input validation in the settings
dialog.
2020-09-13 00:17:19 -04:00
Matthias Clasen
fc720b57e2
gtk-demo: Don't refer to removed demos
...
The animated background demos was referring to the
pixbuf demo that was removed a while ago. Reword
the text accordingly.
2020-09-13 00:17:19 -04:00
Matthias Clasen
71ea619274
gtk-demo: Add an emblem demo
...
Add a simple demo for adding emblems to icons
using GdkPaintable.
2020-09-11 21:09:41 -04:00
Matthias Clasen
f679ba566e
gtk-demo: Tweak the animated paintable
...
Make it possible to have no background in
the animated paintable. This will be used
in a future demo.
Update all users.
2020-09-11 21:08:36 -04:00
Matthias Clasen
2679e29375
gtk-demo: Fix a few crash
...
The paintable demos were forgetting to clear
their window variable.
2020-09-11 21:07:10 -04:00
Matthias Clasen
93078e52c0
gdk: Rename GdkSurfaceState to GdkToplevelState
...
That is what it is.
Fixes : #2790
2020-09-10 00:39:03 -04:00
Matthias Clasen
d6807b966c
shadertoy demo: Cosmetic fixes
2020-09-08 20:08:23 -04:00
Matthias Clasen
3921476504
Merge branch 'shadertoy-demo' into 'master'
...
gtk-demo: Add shadertoy demo
See merge request GNOME/gtk!2540
2020-09-08 23:47:54 +00:00
Andreas Persson
81c835c418
Fix warning in listview_settings demo
...
Fix a warning introduced when sorter constructors were changed to return
exact types.
2020-09-08 18:48:54 +02:00
Matthias Clasen
cb2b0688ca
Merge branch 'filter-constructors' into 'master'
...
Filter constructors
See merge request GNOME/gtk!2360
2020-09-08 12:58:27 +00:00
Alexander Larsson
0092a08dfc
gtk-demo: Add shadertoy demo
...
This adds a small demo of using OpenGL shaders, it renders a quad
over the entire widget with a custom fragment shader. The coordinates
and the uniform names are compatible with the ones on shadertoy.com
(although some features, like texture inputs are missing currently).
The default shader in the demo is
https://www.shadertoy.com/view/wsjBD3 which is CC0, so it is
redistributable by Gtk+ (most other shaders are CC-BY-NC-SA which
isn't obviously compatible). I also added a set of buttons loading
a few other CC0 shaders I found.
2020-09-08 09:56:25 +02:00
Matthias Clasen
8c8baa9aa6
gtk-demo: Add some comments
...
Add some comments to the math in the transforms demo.
2020-09-06 08:43:58 -04:00
Matthias Clasen
8b38d1895c
gtk-demo: Simplify the constraints demos
...
Give them all a close button in the header.
2020-09-05 22:54:16 -04:00
Matthias Clasen
24389a0ef5
Make sorter constructors return exact types
...
Make functions like gtk_custom_sorter_new() return
the actual type they construct.
Update all callers.
2020-09-05 21:50:15 -04:00
Matthias Clasen
dfabe74c59
Make filter constructors return exact types
...
Make functions like gtk_custom_filter_new() return
the actual type they construct.
Update all callers.
2020-09-05 21:43:42 -04:00
Ahmed Eldemery
cbd3158d91
add a missing comma
2020-09-05 13:49:01 +02:00
Matthias Clasen
c1bf9f3b41
layoutmanager demo: Make icons come out upright
...
Rearrange the vertices so that the icons show
up in the proper orientation.
2020-09-04 13:40:10 -04:00
Benjamin Otte
1a445d79c4
Merge branch 'demo_css_pixbufs_fix' into 'master'
...
gtk-demo: Fix CSS in pixbufs demo
See merge request GNOME/gtk!2529
2020-09-04 14:40:36 +00:00
Björn Daase
3bcbb4a7cc
gtk-demo: Fix CSS in pixbufs demo
2020-09-04 16:14:09 +02:00
Matthias Clasen
acc2516b3c
Add another layout manager demo
...
This demo uses transforms to place icons on a sphere.
2020-09-03 10:09:22 -04:00
Matthias Clasen
fd7a9069ce
Cosmetic improvement to the layout manager demo
...
Give this a better title, since we will have more
than one layout manager demo soon.
2020-09-03 10:09:22 -04:00
Matthias Clasen
b628338db3
list widgets: Simplify the constructors
...
Now that both arguments to the _new_with_factory() constructors
are nullable, there's no good reason to keep a separate _new()
around. Just make gtk_list_view_new() and gtk_grid_view_new()
take both a model and a factory.
2020-09-01 12:24:06 -04:00
Matthias Clasen
8d79a32c50
list widgets: Use selection models in the api
...
Change the apis in GtkListView, GtkColumnView and
GtkGridView to be explicitly about GtkSelectionModel,
to make it obvious that the widgets handle selection.
Update all users.
2020-08-31 17:15:05 -04:00
Matthias Clasen
ccb447da02
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #2777
See merge request GNOME/gtk!2503
2020-08-31 16:30:21 +00:00
Matthias Clasen
b98352de3e
widget-factory: Stop using radio buttons
...
Use grouped toggle buttons for the view switcher
on page 2.
2020-08-30 22:17:31 -04:00
Matthias Clasen
1125a4379c
iconbrowser: Stop using radio buttons
...
Replace them with grouped toggle buttons.
2020-08-30 22:14:05 -04:00
Matthias Clasen
f085ac837c
fontrendering demo: Stop using radio buttons
...
Replace them with grouped toggled buttons.
2020-08-30 22:14:05 -04:00
Matthias Clasen
2c5c938f0d
Clean up uses of gtk_toggle_button_get/set_active
...
Replace all uses on check buttons by the corresponding
check button api.
2020-08-30 21:23:25 -04:00
Matthias Clasen
c9eb497989
gtk-demo: Fix up the fontrendering demo
2020-08-30 21:23:14 -04:00
Matthias Clasen
7a05381825
gtk-demo: Port to font explorer to grouped checkbuttons
...
Stop using radio buttons here.
2020-08-30 17:59:23 -04:00
Matthias Clasen
e21b6a5721
widget-factory: Fix up radio buttons
...
Keep calling them radiobutton, since that is what they are.
And make the insensitive second group of three match what
we have in gtk3-widget-factory, and be parallel to the
insensitive checkbuttons next to it.
2020-08-30 17:59:23 -04:00
Matthias Clasen
c51f69c446
gtk-demo: Cosmetic change to the css shadows demo
...
Make the text view in the bottom take up the bulk
of the window, as it used to be.
2020-08-29 16:42:30 -04:00
Timm Bäder
1375fb4464
Change button hierarchy
...
A radiobutton without indicator is really just a togglebutton with a
group.
A radiobutton with indicator is really just a checkbutton with a group.
Make checkbutton its own widget not inheriting from GtkButton.
GtkRadioButton could be removed but it stays for now.
Radiobutton && !draw-indicator => Togglebutton
Checkbutton && !draw-indicator => Togglebutton
Radiobutton && draw-indicator => CheckButton + group
2020-08-29 16:46:28 +02:00
Timm Bäder
21e2c7fa33
icon-browser: Add .navigation-sidebar to sidebar
2020-08-29 11:11:29 +02:00
Emmanuele Bassi
ebef48f7df
demo: Fix the resource path for css_pixbufs demo
...
Fixes : #3099
2020-08-28 18:39:59 +01:00
Timm Bäder
620388a071
gtk4-demo: Add background to CSS Basics demo
...
So people can at least read the textview contents
2020-08-28 04:35:46 +02:00
nana-4
09fa3886ba
gtk-demo: Avoid double borders in the blendmodes demo
2020-08-25 21:24:10 +09:00
nana-4
bb7d5b2de6
gtk-demo: Avoid double borders in the fontrendering demo
...
Replace the frame with a separator.
2020-08-25 21:24:10 +09:00
nana-4
d906242c78
gtk-demo: Avoid double borders in the dnd demo
...
Replace the frame with a separator.
2020-08-25 21:24:10 +09:00
nana-4
d9e8223b03
gtk-demo: Avoid double borders in the panes demo
...
Using frames for the children of the panes looks bad.
2020-08-25 21:24:10 +09:00
Matthias Clasen
bdaf346128
gtk-demo: Make the color picker demo less boring
...
Maybe the first ever use of the add_palette api.
Surprise, it doesn't work!
2020-08-24 17:19:36 -04:00
Ahmed Eldemery
86acb13057
fix position of radiobutton1
2020-08-23 17:39:17 +02:00
Matthias Clasen
ab5e62ddab
Merge branch 'matthiasc/for-master' into 'master'
...
layoutmanager: Fix the child-widget property
Closes #3080
See merge request GNOME/gtk!2460
2020-08-21 20:45:53 +00:00
Matthias Clasen
936f3f1ad9
Explicitly set grid positions in the ui file
...
We were outsmarted by a combination of gtk-builder-tool
removing default values and GtkGrid guessing good values
for omitted properties.
Fixes : #3080
2020-08-21 16:22:59 -04:00
Björn Daase
6315cd977c
*: Fix spelling mistakes found by codespell
2020-08-21 15:29:34 +02:00
Jakub Steiner
dd2e1e4867
Merge branch 'wip/jimmac/rich-list-styling' into 'master'
...
Adwaita: rich-list styling
See merge request GNOME/gtk!2456
2020-08-20 20:58:31 +00:00
Jakub Steiner
5f630481db
Adwaita: rich-list styling
...
FIXME: why is the second list in Demo>List Box>Controls taller?
https://gitlab.gnome.org/GNOME/gtk/-/issues/3073
2020-08-20 19:39:18 +02:00
Matthias Clasen
8acd60fda9
widget-factory: Improve the error states example
...
Elaborate the error state handling, and make it show
delayed states in GtkSwitch too.
2020-08-19 13:22:44 -04:00
Matthias Clasen
fa0a88ae22
Merge branch 'api-touchups' into 'master'
...
Api touchups
See merge request GNOME/gtk!2439
2020-08-14 12:47:50 +00:00
Matthias Clasen
ae7cefd97d
Drop style class defines
...
We document the supported style classes by name,
not by macro name, and these macros don't really
add any value. Drop them for GTK 4.
2020-08-14 07:03:27 -04:00
Matthias Clasen
0ae7f794a3
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Fix the builder demo
See merge request GNOME/gtk!2437
2020-08-13 23:44:58 +00:00
Matthias Clasen
15bd2a2a5c
Merge branch 'fix_expander_demo' into 'master'
...
fix resource not found in expander demo
See merge request GNOME/gtk!2436
2020-08-13 23:08:09 +00:00
Matthias Clasen
005f9a995e
gtk-demo: Fix the builder demo
...
The about dialog here wasn't working.
At the same time, make the statusbar
useful for something by showing our
action messages there.
2020-08-13 17:19:59 -04:00