Compare commits

...

23 Commits

Author SHA1 Message Date
Matthias Clasen
2bf8faf2a0 x11: Don't pass the same device twice when creating events
I did not expect XI2, where this slave device idea
originated, to do this. But it does.
2020-05-19 16:42:33 -04:00
Matthias Clasen
391472870f events: Enforce that source device must be a slave
We were allowing backends too much leeway to create
nonsense events. Enforce that the device is NULL or
a master device, and the source device is NULL or a
slave device.
2020-05-19 15:59:15 -04:00
Matthias Clasen
76666a4204 wayland: Don't generate events with master devices as source
When emulating crossing or focus events, don't pass the
same device as master and slave. It is only one, not the
other.
2020-05-19 15:58:01 -04:00
Matthias Clasen
5053c6fcec display: Don't pass a master device as source event
When generating grab-broken events, don't pass the same
device as master and slave. It is only one, not the other.
2020-05-19 15:57:18 -04:00
Matthias Clasen
edf85cb1b3 docs: Refresh the build and backend sections
Remove some outdated information from the sections
about building and about particular backends.
2020-05-19 15:19:53 -04:00
Matthias Clasen
841e9b3f0e Merge branch 'x11-shortcuts-inhibit-fix' into 'master'
x11: update inhibit shortcuts on grab broken

See merge request GNOME/gtk!1590
2020-05-19 14:06:25 +00:00
Olivier Fourdan
93f9138c9b x11: update inhibit shortcuts on grab broken
On X11, shortcuts inhibition is emulated using a grab on the keyboard.

So if another widget ungrabs the keyboard behind our back (for example
when a popup window is dismissed) that effectively disables the effects
of the shortcut inhibition on the surface and we need to update the
shortcut inhibition status accordingly.

Check for "grab-broken" events on the surface and clear existing
shortcuts inhibition for the matching seat, so that the client can be
notified and may decide to re-enable shortcut inhibition if desired.
2020-05-19 14:51:25 +02:00
Emmanuele Bassi
1ace77b923 Merge branch 'ebassi/surface-event' into 'master'
Use the right types for the GdkSurface::event arguments

See merge request GNOME/gtk!1936
2020-05-19 12:14:17 +00:00
Emmanuele Bassi
dd4d6930b5 Use the right types for the GdkSurface::event arguments
We pass the GdkEvent as a pointer, because the autogenerated marshallers
don't know how to handle GTypeInstance-derived classes.

Since the GValue box that we use in the marshaller passes the GdkEvent
instance as is, we also need to acquire a reference before invoking the
closure, and release it afterwards, to ensure that the GdkEvent instance
survices the invocation.
2020-05-19 12:21:22 +01:00
Matthias Clasen
7fc2d9adc0 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #2739 and #2760

See merge request GNOME/gtk!1934
2020-05-19 02:47:03 +00:00
Matthias Clasen
17dd32da88 testsuite: Remove obsolete test from list
The test was removed in 97d0e8c6e0, but I neglected
to remove the test files from meson.build.

Fixes: #2760
2020-05-18 21:49:34 -04:00
Matthias Clasen
ec2aac5b61 gsk: Document blend modes
Add some information about blend modes, mostly taken
from the css compositing spec.

Fixes: #2739
2020-05-18 18:21:39 -04:00
Matthias Clasen
15f7d2a27d 3.98.4 2020-05-18 16:38:11 -04:00
Matthias Clasen
3dafdcbab0 testsuite: Remove GDK_DEBUG=misc
This snuck in by accident in recent ci setup
changes, and breaks the test runs by adding
stray output.
2020-05-18 16:38:11 -04:00
Matthias Clasen
383fa6b0b0 Merge branch 'matthiasc/for-master' into 'master'
colorscale: Bring back the right-click on slider

See merge request GNOME/gtk!1933
2020-05-18 16:46:12 +00:00
Matthias Clasen
f637ab57f1 colorscale: Bring back the right-click on slider
This was lost when we converted the color editor to actions.
2020-05-18 11:31:42 -04:00
Emmanuele Bassi
615b4d8c65 Merge branch 'ebassi/ci-fix' into 'master'
docs: Fix the argument name to match

See merge request GNOME/gtk!1930
2020-05-18 15:10:38 +00:00
Jakub Steiner
9be5c7b0c8 Merge branch 'theme-aligned-combo-labels' into 'master'
Adwaita: Align combo menu labels with the combo button label

See merge request GNOME/gtk!1928
2020-05-18 14:04:19 +00:00
Yuri Chornoivan
670b102553 Update Ukrainian translation 2020-05-18 14:03:41 +00:00
Emmanuele Bassi
9bd9a11de4 docs: Fix the argument name to match
Both gtk-doc and g-i require the name of the argument of a function to
match in the declaration, definition, and gtk-doc stanza.
2020-05-18 14:55:25 +01:00
Jakub Steiner
ec26e4f6b4 Merge branch 'theme-checkbutton-padding' into 'master'
Adwaita: Tweak padding in checkbutton & radiobutton

Closes #2697

See merge request GNOME/gtk!1927
2020-05-18 13:12:15 +00:00
nana-4
538ab75002 Adwaita: Align combo menu labels with the combo button label
Apply the same left and right padding to the combo menu items as the
combo button.
2020-05-18 21:52:00 +09:00
nana-4
1c99dbc70e Adwaita: Tweak padding in checkbutton & radiobutton
Since we can now use border-spacing in checkbutton and radiobutton,
we don't need the margin in check and radio for spacing anymore.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2697
2020-05-18 20:29:23 +09:00
19 changed files with 258 additions and 198 deletions

