Commit Graph

64153 Commits

Author SHA1 Message Date
Matthias Clasen
cf2d6f6ec5 dropdown: Style fixups
Make the dropdown popover have a .menu style class,
and add padding to the rows in the popover. Also,
make the popover left-aligned with the button.
2020-06-15 10:25:31 -04:00
Alexander Larsson
1443ef85be Merge branch 'final-frame-clock-work' into 'master'
Final frame clock work

See merge request GNOME/gtk!2087
2020-06-15 10:27:02 +00:00
Yariv Barkan
887aa2abdd frame clock: fix scheduling
Fix scheduling of the frame clock when we don't receive "frame drawn"
messages from the compositor.

If we received "frame drawn" events recently, then the "smooth frame
time" would be in sync with the vsync time. When we don't receive frame
drawn events, the "smooth frame time" is simply incremented by constant
multiples of the refresh interval. In both cases we can use this smooth
time as the basis for scheduling the next clock cycle.

By only using the "smooth frame time" as a basis we also benefit from
more consistent scheduling cadence. If, for example, we got "frame
drawn" events, then didn't receive them for a few frames, we would still
be in sync when we start receiving these events again.
2020-06-15 08:54:18 +02:00
Yariv Barkan
9c5d6eaa71 frame clock: adjust reported frame time
When an animation is started while the application is idle, that often
happens as a result of some external event. This can be an input event,
an expired timer, data arriving over the network etc. The result is that
the first animation clock cycle could be scheduled at some random time,
as opposed to follow up cycles which are usually scheduled right after a
vsync.

Since the frame time we report to the application is correlated to the
time when the frame clock was scheduled to run, this can result in
uneven times reported in the first few animation frames. In order to fix
that, we measure the phase of the first clock cycle - i.e. the offset
between the first cycle and the preceding vsync. Once we start receiving
"frame drawn" signals, the cadence of the frame clock scheduling becomes
tied to the vsync. In order to maintain the regularity of the reported
frame times, we adjust subsequent reported frame times with the
aforementioned phase.
2020-06-15 08:54:17 +02:00
Yuri Chornoivan
c49318e973 Update Ukrainian translation 2020-06-15 06:33:54 +00:00
Matthias Clasen
131cc6497a Merge branch 'mingw-x64-compiler-warnings' into 'master'
Fix various compiler warnings with the 64bit mingw build

See merge request GNOME/gtk!2020
2020-06-15 01:26:45 +00:00
Matthias Clasen
d9d591ff7a Merge branch 'fix-spin-button-auto-sizing' into 'master'
spinbutton: Bring back auto-sizing

See merge request GNOME/gtk!2085
2020-06-14 22:06:16 +00:00
Christoph Reiter
f16b34f286 CI: Switch to 64bit mingw for the MSYS2 job
64 bit is more common now and also tests more things because
sizeof(glong) != sizeof(gpointer)
2020-06-14 20:02:46 +02:00
Christoph Reiter
85d822b2e8 Fix various compiler warnings with the 64bit mingw build
Use better matching format modifiers/specifiers, initialise some things
which in theory wont be written to because of getters using g_return_if_fail(),
a cast, and gsize as input for malloc because gsize!=glong on 64bit Windows.
2020-06-14 20:02:36 +02:00
Matthias Clasen
4e5689abeb Merge branch 'tchaik/fix-lpr-build' into 'master'
Fix the lpr print backend build (redundant-decls)

See merge request GNOME/gtk!2084
2020-06-14 14:57:42 +00:00
Matthias Clasen
b046c8d4ad spinbutton: Bring back auto-sizing
We lost this when GtkSpinButton was first ported
to the new editable regime, and then the GtkBoxLayout.

Bring it back, but without text measurement, by overriding
width-chars for the GtkText inside, and only do it if
GtkSpinButton::width-chars is unset (ie -1).

