Benjamin Otte
b37c2216fc
testsuite: Add empty node tests
...
For every node type, add a test that creates it empty and ensure that
it prints the reference output.
2019-05-21 06:43:59 +02:00
Benjamin Otte
b90a66cab5
rendernodeparser: Allow parsing strings
...
Instead of only allowing for glyph indexes, allow ASCII characters as
replacements. So this glyph sequence
glyphs: 65 8, 66 8, 67 8
Can be replaced by
glyphs: "ABC"
provided that the glyph for "A", "B" and "C" are 65, 66 and 67
respectively and their advance is exactly 8.
x offset and y offset must always be 0 and every glyph must start a
cluster.
2019-05-21 06:43:59 +02:00
Benjamin Otte
1a65a6ce76
rendernodeparser: Update to new rules
...
Update to the docs outlined in #1887 .
In particular, the changes do:
1. Require no property, have a working default for everything
2. Be clear about what gets printed and how.
Tests ahve been adapted to still pass.
2019-05-21 06:43:59 +02:00
Benjamin Otte
678aa8088f
rgba: Add GDK_RGBA() macro
...
So far it's private, but it's a pretty cute way to use hex colors, so we
might conside making it public.
2019-05-21 06:43:59 +02:00
Benjamin Otte
a1d08b4b52
rendernode: Take a graphene_point_t for the offset
...
... instead of 2 floats.
2019-05-21 06:43:59 +02:00
Benjamin Otte
0fd0be4f9a
testsuite: Redo node-parser
...
Base the rewrite on testsuite/css/parser/test-css-parser - we now
require the node file to match a reference node and track the errors it
triggers.
We also no longer use gtester.
2019-05-21 06:43:59 +02:00
Benjamin Otte
20d1bc2ccc
rendernodeparser: Skip root node when it's a container
...
When printing, behave the same way as when parsing:
Magically skip a container node if there is one - just like the
parser magically creates a container node to hold all the nodes
it parses.
2019-05-21 06:43:59 +02:00
Benjamin Otte
ed0ecf0ff0
rendernodeparser: Allow single values instead of 4
...
This allows writing:
colors: red;
instead of
colors: red red red red;
to draw a red border.
2019-05-21 06:43:59 +02:00
Benjamin Otte
c8fc40e793
rendernodeparser: Print properties alphabetically
...
Because now we have a rule.
Also update some tests to the new order.
2019-05-21 06:43:59 +02:00
Benjamin Otte
6c473d5ff7
glrenderer: Handle NULL debug messages
2019-05-21 06:43:59 +02:00
Matthias Clasen
fc2dc82b70
gtk-demo: Fix menubutton usage in listbox demo
...
Menu buttons are no longer buttons, so they
can't have children, and don't have a relief
property.
2019-05-21 00:04:24 +00:00
Matthias Clasen
5327799046
inspector: Don't apply button api to menu buttons
2019-05-20 23:33:45 +00:00
Timm Bäder
aa922f0779
gl renderer: Pass correct matrix category when rendering offscreen
...
We can't just pretend we have an identity matrix when we are actually
scaling. This fixes the node editor sometimes not drawing things when
rendering to a texture. We were mistakenly discaring render nodes
because the bounds transformation was wrong.
2019-05-20 12:10:12 +02:00
Timm Bäder
7e502d0752
gl renderer: Delete render_texture framebuffer
2019-05-20 11:08:50 +02:00
Timm Bäder
6a69dc6e5d
gl renderer: A GdkGLTexture's context might be NULL
...
gdk_gl_texture_download ought to still work, but we can't make a NULL
context current obviously.
2019-05-20 09:33:55 +02:00
Timm Bäder
5aa531674e
gl renderer: Really fix gl debugging code
...
Properly label an object and make sure we have the right gl context even
after a gdk_gl_context_end_frame call.
2019-05-20 08:47:41 +02:00
Matthias Clasen
322507f24c
builder-tool: Remove debug spew
2019-05-20 00:04:57 +00:00
Matthias Clasen
0a217cdd39
x11: Remove to unused settings
...
We no longer have settings for gtk-button-images
or gtk-menu-images.
2019-05-19 17:12:37 -04:00
Matthias Clasen
a798e2ff5e
lock button: Don't allow subclassing
2019-05-19 17:12:24 -04:00
Matthias Clasen
c8a901c1dc
link button: Don't allow subclassing
2019-05-19 21:05:40 +00:00
Matthias Clasen
825b48911b
Fix a compiler warning
2019-05-19 16:46:07 -04:00
Matthias Clasen
56e93332d8
popover menu: Make not subclassable
2019-05-19 16:46:07 -04:00
Matthias Clasen
cbab83b843
popover: Cosmetics
...
Use the same amount of padding as everywhere else.
2019-05-19 20:34:49 +00:00
Matthias Clasen
2dec0b8d7f
volume button: Don't allow subclassing
...
If you want to subclass, there's GtkScaleButton.
2019-05-19 20:34:13 +00:00
Matthias Clasen
8c1bce72d5
settings: Drop the priv pointer
2019-05-19 20:04:47 +00:00
Matthias Clasen
ced07b92a2
application window: Drop the priv pointer
2019-05-19 19:52:34 +00:00
Matthias Clasen
d9626820e9
sizegroup: Drop the priv pointer
2019-05-19 19:22:53 +00:00
Matthias Clasen
f6dc6bed07
settings: Make not subclassable
...
Part of being more explicit about what
we allow to be subclassed and what not.
2019-05-19 15:13:19 -04:00
Matthias Clasen
8808e194cf
Forgotten file
2019-05-19 15:09:36 -04:00
Matthias Clasen
be40ecbfe6
shortcuts window: Make not subclassable
...
Part of being more explicit about what
we allow to be subclassed and what not.
2019-05-19 19:03:49 +00:00
Matthias Clasen
c31eadc3a1
css provider: Make not subclassable
...
Part of being more explicit about what
we allow to be subclassed and what not.
2019-05-19 18:41:33 +00:00
Matthias Clasen
963152a85a
size group: Make not subclassable
...
Part of being more explicit about what
we allow to be subclassed and what not.
2019-05-19 17:49:07 +00:00
Matthias Clasen
f656d38e59
password entry: Make not subclassable
...
Part of being more explicit about what
we allow to be subclassed and what not.
2019-05-19 13:29:37 -04:00
Matthias Clasen
3250e703b6
Padding review
...
Ensure that the class structs of all subclassable
types have sufficient padding (standardizing on 8
slots, here).
GtkBox
GtkButton
GtkDrawingArea
GtkFixed
GtkFrame
2019-05-19 17:18:48 +00:00
Matthias Clasen
54530334f4
Revert "wayland: Make popups work more than once"
...
This reverts commit e74c655016
.
2019-05-19 16:50:49 +00:00
Matthias Clasen
2c9a1f8b6c
message dialog: Make not subclassable
...
Part of being more explicit about what
we allow to be subclassed and what not.
2019-05-19 16:49:45 +00:00
Matthias Clasen
bd6c4a0dec
Padding review
...
Ensure that the class structs of all subclassable
types have sufficient padding (standardizing on 8
slots, here).
GtkApplication
GtkWidget
GtkContainer
GtkWindow
GtkDialog
GtkApplicationWindow
GtkToolItem
GtkBin
2019-05-19 16:24:44 +00:00
Matthias Clasen
eed37cd59a
Cosmetic changes
...
Use new-style padding for GdkContentProviderClass.
2019-05-19 16:20:15 +00:00
Matthias Clasen
68f2cd1f09
Trivial: Remove a few +'s
2019-05-19 15:29:04 +00:00
Matthias Clasen
d4f6bfbdad
Merge branch 'frame-pixel-counter' into 'master'
...
profiling: Add a counter for pixels drawn per frame
See merge request GNOME/gtk!855
2019-05-19 15:20:52 +00:00
Matthias Clasen
e74c655016
wayland: Make popups work more than once
...
The change to keep some server resources around
until destroy was causing us to not recreate
the right things when a surface is hidden and
then shown again. Make sure to recreate everything.
2019-05-19 04:43:16 +00:00
Matthias Clasen
3030e887a4
widget-factory: menu buttons can't have children
...
GtkMenuButton is no longer a container, so we
can't pack children in it.
2019-05-19 04:15:49 +00:00
Benjamin Otte
c878168b8d
Merge branch 'wayland-surface-unmap' into 'master'
...
wayland: Keep some resources until destroy
Closes #1485
See merge request GNOME/gtk!857
2019-05-18 19:24:47 +00:00
Matthias Clasen
f2d598b9a1
wayland: Keep some resources until destroy
...
The Wayland backend was dropping _all_ serverside
resources on hide, which is too early e.g. for
GtkGLArea which wants to use egl resources to
unload textures on unrealize.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1485
2019-05-18 19:15:47 +00:00
Matthias Clasen
74eea6511f
Merge branch 'button-clicked' into 'master'
...
Drop gtk_button_clicked
See merge request GNOME/gtk!856
2019-05-18 19:13:49 +00:00
Matthias Clasen
bcfff5e469
Drop gtk_button_clicked
...
This is not an api we want to propagate anymore.
If you need to, you can still emit the "clicked"
action signal on a button using g_signal_emit_by_name.
2019-05-18 14:33:41 -04:00
Matthias Clasen
5368f98dd5
demos: Stop using gtk_button_clicked
2019-05-18 14:33:41 -04:00
Matthias Clasen
cf47bb9355
gtk: Stop using gtk_button_clicked
...
This function is going away.
2019-05-18 14:27:09 -04:00
Matthias Clasen
6c9d50a013
profiling: Add a counter for pixels drawn per frame
...
This number clearly shows the recently discovered
"full redraws" problem.
2019-05-18 18:04:35 +00:00
Benjamin Otte
6e2df85ec8
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
Closes #1900
See merge request GNOME/gtk!854
2019-05-18 15:19:29 +00:00