Georges Basile Stavracas Neto
02bb23486f
filechooserwidget: Return an id in get_choice()
...
gtk_file_chooser_widget_get_choice() is supposed to return the option
id of the choice, but it currently is returning the option label.
Return the option id instead.
2021-09-18 00:22:05 -03:00
Georges Basile Stavracas Neto
bc0d9488ee
filechooserwidget: Match choice id from "options"
...
When choices are added to the file chooser widget, the options of
that choice are stored object data under the "options" key. However,
gtk_file_chooser_widget_set_choice() was checking for "choices".
Retrieve the options from the "options" key stored data object data.
2021-09-18 00:20:42 -03:00
Matthias Clasen
5742483422
Add more transform tests
...
Test gsk_transform_to_2d.
2021-09-17 22:37:08 -04:00
Matthias Clasen
7f2cb1138a
Merge branch 'static-analysis-fixes' into 'master'
...
label: Remove a dead assignment
See merge request GNOME/gtk!3972
2021-09-18 02:22:21 +00:00
Matthias Clasen
1289e68931
gsk: Add skew transforms
...
Add gsk_transform_skew() to make our transform
api more complete wrt to what you would expect
for a graphics api.
2021-09-17 22:07:26 -04:00
Matthias Clasen
9e6adaa913
transform: Add sections
...
This makes the code easier to navigate (for me).
2021-09-17 22:07:26 -04:00
Matthias Clasen
9cfce67d0f
textview: Remove a dead store
...
Pointed out by clang.
2021-09-17 22:06:21 -04:00
Matthias Clasen
295d406207
listitemmanager: Add a few assertions
...
This might help poor static analyzers.
2021-09-17 22:06:21 -04:00
Matthias Clasen
ece5fd7db5
Merge branch 'more-glyph-drawing-fixes' into 'master'
...
ngl: Use exact device scales for glyphs
See merge request GNOME/gtk!3971
2021-09-18 00:26:14 +00:00
Matthias Clasen
c4e558da46
imcontextsimple: Rewrite a function slightly
...
This hopefully avoids upsetting static analyis.
2021-09-17 20:02:12 -04:00
Matthias Clasen
be1a60d5d0
label: Remove a dead assignment
...
It may have quieted gcc at some point, but
it upsets clang nowadays. Remove it.
2021-09-17 19:54:16 -04:00
Matthias Clasen
a1adaac69b
Merge branch 'glyph-clipping-fixes' into 'master'
...
gtk-demo: Improve ink extents rendering
See merge request GNOME/gtk!3969
2021-09-17 23:31:41 +00:00
Matthias Clasen
7e4b2b971f
Revert "gsk: Stop enlarging text bounding boxes"
...
This reverts commit 87af45403a
.
I've found that this change is needed to ensure that the
bounding boxes of text nodes encompass all the glyphd drawing.
Without it, we overdraw the widget boundaries and cut off
glyphs.
2021-09-17 19:11:06 -04:00
Matthias Clasen
c6cacd2b2d
ngl: Use exact device scales for glyphs
...
We are rendering the glyphs on a larger surface,
and we should avoid introducing unnecessary
rounding errors here. Also, I've found that
we always need to enlarge the surface by one
pixels in each direction to avoid cutting off
the tops of large glyphs.
2021-09-17 19:07:55 -04:00
Matthias Clasen
2c8e55605b
gtk-demo: Improve ink extents rendering
...
Show the pixel-aligned ink rectangle, so we can
see that it includes all the pixels that are inked.
2021-09-17 16:29:30 -04:00
Matthias Clasen
06db477847
gtk-demo: Fix non-circular buttons
2021-09-17 15:24:26 -04:00
Matthias Clasen
e9cf8c6cc7
Merge branch 'glyph-clipping-fixes' into 'master'
...
gsk: Stop enlarging text bounding boxes
See merge request GNOME/gtk!3968
2021-09-17 18:35:41 +00:00
Matthias Clasen
aad6b2d279
Merge branch 'wip/otte/for-master' into 'master'
...
icontheme: Fix variable mixup leading to crashes
Closes #4269
See merge request GNOME/gtk!3967
2021-09-17 18:06:30 +00:00
Benjamin Otte
cf3830704b
icontheme: Fix variable mixup leading to crashes
...
Note: Don't have 2 variables named "icon" and "gicon", you will screw
them up.
reftests included.
Fixes #4269
2021-09-17 17:41:13 +00:00
Matthias Clasen
d962360fa0
Fix glyph cache entry sizing
...
The subpixel-positioned glyph extends on both sides.
2021-09-17 13:38:29 -04:00
Matthias Clasen
76d31ff04b
Merge branch 'menu_button_a11y_improvements' into 'master'
...
Set correct accessible relations for GtkMenuButton
Closes #4254
See merge request GNOME/gtk!3950
2021-09-17 16:51:52 +00:00
Matthias Clasen
87af45403a
gsk: Stop enlarging text bounding boxes
...
This should not be necessary and only serves
to make the actual bugs harder to find.
2021-09-17 12:37:36 -04:00
Emmanuele Bassi
15ffd49efb
Apply 4 suggestion(s) to 1 file(s)
2021-09-17 16:26:00 +00:00
Matthias Clasen
37a54eb9fc
Merge branch 'matthiasc/for-master' into 'master'
...
gsk: Add a test for transform_bounds
See merge request GNOME/gtk!3966
2021-09-17 16:22:04 +00:00
Matthias Clasen
63647cace0
testsuite: Run the clipboard test in isolation
...
We can't have other test pop up windows, and possibly
stealing focus and preventing us from getting data
offers. So, run the clipboard test in isolation.
2021-09-17 11:38:28 -04:00
Matthias Clasen
bef54a382d
transform: Improve docs
...
Add an example for reconstructing transforms.
2021-09-17 10:28:49 -04:00
Matthias Clasen
6a60214e8c
gsk: Handle 2D transforms better
...
For 2D transforms, we can read the scale
factors more directly off the matrix.
This should eventually be moved out into a
function to decompose a 2D transform into
scale + rotation + skew + translation.
2021-09-17 10:28:49 -04:00
Matthias Clasen
27d662f1aa
node editor: Preserve aspect ratio
...
We don't want to distort our rendering.
Tell the paintable to keep the aspect
ratio.
2021-09-17 10:28:49 -04:00
Matthias Clasen
52a8492887
rendernodepaintable: Provide accurate aspect ratio
...
Since we report width and height as integers, the
default implementation of this introduces rounding
errors. This shows up in the node-editor, as having
uneven scale factors like sx=1.0 and sy=1.0035.
Text nodes don't handle uneven scales like that well
and overdraw.
2021-09-17 10:28:49 -04:00
Lukáš Tyrychtr
ba5d010e39
Delete unneccessary comment and make other more descriptive
2021-09-17 15:11:26 +02:00
Matthias Clasen
8c34dd58c0
gsk: Add a test for transform_bounds
2021-09-17 07:43:07 -04:00
Matthias Clasen
0cce92ab19
Merge branch 'fix-typo' into 'master'
...
gtkcolorbutton: Fix documentation
See merge request GNOME/gtk!3965
2021-09-17 10:52:59 +00:00
James Westman
f95c21b67c
gtkcolorbutton: Fix documentation
2021-09-16 23:53:42 -05:00
Benjamin Otte
1d41dc716e
Merge branch 'image-loading' into 'master'
...
Image loaders
See merge request GNOME/gtk!3939
2021-09-17 03:13:38 +00:00
Benjamin Otte
3914ecbd0f
gtk-demo: Use textures in listbox example
2021-09-17 04:31:46 +02:00
Benjamin Otte
0428d8ccd6
examples: Use textures over pixbufs
2021-09-17 04:31:46 +02:00
Benjamin Otte
37a7c6780a
icontheme: Implement gtk_icon_theme_lookup_by_gicon() for textures
...
More feature parity.
Before this, it would have worked just as well - just going via a PNG
bytes step inbetween.
2021-09-17 04:31:46 +02:00
Benjamin Otte
1b85b5597b
texture: Implement GIcon and GLoadableIcon
...
This is mainly for feature parity with GdkPixbuf. And it doesn't hurt
anyone (I hope).
2021-09-17 04:31:46 +02:00
Benjamin Otte
fae32846c7
texture: Refactor gdk_texture_new_from_bytes()
...
1. Split into a real loader and a fake one
2. Only try the fake one if the real one doesn't support the file.
2021-09-17 04:31:46 +02:00
Benjamin Otte
b271a94f92
texture: Rework error enum
...
1. Change INSUFFICIENT_MEMORY to TOO_LARGE
GTK crashes on insufficient memory, we don't emit GErrors.
2. Split UNSUPPORTED into UNSUPPORTED_CONTENT and UNSUPPORTED_FORMAT
So we know if you need to find an RPM with a loader or curse and
the weird file.
3. Translate error messages, they are meant for end users.
2021-09-17 03:25:35 +02:00
Benjamin Otte
e58f70d7bb
pixbufutils: Don't hardcode formats
...
Just let the loaders figure out the file format themselves.
2021-09-17 02:34:15 +02:00
Benjamin Otte
4fcf54757f
icontheme: Insist that people provide proper values
...
Seriously...
2021-09-17 02:29:59 +02:00
Benjamin Otte
b5da07f0e1
icontheme: Use textures more
...
We were going via GLoadablieIcon/GInputStream for everything previously
and we have no API for that with GdkTexture.
With this commit, gdk-pixbuf isn't used anymore when starting
widget-factory for anything but SVG.
2021-09-17 02:12:07 +02:00
Benjamin Otte
a85f4ec6c2
icontheme: Load textures directly when possible
...
This doesn't fix the codepaths for SVG (both for recoloring and
resizing) and doesn't handle streams yet.
2021-09-17 02:02:51 +02:00
Matthias Clasen
b226478e8b
Support 16bit formats in the png loader
...
When loading, convert all >8-bit data to
GDK_MEMORY_R16G16B16A16_PREMULTIPLIED.
When saving, save all 8-bit formats as 8-bit RGBA,
and save all >8-bt formats as 16-bit RGBA.
2021-09-17 02:02:51 +02:00
Matthias Clasen
14280b5f5b
contentdeserializer: Use our on jpeg loader
2021-09-17 02:02:51 +02:00
Matthias Clasen
e720f9d35d
Add code to save jpegs
2021-09-17 02:02:51 +02:00
Matthias Clasen
fecb31b706
builder: Stop using pixbufutils
...
We can just use gdk_pixbuf_new_from_resource here.
2021-09-17 02:02:51 +02:00
Matthias Clasen
729ad8e64a
cssimageurl: Just create a texture directly
...
We don't need to use the pixbufutils api here.
2021-09-17 02:02:51 +02:00
Matthias Clasen
dcd873a6d8
builder: create textures without pixbufs
...
Load textures using the GdkTexture apis, without
going through a pixbuf first.
2021-09-17 02:02:51 +02:00