Also adjust the documentation slightly to point out
how auto-sizing can be turned off.
2020-06-14 10:55:30 -04:00
Martin Blanchard
72c72d0b37 Fix the lpr print backend build (redundant-decls)
Class and instance _init() functions are already declared by
G_DEFINE_DYNAMIC_TYPE ().
2020-06-14 16:14:24 +02:00
Asier Sarasua Garmendia
5e69181d8d Update Basque translation 2020-06-13 20:19:00 +00:00
Asier Sarasua Garmendia
9c5a9fb100 Update Basque translation 2020-06-13 19:40:17 +00:00
Matthias Clasen
ceb2349823 Merge branch 'matthiasc/for-master' into 'master'
widget-factory: Make the print dialog more functional

See merge request GNOME/gtk!2083
2020-06-13 16:17:49 +00:00
Matthias Clasen
818b7c44be widget-factory: Make the print dialog more functional
Allow opening the papersize dialog.
2020-06-13 08:59:21 -04:00
Yuri Chornoivan
044026d330 Update Ukrainian translation 2020-06-13 11:45:35 +00:00
Piotr Drąg
66882f3825 Update POTFILES.in and POTFILES.skip 2020-06-13 12:48:27 +02:00
Matthias Clasen
1d0235780c Merge branch 'matthiasc/for-master' into 'master'
paperdialog: Drop the private struct

See merge request GNOME/gtk!2082
2020-06-12 21:53:48 +00:00
Matthias Clasen
770d6cb2bd paperdialog: Drop the private struct
Not needed here.
2020-06-12 12:54:21 -04:00
Matthias Clasen
106e1080ae Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2080
2020-06-12 16:39:46 +00:00
Matthias Clasen
07ecb3cb78 Merge branch 'fix-custom-paper-dialog' into 'master'
Fix the custom paper dialog

See merge request GNOME/gtk!2078
2020-06-12 14:01:17 +00:00
Matthias Clasen
74ac435ae6 printdialog: Replace the papersize combo with a dropdown
This one is more complicated, since it involves
separators and a custom item.
2020-06-12 09:22:36 -04:00
Matthias Clasen
c80ba49a60 Adwaita: Allow separators on individual list items
Allow setting a .separator style class on list items
to put a separator before the item.
2020-06-12 09:22:36 -04:00
Matthias Clasen
ed9941ec2c printdialog: Replace some combo boxes with drop downs
These are just the simple cases.
2020-06-12 08:49:01 -04:00
Matthias Clasen
c3b43f2ad2 printeroptionwidget: Port to GtkDropDown
Use GtkDropDown instead of GtkComboBox in the print dialog.
2020-06-12 08:49:01 -04:00
Matthias Clasen
86718439be testdropdown: Add some more tests
Add a homegrown combobox entry replacement that
combines a dropdown with a plain entry.
2020-06-12 08:49:01 -04:00
Matthias Clasen
933e373b07 dropdown: Make the stack nonhomogeneous
Without this, the (None) in the empty page forces
the button to have a large minimum width, even when
we don't put a widget in it.
2020-06-12 08:49:01 -04:00
Matthias Clasen
e6dcd55480 Fix the custom paper dialog
This broke during the container removal.
2020-06-12 08:46:18 -04:00
Yuri Chornoivan
0d901ef174 Update Ukrainian translation 2020-06-12 06:40:07 +00:00
Matthias Clasen
716e0db690 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2077
2020-06-11 23:44:48 +00:00
Matthias Clasen
90b78132d4 dropdown: Make the popup as wide as the button
Having narrow popups on a wide button looks awkward.
Do the same as the combo box, and ensure the popup
is at least as wide as the button.
2020-06-11 18:29:58 -04:00
Matthias Clasen
c2285d923d iconbrowser: Drop app menu leftovers
We don't use menus.ui anymore, so don't put it in a resource.
2020-06-11 18:16:36 -04:00
Matthias Clasen
4a79ac4473 Adwaita: bring dropdown arrows back
These got lost when the css name changed from combobox
to dropdown.
2020-06-11 18:09:12 -04:00
Matthias Clasen
2a3e5422ad docs: Cosmetics
Remove a few instances of GTK+ from the docs, and
remove references to ancient versions.
2020-06-11 17:25:57 -04:00
Matthias Clasen
e0c39dbf7e Merge branch 'recent-model' into 'master'
Add a list model for recent files