17
NEWS
View File

@@ -3,9 +3,9 @@ Overview of Changes in GTK 3.98.4
* Themes
- Refine menu styling
- Add public colors to HighContrast
- Fix scale borders in HighContrast
- Tweak visible focus behavior
- HighConstrast: Add public colors
- HighContrast: Fix scale borders
* CSS:
- Drop the nonstandard -gtk-icon-theme property
@@ -29,6 +29,12 @@ Overview of Changes in GTK 3.98.4
- Drop the homogeneous property
- Add a use-underline property to stack pages
* GtkScale:
- Make area around the trough clickable
* GtkScrolledWindow:
- Fix kinetic scrolling
* GtkTreeView:
- Break reference cycles in unroot
@@ -46,11 +52,13 @@ Overview of Changes in GTK 3.98.4
* Remove gtk_dialog_run
* Wayland:
- Provide a builtin cursor of last resort
* GDK:
- Wayland: Provide a builtin cursor of last resort
- Change the monitor api to use a GListModel
* GSK:
- Don't include renderer-specific headers automatically
- GL: Fix nested rounded clips
* Introspection:
- Assorted annotation fixes
@@ -73,6 +81,7 @@ Overview of Changes in GTK 3.98.4
* Translation updates:
Chinese (Taiwan)
Esperanto
Japanese
Romanian
Spanish
Ukrainian

View File

@@ -47,7 +47,7 @@ How to compile GTK itself
</para>
<informalexample>
<programlisting>
meson --prefix /opt/gtk builddir
meson setup --prefix /opt/gtk builddir
</programlisting>
</informalexample>
<para>

View File

@@ -36,7 +36,7 @@ additional environment variables.
<title><envar>GTK_DEBUG</envar></title>
<para>
Unless GTK has been configured with <option>--enable-debug=no</option>,
Unless GTK has been configured with <option>-Ddebug=false</option>,
this variable can be set to a list of debug options, which cause GTK
to print out different types of debugging information.
<variablelist>
@@ -237,7 +237,7 @@ nevertheless.
<title><envar>GDK_DEBUG</envar></title>
<para>
If GTK has been configured with <option>--enable-debug=yes</option>,
Unless GTK has been configured with <option>-Ddebug=false</option>,
this variable can be set to a list of debug options, which cause GDK
to print out different types of debugging information.
<variablelist>
@@ -327,7 +327,7 @@ nevertheless.
<title><envar>GSK_DEBUG</envar></title>
<para>
If GTK has been configured with <option>--enable-debug=yes</option>,
Unless GTK has been configured with <option>-Ddebug=false</option>,
this variable can be set to a list of debug options, which cause GSK
to print out different types of debugging information.
<variablelist>
@@ -432,11 +432,11 @@ nevertheless.
</varlistentry>
</variablelist>
Since 3.10, this environment variable can contain a comma-separated list
of backend names, which are tried in order. The list may also contain
a *, which means: try all remaining backends. The special value "help" can
be used to make GDK print out a list of all available backends.
For more information about selecting backends, see the gdk_display_manager_get() function.
This environment variable can contain a comma-separated list of backend names,
which are tried in order. The list may also contain a *, which means: try all
remaining backends. The special value "help" can be used to make GDK print out
a list of all available backends. For more information about selecting backends,
see the gdk_display_manager_get() function.
</para>
</formalpara>

View File

@@ -21,18 +21,17 @@ Wayland-specific aspects of using GTK
<para>
The GDK Wayland backend provides support for running GTK applications
under the Wayland display server. To run your application in this way,
select the Wayland backend by setting <literal>GDK_BACKEND=wayland</literal>.
under a Wayland compositor. To run your application in this way, select
the Wayland backend by setting <literal>GDK_BACKEND=wayland</literal>.
</para>
<para>
Currently, the Wayland backend does not use any additional commandline
options or environment variables.
On UNIX, the Wayland backend is enabled by default, so you don't need to
do anything special when compiling it, and everything should "just work."
</para>
<para>
For up-to-date information about the current status of this backend, see
the <ulink url="https://wiki.gnome.org/Initiatives/Wayland/GTK%2B">project page</ulink>.
Currently, the Wayland backend does not use any additional environment variables.
</para>
</refsect1>

View File

