Commit Graph

71522 Commits

Author SHA1 Message Date
Luca Bacci
8338e55549
GdkWin32: Use a signed integral type for the DPI scale 2021-11-07 19:01:32 +01:00
Yuri Chornoivan
4a356ae331 Update Ukrainian translation 2021-11-06 04:16:55 +00:00
Benjamin Otte
4f4f2d169a Merge branch 'wip/otte/for-master' into 'master'
boxlayout: Be more careful with what to consider natural size

See merge request GNOME/gtk!4129
2021-11-06 03:54:08 +00:00
Benjamin Otte
577d520006 reftests: Add reftest for last 2 issues
Use a label that is long enough to require wrapping and force it into a
hardcoded width. Use a sentence where all the words have the same size
to not get unwanted wrapping behavior.

Also append a 2nd row to check that the first row gets the proper height
allocated.

Found by Marco Melorio.
2021-11-06 04:30:50 +01:00
Benjamin Otte
222d6f1db1 label: Don't deduce label width from logical rect
The width of a logical rect after line breaking is sometimes not
wide enough to cause line breaking to break at the exact same points.
(Is that by design or a bug in Pango? I don't know.)

So don't use the width, and only relyon values we actually set to
pango_layout_set_width().
2021-11-06 03:15:04 +01:00
Benjamin Otte
4ffa60be50 boxlayout: Be more careful with what to consider natural size
Don't just use the natural size as the max size, the natural size
is the ideal size, not necessarily the maximum size.

Also check the nat size for opposite min size.
2021-11-06 00:56:55 +01:00
Matthias Clasen
7da72d1295 Merge branch 'remove_some_unused_declarations' into 'master'
remove some unused declarations

See merge request GNOME/gtk!4125
2021-11-05 23:08:56 +00:00
Matthias Clasen
c9735e8ea9 Merge branch 'wip/baedert/for-master' into 'master'
paned: Don't pass values < -1 to gtk_widget_measure()

Closes #4404

See merge request GNOME/gtk!4126
2021-11-05 23:08:28 +00:00
Benjamin Otte
8a7868d006 Merge branch 'wip/otte/for-master' into 'master'
Revert "label: Never measure more than max-width-chars"

Closes #4399

See merge request GNOME/gtk!4120
2021-11-05 22:11:00 +00:00
Benjamin Otte
c4e5242be0 picture: Setting can-shrink requires a resize
So queue one.
2021-11-05 20:51:00 +01:00
Matthias Clasen
935f7f19f3 Merge branch 'yurchor-master-patch-77064' into 'master'
Fix minor typo: Unsupportd -> Unsupported

See merge request GNOME/gtk!4127
2021-11-05 19:41:05 +00:00
Benjamin Otte
5c9ae28937 boxlayout: Compute opposite size properly
For size -1 in the opposite orientation, GtkBoxLayout used to measure
the children based on their min size in the box's orientation instead of
-1. That wasn't really intended, but was a side effect of how the sizing
code did (not) distribute extra size above the minimum size.

This is clearly not what we want.
What we want is measuring the orientation as is for size -1. Then we
want to just take the maximum of all children and use that.

A reftest is incldued that ensures a vbox wraps a label just like an
hbox does.
2021-11-05 20:30:49 +01:00
Benjamin Otte
8e27fc7f9b label: Redo measure() code
The old code couldn't properly do height-for-width because it only
computed the widest and smallest layout instead of looking at the actual
passed in for-size.

The label-sizing reftest has been adapted as the label code is now smart
enough to always display the whole text and no longer requests a too
small width-for-single-row when wrapping.
2021-11-05 20:29:42 +01:00
Yuri Chornoivan
e0c97e6fcc Update Ukrainian translation 2021-11-05 18:46:16 +00:00
Yuri Chornoivan
e80d938ee5 Fix minor typo: Unsupportd -> Unsupported 2021-11-05 18:42:20 +00:00
Matthias Clasen
a6f1737861 Merge branch 'wip/carlosg/no-ping-serials-for-input' into 'master'
gdk/wayland: Do not use xdg_wm_base.ping serials as "user input" serials

See merge request GNOME/gtk!4122
2021-11-05 18:34:02 +00:00
Yuri Chornoivan
c78ed25e30 Update Ukrainian translation 2021-11-05 18:31:16 +00:00
Timm Bäder
c87d1c2fb9 paned: Don't pass values < -1 to gtk_widget_measure()
Fixes #4404
2021-11-05 17:41:42 +01:00
Caolán McNamara
c66d24b41a remove some unused declarations 2021-11-05 14:03:47 +00:00
Carlos Garnacho
c5ac80be2b gdk/wayland: Do not use xdg_wm_base.ping serials as "user input" serials
Ping/pong serials are not meant to be interpreted as user input serials
(e.g. those given back later to the compositor on grabs). As a matter
of fact, Mutter uses a different count (i.e. timestamps) in these, so
using these serials may confuse the compositor into denying certain
operations like DnD.
2021-11-05 14:42:53 +01:00
Benjamin Otte
53acff167b Revert "label: Never measure more than max-width-chars"
This reverts commit ba44e7a228.

The change was meant to revert to old GTK3 behavior but it actually
broke new GTK4 behavior that is in use where max-width-chars is used to
determine an ideal size, but where we don't want to limit the width to
that size.

So what happens is the reintroduction of GTK3-style lots of whitepsace
bugs, and we really don't want those.

We also don't want to break backwards compat if we can avoid it.

So let's revert this.

The reftest that was made for this purpose has been adapted.

Fixes #4399
2021-11-05 06:12:33 +01:00
Matthias Clasen
9c1a41052b Merge branch 'ebassi/cross-bundle' into 'master'
build: Don't use ld when cross-compiling

See merge request GNOME/gtk!4121
2021-11-04 18:11:40 +00:00
Emmanuele Bassi
a1861112ee build: Don't use ld when cross-compiling
We can't guarantee anything on the target toolchain, in that case.
2021-11-04 13:41:35 +00:00
Matthias Clasen
b2a1fb7149 Merge branch 'taozuhong-master-patch-22982' into 'master'
Make dialog content_area box as vertical, keep compatibility with GTK3

See merge request GNOME/gtk!4119
2021-11-04 11:06:44 +00:00
TAO ZUHONG
db2a03ed33 Update gtk/ui/gtkdialog.ui 2021-11-04 08:25:03 +00:00
TAO ZUHONG
9e8bf10653 Make dialog content_area box as vertical, keep compatibility with GTK3 2021-11-04 08:23:04 +00:00
Matthias Clasen
c20a631ab7 Merge branch 'listview-sink-adjustment' into 'master'
listbase: Sink adjustments

Closes #4403

See merge request GNOME/gtk!4117
2021-11-04 01:58:56 +00:00
Matthias Clasen
8c63244855 Merge branch 'activate-signal-dropdown-combobox' into 'master'
Add activate signal to DropDown and ComboBox

See merge request GNOME/gtk!3935
2021-11-04 01:19:43 +00:00
Matthias Clasen
9a31922709 Merge branch 'reftest-no-blink' into 'master'
testsuite: Set GDK_DEBUG unconditionally

See merge request GNOME/gtk!4116
2021-11-04 01:15:31 +00:00
Matthias Clasen
3c2818b30a listbase: Sink adjustments
gtk_adjustment_new returns floating objects.
Sink them.

Fixes: #4403
2021-11-03 21:09:37 -04:00
Matthias Clasen
e017e4252b reftest: No blinking, please
Blinking cursors aren't helpful when we want to
compare renderings pixel-by-pixel. Turn them off.
2021-11-03 20:43:01 -04:00
Matthias Clasen
97365a8ffe reftest: Stop setting GDK_RENDERING
That environment variable isn't used anymore.
2021-11-03 20:40:22 -04:00
Matthias Clasen
df12a41cbb testsuite: Set GDK_DEBUG unconditionally
The default-settings key works in non-debug builds
too, nowadays.
2021-11-03 20:39:33 -04:00
Maximiliano Sandoval R
0aa3a7e71c
combo_box: Use mnemonic_activate on override
This is changing the existing behavior where the mnemonic activation
would just grab the focus of the button, this was the behavior in GTK 3.
2021-11-04 00:48:05 +01:00
Maximiliano Sandoval R
3918cdd989
dropdown: Make DropDown activatable
The activation is simply forwarded to the button
within.
2021-11-04 00:47:02 +01:00
Maximiliano Sandoval R
c4df987eef
combobox: Make combo box activatable
The activation is simply forwarded to the button
within.
2021-11-04 00:46:47 +01:00
Benjamin Otte
c125ffb384 Merge branch 'wip/otte/for-master' into 'master'
egl: Set the draw buffer to GL_BACK_LEFT

Closes #4402

See merge request GNOME/gtk!4114
2021-11-03 22:22:30 +00:00
Benjamin Otte
6536e3dc54 macos: Fix return value 2021-11-03 22:53:59 +01:00
Benjamin Otte
164d0a5201 gdk: #if => #ifdef
Makes compilers happy
2021-11-03 22:53:59 +01:00
Benjamin Otte
95574f98c4 gl: Use GL_BACK_LEFT
The spec doesn't allow GL_BACK, but many drivers do. Use the
spec-accepted equivalent instead.

Fixed #4402
2021-11-03 22:53:59 +01:00
Benjamin Otte
bca77b5505 egl: Set the draw buffer to GL_BACK_LEFT
Instead of using GL_BACK, use GL_BACK_LEFT, because the spec demands
this (many drivers don't).

Also move the call from the GDK backends into the GLContext code, as
this is a generic EGL issue (nvidia being the main driver in need of
this call, see 9c4c4eaaa1 for a longer
discussion).

Fixes #4402
2021-11-03 22:53:59 +01:00
Matthias Clasen
37cbd0662e Merge branch 'small-check' into 'master'
icon: revert object-symbolic check to be smaller

See merge request GNOME/gtk!4110
2021-11-01 19:38:55 +00:00
Tobias Bernard
9b23602806 icon: revert object-symbolic check to be smaller
The larger check works well in the headerbar, but not inline in various UI elements. This reverts the larger check since the latter is more common. For selection mode, a separate larger icon (selection-mode-symbolic) has been added to adwaita-icon-theme.
2021-11-01 18:54:22 +01:00
Matthias Clasen
68f2e1bc06 Merge branch 'ci-require-macos' into 'master'
Revert "ci: Allow macos to fail"

See merge request GNOME/gtk!4109
2021-11-01 15:22:53 +00:00
Matthias Clasen
bc80eb616d Revert "ci: Allow macos to fail"
This reverts commit b7cab5c5eb.

We welcome the macos runner back.
2021-11-01 10:33:09 -04:00
Emmanuele Bassi
d005049084 Merge branch 'build-fix' into 'master'
build: Collect gi-docgen's common arguments

See merge request GNOME/gtk!4108
2021-11-01 13:27:13 +00:00
Emmanuele Bassi
142571d0b8 build: Collect gi-docgen's common arguments
And only enable `--fatal-warnings` if `-Dwerror` has been set, just like
we do for the introspection data generation.
2021-11-01 13:00:51 +00:00
Emmanuele Bassi
5cc6b3e342 docs: Add missing annotation 2021-11-01 12:54:35 +00:00
Emmanuele Bassi
49032b4b63 docs: Fix link to g_signal_emit() 2021-11-01 12:54:07 +00:00
Timm Bäder
1903c6d009 Merge branch 'fix_typo' into 'master'
fix typo in GtkDragSource doc

See merge request GNOME/gtk!4107
2021-11-01 06:42:54 +00:00