See merge request GNOME/gtk!2073
2020-06-11 20:58:52 +00:00
Matthias Clasen
8c670b3b5d testcolumnview: Add recent file support
Use testcolumnview --recent to see recent files.
2020-06-11 16:14:47 -04:00
Matthias Clasen
5dddec4dd9 Add GtkBookmarkList
This is a listmodel similar to GtkDirectoryList,
for tracking recent files.
2020-06-11 16:14:47 -04:00
Matthias Clasen
93017bb8db Merge branch 'property-selection-getters' into 'master'
propertyselection: Add getters

See merge request GNOME/gtk!2075
2020-06-11 13:08:47 +00:00
Matthias Clasen
059c45a85b propertyselection: Add getters
These were missing.
2020-06-11 07:35:20 -04:00
Matthias Clasen
63692a491d Merge branch 'michaelweghorn/master_issue1820_gtkfilechoosernative_get_filter' into 'master'
filechoosernative: Make get_filter work for (non-portal) native chooser (master, issue #1820)

Closes #1820

See merge request GNOME/gtk!2069
2020-06-10 14:47:36 +00:00
Emmanuele Bassi
bbe79c1ef9 Merge branch 'wip/carlosg/zoom-no-touchpad-warnings' into 'master'
gtkgesturezoom: Do not check touchpad phase on generic events

Closes #2825

See merge request GNOME/gtk!2071
2020-06-10 14:35:10 +00:00
Matthias Clasen
4b241f8da2 Merge branch 'scroll-compression' into 'master'
gdk: Compress scroll events

Closes #2800

See merge request GNOME/gtk!2066
2020-06-10 14:35:01 +00:00
Matthias Clasen
bdd6ae3252 Merge branch 'device-cleanup' into 'master'
Device cleanup

See merge request GNOME/gtk!2068
2020-06-10 13:06:13 +00:00
sicklylife
24a3ff3aef Update Japanese translation 2020-06-10 12:34:42 +00:00
Carlos Garnacho
ba988cd899 gtkgesturezoom: Do not check touchpad phase on generic events
This gesture handles both individual touch events and touchpad gesture
events, and was checking the touchpad phase in generic code paths. This
is dubious since event methods error out on the wrong GdkEventTypes.

Check the touchpad gesture phase within the branch handling touchpad
events, and make it clear which is the gesture phase of all that we are
ignoring.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2825
2020-06-10 14:30:58 +02:00
sicklylife
1bf1646d25 Update Japanese translation 2020-06-10 12:18:55 +00:00
Matthias Clasen
2c82151d65 gdk: Drop axis labels
This was only ever implemented on X11, and the labels
here were atom names, so unlikely to be useful for
anything interesting.
2020-06-10 07:36:30 -04:00
Alexander Larsson
d2235b71f3 Merge branch 'win32-use-g-stat' into 'master'
gtkiconcache: Use g_stat instead of fstat

See merge request GNOME/gtk!2019
2020-06-10 07:19:22 +00:00
Michael Weghorn
ecc6c255ef Make gtk_file_chooser_get_filter work for portal case
This makes 'gtk_file_chooser_get_filter' work for the
portal native file chooser by handling the corresponding
'current_filter' argument in the response retrieved via
D-Bus.

In order to try to map the retrieved 'current_filter' to one
of the existing list of filters, use the retrieved filter's name,
similar to how xdg-desktop-portal-gtk does it when evaluating the
'current_filter' input parameter in 'options'.)

Note: This depends on the following merge/pull requests
which fix the filter handling in gtk for native file choosers
and introduce the 'current_filter' handling for FileChooser portal.

* https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1959
* https://github.com/flatpak/xdg-desktop-portal/pull/493
* https://github.com/flatpak/xdg-desktop-portal-gtk/pull/311

This fixes #1820 for desktop portal case.

Fixes: #1820
2020-06-09 22:59:54 +02:00