@@ -25,65 +25,19 @@ on top of the Win32 API. When compiling GTK on Windows, this backend is
the default.
</para>
<refsect2 id="win32-cmdline">
<title>Windows-specific commandline options</title>
<para>
The Windows GDK backend can be influenced with some
additional command line arguments.
</para>
<formalpara>
<title><systemitem>--sync</systemitem></title>
<para>
Don't batch GDI requests. This might be a marginally useful option for
debugging.
</para>
</formalpara>
<formalpara>
<title><systemitem>--no-wintab</systemitem>,
<systemitem>--ignore-wintab</systemitem></title>
<para>
Don't use the Wintab API for tablet support.
</para>
</formalpara>
<formalpara>
<title><systemitem>--use-wintab</systemitem></title>
<para>
Use the Wintab API for tablet support. This is the default.
</para>
</formalpara>
<formalpara>
<title><systemitem>--max-colors <replaceable>number</replaceable></systemitem></title>
<para>
In 256 color mode, restrict the size of the color palette to
the specified number of colors. This option is obsolete.
</para>
</formalpara>
</refsect2>
<refsect2 id="win32-envar">
<title>Windows-specific environment variables</title>
<para>
The Win32 GDK backend can be influenced with some
additional environment variables.
The Win32 GDK backend can be influenced with some additional environment
variables.
</para>
<formalpara>
<title><envar>GDK_IGNORE_WINTAB</envar></title>
<para>
If this variable is set, GTK doesn't use
the Wintab API for tablet support.
If this variable is set, GTK doesn't use the Wintab API for tablet support.
</para>
</formalpara>
@@ -91,17 +45,8 @@ the Wintab API for tablet support.
<title><envar>GDK_USE_WINTAB</envar></title>
<para>
If this variable is set, GTK uses the Wintab API for
tablet support. This is the default.
</para>
</formalpara>
<formalpara>
<title><envar>GDK_WIN32_MAX_COLORS</envar></title>
<para>
Specifies the size of the color palette used
in 256 color mode.
If this variable is set, GTK uses the Wintab API for tablet support.
This is the default.
</para>
</formalpara>
@@ -120,7 +65,9 @@ When any other cursor theme is used, GTK will prefer cursors from that theme,
falling back to Windows cursors and built-in X cursors.
</para>
<para>
Theme can be changed by setting <literal>gtk-cursor-theme-name</literal> GTK setting. Users can override GTK settings in the <filename>settings.ini</filename> file or at runtime in the GTK Inspector.
Theme can be changed by setting <literal>gtk-cursor-theme-name</literal> GTK
setting. Users can override GTK settings in the <filename>settings.ini</filename>
file or at runtime in the GTK Inspector.
</para>
<para>
Themes are loaded from normal Windows variants of the XDG locations:
@@ -129,7 +76,8 @@ Themes are loaded from normal Windows variants of the XDG locations:
<filename>RUNTIME_PREFIX/share/icons/THEME/cursors</filename>.
</para>
<para>
The <literal>gtk-cursor-theme-size</literal> setting is ignored, GTK will use the cursor size that Windows tells it to use.
The <literal>gtk-cursor-theme-size</literal> setting is ignored, GTK will use
the cursor size that Windows tells it to use.
</para>
</refsect2>

View File

@@ -20,35 +20,16 @@ X11-specific aspects of using GTK
<title>GTK for the X Window System</title>
<para>
On UNIX, the X backend is the default build for GTK.
So you don't need to do anything special when compiling it,
and everything should "just work."
On UNIX, the X backend is enabled by default, so you don't need to do anything
special when compiling it, and everything should "just work."
</para>
<para>
To mix low-level Xlib routines into a GTK program,
see <link linkend="gdk-X-Window-System-Interaction">GDK X Window
System interaction</link> in the GDK manual.
To mix low-level Xlib routines into a GTK program, see
<link linkend="gdk-X-Window-System-Interaction">GDK X Window System
interaction</link> in the GDK manual.
</para>
<refsect2 id="x11-cmdline">
<title>X11-specific commandline options</title>
<para>
The X backend understands some additional command line arguments.
</para>
<formalpara>
<title><systemitem>--display <replaceable>display</replaceable></systemitem></title>
<para>
The name of the X display to open instead of the one specified
in the <envar>DISPLAY</envar> environment variable.
</para>
</formalpara>
</refsect2>
<refsect2 id="x11-envar">
<title>X11-specific environment variables</title>
@@ -129,9 +110,9 @@ The window manager is in charge of rendering the frame or borders
around windows; it also has final say on the size of each window,
and window states such as minimized, maximized, and so forth.
On Windows and MacOS the application handles most of this.
On X11, if you wish to modify the window's state, or
change its frame, you must ask the window manager to do so on your
behalf, using an established <ulink
On X11, if you wish to modify the window's state, or change its frame,
you must ask the window manager to do so on your behalf, using an
established <ulink
url="http://www.freedesktop.org/standards/">convention</ulink>.
</para>
@@ -139,17 +120,11 @@ url="http://www.freedesktop.org/standards/">convention</ulink>.
GTK has functions for asking the window manager to do various things;
see for example <link
linkend="gtk-window-minimize">gtk_window_minimize()</link> or <link
linkend="gtk-window-maximize">gtk_window_maximize()</link> or <link
linkend="gtk-window-set-decorated">gtk_window_set_decorated()</link>.
linkend="gtk-window-maximize">gtk_window_maximize()</link>.
Keep in mind that most window managers <emphasis>will</emphasis> ignore
certain requests from time to time, in the interests of good user interface.
</para>
<!--
May also want to explain DESKTOP_STARTUP_ID here.
http://www.freedesktop.org/Standards/startup-notification-spec
-->
</refsect2>
</refsect1>

View File

