Commit Graph

50017 Commits

Author SHA1 Message Date
Timm Bäder
56033a8d27 gesturestylus: Clarify a documentation comment
Use the proper gtkdoc syntax for signals.
2018-07-18 23:05:06 +01:00
Matthias Clasen
f7f3939b04 3.23.1 2018-07-18 16:58:17 -04:00
Piotr Drąg
13a36e81dc Update POTFILES.in 2018-07-18 17:00:11 +02:00
Matthias Clasen
affb4ff5f4 Fix up version annotations
The new api here was introduced in 3.24.
2018-07-18 07:18:21 -04:00
Matthias Clasen
ee22277f18 Add new API to the docs 2018-07-18 07:12:41 -04:00
Matthias Clasen
cc73241c7b Merge branch 'wip/carlosg/controllers-backport' into 'gtk-3-24'
Wip/carlosg/controllers backport

See merge request GNOME/gtk!246
2018-07-18 00:23:37 +00:00
Balázs Meskó
ac358d2507 Update Hungarian translation 2018-07-17 23:11:18 +00:00
Carlos Garnacho
9ee60777e7 sm scroll 2018-07-16 15:44:35 +02:00
Carlos Garnacho
effdf3af74 demos: Add "Paint" demo 2018-07-16 15:43:43 +02:00
Carlos Garnacho
a8463953a4 gtk: Add GtkGestureStylus
This is a GtkGesture done to deal with stylus events from drawing tablets.
Those have a special number of characteristics that extend a regular
pointer, so it makes sense to wrap that.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
7793aab5f0 gtkeventcontrollerkey: Add ::focus-in/out signals
And handle GDK_FOCUS_CHANGE events in order to emit those.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
ecf9fa65b8 gtkeventcontrollerkey: Add get_group() call
Callers can use this function on a key-pressed/released signal
to find out the key event group, useful in a few places.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
a32933b056 eventcontrollerkey: Add function to forward stuff elsewhere 2018-07-16 15:43:43 +02:00
Carlos Garnacho
e0f3e8a7e5 gtk: Add GtkEventControllerKey
This event controller is meant to replace usage from key-press/release-event
handlers all through. Optionally it can be set a GtkIMContext, so interaction
is carried by the controller.
2018-07-16 15:43:43 +02:00
Matthias Clasen
1f9de707f7 Add x/y to GtkEventControllerMotion::enter
We have this information available in enter events,
and having it in the controller signal as well makes
porting easier.

Update existing users.
2018-07-16 15:43:43 +02:00
Matthias Clasen
8b2c3a8c1a Add a simple motion eventcontroller
This can serve as a replacement for the legacy
event signals for enter/leave/motion notify.
2018-07-16 15:43:43 +02:00
Matthias Clasen
e7af3410cf Avoid excess notification for GdkEventControllerScroll::flags
We have a test that checks this, and it is the right thing to do.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
84d3bfb6fd gtk: Remove CONSTRUCT_ONLY flag from GtkEventControllerScroll::flags
There is a gtk_event_controller_scroll_set_flags() call that's meant
to be called after construction (eg. due to scrolledwindow relayouts
hiding/showing scrollbars). The property shouldn't be construct-only
for consistence.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
448551f31c gtkeventcontrollerscroll: Add some docs 2018-07-16 15:43:43 +02:00
Timm Bäder
7b8c036f8f eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps
The > 1 meant it only emits the signal for -2/+2 steps.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
747be0f499 gtk: Add GtkEventControllerScroll
This is a GtkEventController implementation to handle mouse
scrolling. It handles both smooth and discrete events and
offers a way for callers to tell their preference too, so
smooth events shall be accumulated and coalesced on request.

On capable devices, it can also emit ::scroll-begin and
::scroll-end enclosing all ::scroll events for a scroll
operation.

It also has builtin kinetic scrolling capabilities, reporting
the initial velocity for both axes after ::scroll-end if
requested.
2018-07-16 15:43:43 +02:00
Benjamin Otte
9008f7702d window: Update opaque region if background-color changes
The opaque region is only set when the background color is opaque. So
we need to do something about it when the background color changes.