@@ -479,7 +479,7 @@ gdk_display_put_event (GdkDisplay *display,
static void
generate_grab_broken_event (GdkDisplay *display,
GdkSurface *surface,
GdkSurface *surface,
GdkDevice *device,
gboolean implicit,
GdkSurface *grab_surface)
@@ -492,7 +492,7 @@ generate_grab_broken_event (GdkDisplay *display,
event = gdk_grab_broken_event_new (surface,
device,
device,
NULL,
grab_surface,
implicit);
@@ -1515,7 +1515,7 @@ gdk_display_list_seats (GdkDisplay *display)
/**
* gdk_display_get_monitors:
* @display: a #GdkDisplay
* @self: a #GdkDisplay
*
* Gets the list of monitors associated with this display.
*

View File

@@ -416,6 +416,11 @@ gdk_event_alloc (GdkEventType event_type,
g_assert (event_type >= GDK_DELETE && event_type < GDK_EVENT_LAST);
g_assert (gdk_event_types[event_type] != G_TYPE_INVALID);
g_assert (device == NULL ||
gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER);
g_assert (source_device == NULL ||
gdk_device_get_device_type (source_device) == GDK_DEVICE_TYPE_SLAVE);
GdkEvent *event = (GdkEvent *) g_type_create_instance (gdk_event_types[event_type]);
GDK_NOTE (EVENTS, {

View File

@@ -380,6 +380,64 @@ gdk_surface_layout_popup_helper (GdkSurface *surface,
*out_final_rect = final_rect;
}
/* Since GdkEvent is a GTypeInstance, GValue can only store it as a pointer,
* and GClosure does not know how to handle its memory management. To avoid
* the event going away in the middle of the signal emission, we provide a
* marshaller that keeps the event alive for the duration of the closure.
*/
static void
gdk_surface_event_marshaller (GClosure *closure,
GValue *return_value,
guint n_param_values,
const GValue *param_values,
gpointer invocation_hint,
gpointer marshal_data)
{
GdkEvent *event = g_value_get_pointer (&param_values[1]);
gdk_event_ref (event);
_gdk_marshal_BOOLEAN__POINTER (closure,
return_value,
n_param_values,
param_values,
invocation_hint,
marshal_data);
gdk_event_unref (event);
}
static void
gdk_surface_event_marshallerv (GClosure *closure,
GValue *return_value,
gpointer instance,
va_list args,
gpointer marshal_data,
int n_params,
GType *param_types)
{
va_list args_copy;
GdkEvent *event;
G_VA_COPY (args_copy, args);
event = va_arg (args_copy, gpointer);
gdk_event_ref (event);
_gdk_marshal_BOOLEAN__POINTERv (closure,
return_value,
instance,
args,
marshal_data,
n_params,
param_types);
gdk_event_unref (event);
va_end (args_copy);
}
static void
gdk_surface_init (GdkSurface *surface)
{
@@ -533,13 +591,13 @@ gdk_surface_class_init (GdkSurfaceClass *klass)
0,
g_signal_accumulator_true_handled,
NULL,
_gdk_marshal_BOOLEAN__POINTER,
gdk_surface_event_marshaller,
G_TYPE_BOOLEAN,
1,
GDK_TYPE_EVENT);
G_TYPE_POINTER);
g_signal_set_va_marshaller (signals[EVENT],
G_OBJECT_CLASS_TYPE (object_class),
_gdk_marshal_BOOLEAN__POINTERv);
gdk_surface_event_marshallerv);
/**
* GdkSurface::enter-montor:

View File

@@ -592,7 +592,7 @@ emulate_crossing (GdkSurface *surface,
event = gdk_crossing_event_new (type,
surface,
device,
device,
NULL,
time_,
state,
x, y,
@@ -633,7 +633,7 @@ emulate_focus (GdkSurface *surface,
gboolean focus_in,
guint32 time_)
{
GdkEvent *event = gdk_focus_event_new (surface, device, device, focus_in);
GdkEvent *event = gdk_focus_event_new (surface, device, NULL, focus_in);
_gdk_wayland_display_deliver_event (gdk_surface_get_display (surface), event);
}

View File

@@ -1936,8 +1936,11 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
device = g_hash_table_lookup (device_manager->id_table,
GINT_TO_POINTER (xev->deviceid));
source_device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->sourceid));
if (xev->sourceid != xev->deviceid)
source_device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->sourceid));
else
source_device = NULL;
_gdk_device_manager_xi2_handle_focus (surface,
xev->event,

View File

@@ -106,6 +106,8 @@ static void set_wm_name (GdkDisplay *display,
const gchar *name);
static void move_to_current_desktop (GdkSurface *surface);
static void gdk_x11_toplevel_state_callback (GdkSurface *surface);
static gboolean gdk_x11_toplevel_event_callback (GdkSurface *surface,
GdkEvent *gdk_event);
/* Return whether time1 is considered later than time2 as far as xserver
* time is concerned. Accounts for wraparound.
@@ -149,6 +151,9 @@ _gdk_x11_surface_get_toplevel (GdkSurface *surface)
g_signal_connect (surface, "notify::state",
G_CALLBACK (gdk_x11_toplevel_state_callback),
NULL);
g_signal_connect (surface, "event",
G_CALLBACK (gdk_x11_toplevel_event_callback),
NULL);
}
return impl->toplevel;
@@ -449,6 +454,9 @@ gdk_x11_surface_finalize (GObject *object)
g_signal_handlers_disconnect_by_func (GDK_SURFACE (impl),
gdk_x11_toplevel_state_callback,
NULL);
g_signal_handlers_disconnect_by_func (GDK_SURFACE (impl),
gdk_x11_toplevel_event_callback,
NULL);
_gdk_x11_surface_grab_check_destroy (GDK_SURFACE (impl));
@@ -5033,6 +5041,29 @@ gdk_x11_toplevel_state_callback (GdkSurface *surface)
gdk_x11_toplevel_restore_system_shortcuts (GDK_TOPLEVEL (surface));
}
static gboolean
gdk_x11_toplevel_event_callback (GdkSurface *surface,
GdkEvent *gdk_event)
{
GdkSeat *gdk_seat;
if (!surface->shortcuts_inhibited)
return FALSE;
if (gdk_event_get_event_type (gdk_event) != GDK_GRAB_BROKEN)
return FALSE;
gdk_seat = gdk_surface_get_seat_from_event (surface, gdk_event);
if (gdk_seat != surface->current_shortcuts_inhibited_seat)
return FALSE;
surface->current_shortcuts_inhibited_seat = NULL;
surface->shortcuts_inhibited = FALSE;
g_object_notify (G_OBJECT (surface), "shortcuts-inhibited");
return FALSE;
}
static void
gdk_x11_toplevel_iface_init (GdkToplevelInterface *iface)
{

View File

@@ -98,25 +98,30 @@ typedef enum {
* @GSK_BLEND_MODE_DEFAULT: The default blend mode, which specifies no blending
* @GSK_BLEND_MODE_MULTIPLY: The source color is multiplied by the destination
* and replaces the destination
* @GSK_BLEND_MODE_SCREEN: ...
* @GSK_BLEND_MODE_OVERLAY: ...
* @GSK_BLEND_MODE_DARKEN: ...
* @GSK_BLEND_MODE_LIGHTEN: ...
* @GSK_BLEND_MODE_COLOR_DODGE: ...
* @GSK_BLEND_MODE_COLOR_BURN: ...
* @GSK_BLEND_MODE_HARD_LIGHT: ...
* @GSK_BLEND_MODE_SOFT_LIGHT: ...
* @GSK_BLEND_MODE_DIFFERENCE: ...
* @GSK_BLEND_MODE_EXCLUSION: ...
* @GSK_BLEND_MODE_COLOR: ...
* @GSK_BLEND_MODE_HUE: ...
* @GSK_BLEND_MODE_SATURATION: ...
* @GSK_BLEND_MODE_LUMINOSITY: ...
* @GSK_BLEND_MODE_SCREEN: Multiplies the complements of the destination and source
* color values, then complements the result.
* @GSK_BLEND_MODE_OVERLAY: Multiplies or screens the colors, depending on the
* destination color value. This is the inverse of hard-list
* @GSK_BLEND_MODE_DARKEN: Selects the darker of the destination and source colors
* @GSK_BLEND_MODE_LIGHTEN: Selects the lighter of the destination and source colors
* @GSK_BLEND_MODE_COLOR_DODGE: Brightens the destination color to reflect the source color
* @GSK_BLEND_MODE_COLOR_BURN: Darkens the destination color to reflect the source color
* @GSK_BLEND_MODE_HARD_LIGHT: Multiplies or screens the colors, depending on the source color value
* @GSK_BLEND_MODE_SOFT_LIGHT: Darkens or lightens the colors, depending on the source color value
* @GSK_BLEND_MODE_DIFFERENCE: Subtracts the darker of the two constituent colors from the lighter color
* @GSK_BLEND_MODE_EXCLUSION: Produces an effect similar to that of the difference mode but lower in contrast
* @GSK_BLEND_MODE_COLOR: Creates a color with the hue and saturation of the source color and the luminosity of the destination color
* @GSK_BLEND_MODE_HUE: Creates a color with the hue of the source color and the saturation and luminosity of the destination color
* @GSK_BLEND_MODE_SATURATION: Creates a color with the saturation of the source color and the hue and luminosity of the destination color
* @GSK_BLEND_MODE_LUMINOSITY: Creates a color with the luminosity of the source color and the hue and saturation of the destination color
*
* The blend modes available for render nodes.
*
* The implementation of each blend mode is deferred to the
* rendering pipeline.
*
* See https://www.w3.org/TR/compositing-1/#blending for more information
* on blending and blend modes.
*/
typedef enum {
GSK_BLEND_MODE_DEFAULT = 0,

View File

@@ -21,6 +21,7 @@
#include "gtkcolorchooserprivate.h"
#include "gtkgesturelongpress.h"
#include "gtkgestureclick.h"
#include "gtkcolorutils.h"
#include "gtkorientable.h"
#include "gtkrangeprivate.h"
@@ -53,6 +54,12 @@ static void hold_action (GtkGestureLongPress *gesture,
gdouble y,
GtkWidget *scale);
static void click_action (GtkGestureClick *gesture,
guint n_presses,
double x,
double y,
GtkWidget *scale);
G_DEFINE_TYPE_WITH_PRIVATE (GtkColorScale, gtk_color_scale, GTK_TYPE_SCALE)
void
@@ -160,6 +167,12 @@ gtk_color_scale_init (GtkColorScale *scale)
GTK_PHASE_TARGET);
gtk_widget_add_controller (GTK_WIDGET (scale), GTK_EVENT_CONTROLLER (gesture));
gesture = gtk_gesture_click_new ();
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), GDK_BUTTON_SECONDARY);
g_signal_connect (gesture, "pressed",
G_CALLBACK (click_action), scale);
gtk_widget_add_controller (GTK_WIDGET (scale), GTK_EVENT_CONTROLLER (gesture));
gtk_widget_add_css_class (GTK_WIDGET (scale), "color");
}
@@ -256,6 +269,18 @@ hold_action (GtkGestureLongPress *gesture,
"s", gtk_widget_get_name (scale));
}
static void
click_action (GtkGestureClick *gesture,
guint n_presses,
double x,
double y,
GtkWidget *scale)
{
gtk_widget_activate_action (scale,
"color.edit",
"s", gtk_widget_get_name (scale));
}
static void
scale_finalize (GObject *object)
{

View File

@@ -1237,6 +1237,12 @@ combobox {
min-width: 16px;
}
// align menu labels with the button label
> popover.menu > contents modelbutton {
padding-left: 9px;
padding-right: 9px;
}
&.linked {
button:nth-child(2) {
&:dir(ltr) { @extend %linked_not_left; }
@@ -2397,16 +2403,12 @@ radiobutton {
&.text-button {
// this is for a nice focus on check and radios text
padding: 4px 2px;
padding: 4px;
}
}
check,
radio {
margin: 0 4px;
&:only-child { margin: 0; }
min-height: 14px;
min-width: 14px;
border: 1px solid;

View File

@@ -1,5 +1,5 @@
project('gtk', 'c',
version: '3.98.3',
version: '3.98.4',
default_options: [
'buildtype=debugoptimized',
'warning_level=1',

View File

@@ -9,8 +9,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+ 2.4.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-16 10:39+0000\n"
"PO-Revision-Date: 2020-05-16 17:51+0300\n"
"POT-Creation-Date: 2020-05-18 13:12+0000\n"
"PO-Revision-Date: 2020-05-18 17:02+0300\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <kde-i18n-uk@kde.org>\n"
"Language: uk\n"
@@ -22,7 +22,7 @@ msgstr ""
"X-Generator: Lokalize 20.07.70\n"
#: gdk/gdkapplaunchcontext.c:133 gdk/gdkdrawcontext.c:155 gdk/gdkseat.c:200
#: gdk/gdkseat.c:201 gdk/gdksurface.c:428 gdk/gdksurface.c:429
#: gdk/gdkseat.c:201 gdk/gdksurface.c:431 gdk/gdksurface.c:432
#: gdk/win32/gdkcursor-win32.c:234 gtk/gtkicontheme.c:990
#: gtk/gtkicontheme.c:991 gtk/gtkmountoperation.c:190 gtk/gtkstylecontext.c:145
#: gtk/gtkwindow.c:878
@@ -195,14 +195,19 @@ msgstr "Стан модифікатора"
msgid "The modifier state of the keyboard"
msgstr "Стан модифікатора клавіатури"
#: gdk/gdkdisplay.c:180 gdk/gdkdisplay.c:181
#: gdk/gdkdisplay.c:183 gdk/gdkdisplay.c:184
msgid "Composited"
msgstr "Складений"
#: gdk/gdkdisplay.c:193 gdk/gdkdisplay.c:194
#: gdk/gdkdisplay.c:196 gdk/gdkdisplay.c:197
msgid "RGBA"
msgstr "RGBA"
#: gdk/gdkdisplay.c:209 gdk/gdkdisplay.c:210
#| msgid "Input source"
msgid "Input shapes"
msgstr "Вхідні форми"
#: gdk/gdkdisplaymanager.c:167
msgid "Default Display"
msgstr "Типовий дисплей"
@@ -239,23 +244,23 @@ msgstr "Батьківське"
msgid "The parent surface"
msgstr "Батьківська поверхня"
#: gdk/gdkpopup.c:87 gtk/gtkpopover.c:1703
#: gdk/gdkpopup.c:87 gtk/gtkpopover.c:1637
msgid "Autohide"
msgstr "Автоприховування"
#: gdk/gdksurface.c:415 gdk/gdksurface.c:416 gtk/gtkwidget.c:1084
#: gdk/gdksurface.c:418 gdk/gdksurface.c:419 gtk/gtkwidget.c:1084
msgid "Cursor"
msgstr "Курсор"
#: gdk/gdksurface.c:435 gdk/gdksurface.c:436
#: gdk/gdksurface.c:438 gdk/gdksurface.c:439
msgid "Frame Clock"
msgstr "Годинник кадрів"
#: gdk/gdksurface.c:442 gdk/gdksurface.c:443
#: gdk/gdksurface.c:445 gdk/gdksurface.c:446
msgid "Mapped"
msgstr "Відображення"
#: gdk/gdktoplevel.c:101 gdk/gdktoplevel.c:102 gtk/gtkcssnode.c:617
#: gdk/gdktoplevel.c:103 gdk/gdktoplevel.c:104 gtk/gtkcssnode.c:617
#: gtk/gtkswitch.c:539
msgid "State"
msgstr "Стан"
@@ -747,17 +752,17 @@ msgstr ""
#: gtk/gtkaspectframe.c:166 gtk/gtkbutton.c:253 gtk/gtkcombobox.c:784
#: gtk/gtkdragicon.c:372 gtk/gtkexpander.c:366 gtk/gtkflowbox.c:513
#: gtk/gtkframe.c:190 gtk/gtklistbox.c:3455 gtk/gtknotebook.c:570
#: gtk/gtkoverlay.c:319 gtk/gtkpopover.c:1731 gtk/gtkrevealer.c:354
#: gtk/gtkoverlay.c:319 gtk/gtkpopover.c:1665 gtk/gtkrevealer.c:354
#: gtk/gtkscrolledwindow.c:759 gtk/gtksearchbar.c:316 gtk/gtkstack.c:381
#: gtk/gtkviewport.c:390 gtk/gtkwindow.c:970 gtk/gtkwindowhandle.c:578
#: gtk/gtkviewport.c:390 gtk/gtkwindow.c:970 gtk/gtkwindowhandle.c:591
msgid "Child"
msgstr "Вкладений елемент"
#: gtk/gtkaspectframe.c:167 gtk/gtkbutton.c:254 gtk/gtkexpander.c:367
#: gtk/gtkflowbox.c:514 gtk/gtkframe.c:191 gtk/gtklistbox.c:3456
#: gtk/gtkoverlay.c:320 gtk/gtkpopover.c:1732 gtk/gtkrevealer.c:355
#: gtk/gtkoverlay.c:320 gtk/gtkpopover.c:1666 gtk/gtkrevealer.c:355
#: gtk/gtkscrolledwindow.c:760 gtk/gtksearchbar.c:317 gtk/gtkviewport.c:391
#: gtk/gtkwindow.c:971 gtk/gtkwindowhandle.c:579
#: gtk/gtkwindow.c:971 gtk/gtkwindowhandle.c:592
msgid "The child widget"
msgstr "Дочірній віджет"
@@ -2845,11 +2850,11 @@ msgstr "Мітка скасування"
msgid "The label on the cancel button"
msgstr "Мітка на кнопці скасування"
#: gtk/gtkfilechooserwidget.c:7639 gtk/gtkfilechooserwidget.c:7640
#: gtk/gtkfilechooserwidget.c:7642 gtk/gtkfilechooserwidget.c:7643
msgid "Search mode"
msgstr "Режим пошуку"
#: gtk/gtkfilechooserwidget.c:7646 gtk/gtkfilechooserwidget.c:7647
#: gtk/gtkfilechooserwidget.c:7649 gtk/gtkfilechooserwidget.c:7650
#: gtk/gtkshortcutsshortcut.c:634
msgid "Subtitle"
msgstr "Підзаголовок"
@@ -4047,7 +4052,7 @@ msgstr "Позначка меню"
msgid "The text of the menu widget"
msgstr "Текст віджета меню"
#: gtk/gtknotebook.c:605 gtk/gtkpaned.c:420 gtk/gtkpopover.c:1696
#: gtk/gtknotebook.c:605 gtk/gtkpaned.c:420 gtk/gtkpopover.c:1630
msgid "Position"
msgstr "Позиція"
@@ -4272,22 +4277,18 @@ msgstr ""
"розмір, який він вимагає"
#: gtk/gtkpaned.c:528
#| msgid "Resize first child"
msgid "First child"
msgstr "Перший дочірній"
#: gtk/gtkpaned.c:529
#| msgid "Resize first child"
msgid "The first child"
msgstr "Перший дочірній"
#: gtk/gtkpaned.c:535
#| msgid "Shrink second child"
msgid "Second child"
msgstr "Другий дочірній"
#: gtk/gtkpaned.c:536
#| msgid "Resize second child"
msgid "The second child"
msgstr "Другий дочірній"
@@ -4331,19 +4332,19 @@ msgstr "Може стискатися"
msgid "Allow self to be smaller than contents"
msgstr "Дозволити віджету бути меншим за вміст"
#: gtk/gtkplacessidebar.c:4336
#: gtk/gtkplacessidebar.c:4334
msgid "Location to Select"
msgstr "Місце для позначення"
#: gtk/gtkplacessidebar.c:4337
#: gtk/gtkplacessidebar.c:4335
msgid "The location to highlight in the sidebar"
msgstr "Місце підсвічування на бічній панелі"
#: gtk/gtkplacessidebar.c:4342 gtk/gtkplacesview.c:2247
#: gtk/gtkplacessidebar.c:4340 gtk/gtkplacesview.c:2250
msgid "Open Flags"
msgstr "Прапорці відкривання"
#: gtk/gtkplacessidebar.c:4343 gtk/gtkplacesview.c:2248
#: gtk/gtkplacessidebar.c:4341 gtk/gtkplacesview.c:2251
msgid ""
"Modes in which the calling application can open locations selected in the "
"sidebar"
@@ -4351,70 +4352,70 @@ msgstr ""
"Режими, у яких програма виклику може відкривати адреси, які позначено на "
"бічній панелі"
#: gtk/gtkplacessidebar.c:4349
#: gtk/gtkplacessidebar.c:4347
msgid "Show recent files"
msgstr "Показувати нещодавні файли"
#: gtk/gtkplacessidebar.c:4350
#: gtk/gtkplacessidebar.c:4348
msgid "Whether the sidebar includes a builtin shortcut for recent files"
msgstr ""
"Визначає, чи містить бічна панель вбудований пункт для нещодавно "
"використаних файлів"
#: gtk/gtkplacessidebar.c:4355
#: gtk/gtkplacessidebar.c:4353
msgid "Show “Desktop”"
msgstr "Показувати «Стільниця»"
#: gtk/gtkplacessidebar.c:4356
#: gtk/gtkplacessidebar.c:4354
msgid "Whether the sidebar includes a builtin shortcut to the Desktop folder"
msgstr "Чи повинна бічна панель містити вбудований пункт теки стільниці"
#: gtk/gtkplacessidebar.c:4361
#: gtk/gtkplacessidebar.c:4359
msgid "Show “Enter Location”"
msgstr "Показувати «Введіть адресу»"
#: gtk/gtkplacessidebar.c:4362
#: gtk/gtkplacessidebar.c:4360
msgid ""
"Whether the sidebar includes a builtin shortcut to manually enter a location"
msgstr "Чи містить бічна панель вбудований пункт введення адреси вручну"
#: gtk/gtkplacessidebar.c:4367
#: gtk/gtkplacessidebar.c:4365
msgid "Show “Trash”"
msgstr "Показувати «Смітник»"
#: gtk/gtkplacessidebar.c:4368
#: gtk/gtkplacessidebar.c:4366
msgid "Whether the sidebar includes a builtin shortcut to the Trash location"
msgstr "Чи містить бічна панель вбудований пункт теки «Смітник»"
#: gtk/gtkplacessidebar.c:4373
#: gtk/gtkplacessidebar.c:4371
msgid "Show “Other locations”"
msgstr "Показувати «Інші місця»"
#: gtk/gtkplacessidebar.c:4374
#: gtk/gtkplacessidebar.c:4372
msgid "Whether the sidebar includes an item to show external locations"
msgstr "Чи містить бічна панель вбудований пункт зовнішніх місць"
#: gtk/gtkplacessidebar.c:4379
#: gtk/gtkplacessidebar.c:4377
msgid "Show “Starred Location”"
msgstr "Показувати «Позначене місце»"
#: gtk/gtkplacessidebar.c:4380
#: gtk/gtkplacessidebar.c:4378
msgid "Whether the sidebar includes an item to show starred files"
msgstr "Чи включає бічна панель елемент для показу позначених зірками файлів"
#: gtk/gtkplacesview.c:2233
#: gtk/gtkplacesview.c:2236
msgid "Loading"
msgstr "Завантаження"
#: gtk/gtkplacesview.c:2234
#: gtk/gtkplacesview.c:2237
msgid "Whether the view is loading locations"
msgstr "Чи показувати завантажувані місця"
#: gtk/gtkplacesview.c:2240
#: gtk/gtkplacesview.c:2243
msgid "Fetching networks"
msgstr "Отримання даних мереж"
#: gtk/gtkplacesview.c:2241
#: gtk/gtkplacesview.c:2244
msgid "Whether the view is fetching networks"
msgstr "Чи показувати отримання даних мереж"
@@ -4470,43 +4471,43 @@ msgstr "Файл, який представлено рядком, якщо та
msgid "Whether the row represents a network location"
msgstr "Чи показує рядок місце у мережі"
#: gtk/gtkpopover.c:1689
#: gtk/gtkpopover.c:1623
msgid "Pointing to"
msgstr "Вказує"
#: gtk/gtkpopover.c:1690
#: gtk/gtkpopover.c:1624
msgid "Rectangle the bubble window points to"
msgstr "Прямокутник, куди вказує вікно-бульбашка"
#: gtk/gtkpopover.c:1697
#: gtk/gtkpopover.c:1631
msgid "Position to place the bubble window"
msgstr "Позиція для розміщення вікна-бульбашки"
#: gtk/gtkpopover.c:1704
#: gtk/gtkpopover.c:1638
msgid "Whether to dismiss the popover on outside clicks"
msgstr "Чи слід закривати накладне меню при клацанні ззовні"
#: gtk/gtkpopover.c:1710 gtk/gtkwindow.c:956
#: gtk/gtkpopover.c:1644 gtk/gtkwindow.c:956
msgid "Default widget"
msgstr "Типовий віджет"
#: gtk/gtkpopover.c:1711 gtk/gtkwindow.c:957
#: gtk/gtkpopover.c:1645 gtk/gtkwindow.c:957
msgid "The default widget"
msgstr "Типовий віджет"
#: gtk/gtkpopover.c:1717
#: gtk/gtkpopover.c:1651
msgid "Has Arrow"
msgstr "Містить стрілку"
#: gtk/gtkpopover.c:1718
#: gtk/gtkpopover.c:1652
msgid "Whether to draw an arrow"
msgstr "Визначає, чи слід малювати стрілку"
#: gtk/gtkpopover.c:1724
#: gtk/gtkpopover.c:1658
msgid "Mnemonics visible"
msgstr "Мнемоніка видима"
#: gtk/gtkpopover.c:1725
#: gtk/gtkpopover.c:1659
msgid "Whether mnemonics are currently visible in this popover"
msgstr "Чи показано мнемоніку у цьому накладному меню"

View File

@@ -23,7 +23,6 @@ test_data = [
'test2.css', 'test2.ui', 'test2.nodes',
'test3.css', 'test3.ui', 'test3.nodes',
'test4.css', 'test4.ui', 'test4.nodes',
'test5.css', 'test5.ui', 'test5.nodes',
]
if get_option('install-tests')

View File

@@ -9,7 +9,7 @@ diff = find_program('diff', required: true)
common_env = [
'GIO_USE_VOLUME_MONITOR=unix',
'GSETTINGS_BACKEND=memory',
'GDK_DEBUG=default-settings:misc',
'GDK_DEBUG=default-settings',
'GTK_CSD=1',
'G_ENABLE_DIAGNOSTIC=0',
'GSETTINGS_SCHEMA_DIR=@0@'.format(gtk_schema_build_dir),