However, in the case where a size allocation is going to happen, we
already do this update in size_allocate(), so in that case avoid doing
it twice.
2018-07-13 15:02:47 +02:00
Bruno Lopes da Silva
df0454236c Update Brazilian Portuguese translation 2018-07-10 13:02:08 +00:00
Jakub Steiner
8373b906d4 Merge branch 'expander-size-3' into 'gtk-3-24'
HighContrast: Restore expander size

See merge request GNOME/gtk!210
2018-07-09 15:27:51 +00:00
Peter Bloomfield
4b4ae4464c text-view: Do not double-allocate borders
Reverts part of Commit 25b67af3

The 'width' part of the commit is the cause of #628: requisition->width
is first set to priv->layout->width, which already includes
priv->left_border + priv->right_border. It's a bit labyrinthine, but
essentially:

*  layout->width is set in update_layout_size() (gtktextlayout.c line 992)
   as the maximum line width, and
*  the line width is set to display->width in gtk_text_layout_real_wrap()
   (gtktextlayout.c line 1183), and
*  display->width is set to text_pixel_width + h_margin + h_padding in
   gtk_text_layout_get_line_display() (gtktextlayout.c line 2584), and
*  h_margin + h_padding is the same as priv->left_border +
   priv->right_border.

Adding it again leads to an increase in the size-request, which
results in wider lines; rinse and repeat.
2018-07-08 17:24:07 -04:00
Mario Blättermann
0bca6969d4 Update German translation 2018-07-07 19:48:26 +00:00
Samuel Thibault
660087db42 HighContrast: Restore expander size
Expanders used to be 16px high. With the move from the gtk2 rendering
to gtk3 rendering they shrunk to 12px, making them hard to see, because
it's now the icon which is 16px high and the icon contains transparent
borders.

This makes the HighContrast theme use 24px icons instead, to restore
16px expanders. This may expander some containers a bit.

Closes #1046
2018-07-03 19:27:15 +02:00
Jonas Ådahl
927004178f Merge branch 'fix_wayland_csd_announce' into 'gtk-3-24'
Fix gdk_wayland_window_announce_csd

See merge request GNOME/gtk!221
2018-07-03 10:14:57 +00:00
Daniel Boles
1b8de2d5fa Adwaita: Drop some unneeded overrides
The pseudoclasses work fine on the subnodes without having to also apply
`parent:class subnode`.
2018-07-02 21:45:06 +01:00
Daniel Boles
483d25f418 ModelButton: Add Since annotation on new prop 2018-07-02 20:31:45 +01:00
Daniel Boles
1d30ada735 ScrolledWindow: a couple of spelling/grammar fixes
(A) Put a space in "scrolled window" like the other doc comments
(B) Say "i.e." rather than "ie."
(C) Fix grammar from "makes [...] exactly reaches" to "exactly reach"
2018-07-02 20:11:12 +01:00
Daniel Boles
8a00551871 ScrolledWindow: Fix/improve doc of key bindings
Saying 'key + modifiers' is really weird, so reverse that, and explain
why there are 2 cited and what the difference between them is.
2018-07-02 20:09:37 +01:00
Daniel Boles
0ed3a77d29 ScrolledWindow: Add missing apostrophes 2018-07-02 20:07:23 +01:00
Matthias Clasen
29b61176bb Merge branch 'wip/gtk324.win.egl' into 'gtk-3-24'
Add an EGL renderer for GDK-Win32 for GTK+-3.24 (was: merge request !126)

See merge request GNOME/gtk!191
2018-07-02 17:18:26 +00:00
Matthias Clasen
174c4fa7ee Merge branch 'wip/aplazas/modelbutton-markup' into 'gtk-3-24'
ModelButton: Add 'use-markup' property

See merge request GNOME/gtk!219
2018-07-02 17:16:59 +00:00
Daniel Boles
08adcb6318 PlacesSidebar: Fix warning about signal parameters
@open_flags was not documented, and so:

jhbuild/checkout/gnome/gtk+-3/gtk/gtkplacessidebar.c:4743: Warning: Gtk:
incorrect number of parameters in comment block, parameter annotations
will be ignored.
2018-07-01 16:08:06 +01:00
Adrien Plazas
504eb89155 ModelButton: Add 'use-markup' property
Binds this property to the button's label, allowing a model button to
have text with markup.

This will be convenient for buttons like 'Online Accounts <sup>↗</sup>'.
2018-06-29 23:02:21 +02:00
Daniel Boles
b75b5e900a themes: Remove Raleigh
It has been extremely broken since the move to CSS gadgets/nodes, so
clearly no one is depending on it; nor does anyone seem to want to
resurrect it, and writing a Raleigh-inspired theme from scratch would be
faster if they did. So let's drop the dead weight from the build and lib

Now that we don't have Raleigh, the defaultvalue test has to be changed
to set Adwaita before checking the default values of style properties -
some of which Adwaita overrides in its CSS, meaning those would fail.
Not that it passed before anyway! But it does now after my other commit.

Note that I leave the last reference in gtk-zip.sh.in alone since that
hasn't been touched in 8 years and probably has plenty other problems...

Close https://gitlab.gnome.org/GNOME/gtk/issues/1187
2018-06-29 20:12:19 +01:00
Daniel Boles
ca4ec52c54 defaultvalue: Fix some very broken indentation
and while here, use the more typical : to separate the type and property
2018-06-29 19:57:06 +01:00
Daniel Boles
908d4f1d1f defaultvalue: Ignore property to actually pass
GtkFontChooserWidget:tweak-action gets set in init(), so we have to skip
testing that it is the default NULL for a GObject, or the test fails.
2018-06-29 18:57:43 +01:00
Daniel Boles
62573f299c defaultvalue: Stop warnings via new g_object_ref()
Now that it can propagate the type, we must explicitly cast to GObject*
to assign it, otherwise gcc shouts.
2018-06-29 18:46:09 +01:00
Daniel Boles
c0bf48c8ab defaultvalue test: Remove obsolete properties 2018-06-29 18:46:09 +01:00
Matthias Clasen
26f35fb941 Merge branch 'wip/cursor-output-scale-changes-3-24' into 'gtk-3-24'
wayland: Update cursor surface scale when output scale changes

See merge request GNOME/gtk!223
2018-06-29 14:30:51 +00:00
David Edmundson
d49335c59a wayland: Use correct enums in server_decoration_request_mode
The enum is duplicated in the spec for the manager and the decoration
object. We should be using the right ones. In practice they have the
same value, so this bug didn't cause any issues.
2018-06-28 18:51:12 +01:00
David Edmundson
f62c92783a wayland: Respond to server_decoration.mode events 2018-06-28 18:51:12 +01:00
David Edmundson
f3f4d40b89 wayland: Fix memory leak in server decoration object
The server decoration object becomes invaid when the wl_surface is
deleted. We should tidy it up then.
2018-06-28 18:51:12 +01:00
David Edmundson
b0bfe606aa wayland: Reset server decoration interface on window mapping
The wl_surface is destroyed and recreated when the window is
mapped/unmapped. As we have a new wl_surface we need to create a new
server_decoration object for that surface.
2018-06-28 18:50:50 +01:00
David Edmundson
32ae97f13a wayland: Explicitly request mode for both CSD and SSD modes
According to the spec compositors were to assume surfaces are CSD until
told otherwise. This means we need to send
org_kde_kwin_server_decoration_request_mode in both cases.

This fixes libreoffice under kwin, which would remove it's own headers
as per the manager's request but not inform kwin leaving it in the even
more broken state of having none.
2018-06-28 18:50:50 +01:00
Jonas Ådahl
3354d91090 wayland: Update cursor surface scale when output scale changes
Cursor surfaces didn't listen for output scale changes, meaning they
didn't adapt their scale when an output changed scale, which could
happen for example when changing the monitor scale via Settings.
2018-06-28 12:01:48 +02:00
Chun-wei Fan
b6db96cd1a GDK/Win32: Cleanup and further fix OpenGL/ES glitches
We also need to invalidate the OpenGL/ES window when we resize the
window via a mouse drag operation, so that we don't get glitches in such
situations, because they are not covered in GdkWindow's
impl_class->move_resize().

Make sure that we only force the invalidation when necessary (as it is
expensive), and clean up the gdkevents-win32.c code so that we include
gdkglcontext-win32.h in the right place instead of using an extern, as
we need to invalidate the window accordingly.
2018-06-28 15:33:42 +08:00