Compare commits
1 Commits
ebassi/css
...
css-var-sp
Author | SHA1 | Date | |
---|---|---|---|
|
ad220e77b5 |
20
NEWS
20
NEWS
@@ -1,20 +1,12 @@
|
||||
Overview of Changes in 4.15.2, xx-xx-xxxx
|
||||
=========================================
|
||||
|
||||
Overview of Changes in 4.15.1, 21-05-2024
|
||||
Overview of Changes in 4.15.1, xx-xx-xxxx
|
||||
=========================================
|
||||
|
||||
* GtkGraphicsOffload:
|
||||
- Don't crash without a child
|
||||
|
||||
* GtkSpinner:
|
||||
- Don't animate when unmapped
|
||||
|
||||
* CSS:
|
||||
- Support the :root selector
|
||||
- Support variables and custom properties (https://www.w3.org/TR/css-variables-1/)
|
||||
- Implement math functions (https://www.w3.org/TR/css-values-4/)
|
||||
- Support modern syntax and calc in rgb() and hsl()
|
||||
- Support variables and custom properties
|
||||
|
||||
* Icontheme:
|
||||
- Make symbolic svg loading more efficient
|
||||
@@ -51,20 +43,12 @@ Overview of Changes in 4.15.1, 21-05-2024
|
||||
|
||||
* Debugging:
|
||||
- Show more texture details in the recorder
|
||||
- Use GTK_DEBUG=css to see CSS deprecations
|
||||
|
||||
* macOS:
|
||||
- Fix problems with events handed back to the OS
|
||||
- Respect GDK_DEBUG=default-settings
|
||||
- Allow applictions to handle Dock > Quit
|
||||
|
||||
* Deprecations:
|
||||
- Use of @name colors in CSS
|
||||
|
||||
* Translation updates:
|
||||
Catalan
|
||||
Georgian
|
||||
Hungarian
|
||||
Korean
|
||||
Portuguese
|
||||
Turkish
|
||||
|
@@ -15,16 +15,16 @@ spec.
|
||||
The following units are supported for basic datatypes:
|
||||
|
||||
Length
|
||||
: px, pt, em, ex, rem, pc, in, cm, mm
|
||||
: px, pt, em, ex, rem, pc, in, cm, mm, calc()
|
||||
|
||||
Percentage
|
||||
: %
|
||||
: %, calc()
|
||||
|
||||
Angle
|
||||
: deg, rad, grad, turn
|
||||
: deg, grad, turn, calc()
|
||||
|
||||
Time
|
||||
: s, ms
|
||||
: s, ms, calc()
|
||||
|
||||
Length values with the em or ex units are resolved using the font
|
||||
size value, unless they occur in setting the font-size itself, in
|
||||
@@ -33,15 +33,11 @@ which case they are resolved using the inherited font size value.
|
||||
The rem unit is resolved using the initial font size value, which is
|
||||
not quite the same as the CSS definition of rem.
|
||||
|
||||
Length values using physical units (pt, pc, in, cm, mm) are translated
|
||||
to px using the dpi value specified by the -gtk-dpi property, which is
|
||||
different from the CSS definition, which uses a fixed dpi of 96.
|
||||
|
||||
The calc() notation adds considerable expressive power to all of these
|
||||
datatypes. There are limits on what types can be combined in such an
|
||||
expression (e.g. it does not make sense to add a number and a time).
|
||||
For the full details, see the
|
||||
[CSS Values and Units](https://www.w3.org/TR/css-values-4/) spec.
|
||||
The calc() notation adds considerable expressive power. There are limits
|
||||
on what types can be combined in such an expression (e.g. it does not make
|
||||
sense to add a number and a time). For the full details, see the
|
||||
[CSS3 Values and Units](https://www.w3.org/TR/css3-values/#calc-notation)
|
||||
spec.
|
||||
|
||||
A common pattern among shorthand properties (called 'four sides') is one
|
||||
where one to four values can be specified, to determine a value for each
|
||||
@@ -86,53 +82,36 @@ color: var(--prop, green);
|
||||
|
||||
## Colors
|
||||
|
||||
### CSS Colors
|
||||
|
||||
Colors can be expressed in numerous ways in CSS (see the
|
||||
[Color Module](https://www.w3.org/TR/css-color-5/). GTK supports
|
||||
many (but not all) of these.
|
||||
|
||||
You can use rgb(), rgba(), hsl() with both the legacy or the modern CSS
|
||||
syntax, and calc() can be used as well in color expressions.
|
||||
|
||||
### Non-CSS Colors
|
||||
|
||||
GTK extends the CSS syntax with several additional ways to specify colors.
|
||||
|
||||
These extensions are deprecated and should be replaced by the equivalent
|
||||
standard CSS notions.
|
||||
|
||||
The first is a reference to a color defined via a @define-color rule in CSS.
|
||||
The syntax for @define-color rules is as follows:
|
||||
|
||||
```
|
||||
@define-color name color
|
||||
@define-color Name Color
|
||||
```
|
||||
|
||||
To refer to the color defined by a @define-color rule, prefix the name with @.
|
||||
|
||||
The standard CSS mechanisms that should be used instead of @define-color are
|
||||
custom properties, :root and var().
|
||||
|
||||
GTK also supports color expressions, which allow colors to be transformed to
|
||||
new ones. Color expressions can be nested, providing a rich language to
|
||||
define colors. Color expressions resemble functions, taking 1 or more colors
|
||||
and in some cases a number as arguments.
|
||||
|
||||
`lighter(color)`
|
||||
: produces a brighter variant of `color`.
|
||||
`lighter(Color)`
|
||||
: produces a brighter variant of Color
|
||||
|
||||
`darker(color)`
|
||||
: produces a darker variant of `color`.
|
||||
`darker(Color)`
|
||||
: produces a darker variant of Color
|
||||
|
||||
`shade(color, number)`
|
||||
: changes the lightness of `color`. The `number` ranges from 0 for black to 2 for white.
|
||||
`shade(Color, Number)`
|
||||
: changes the lightness of Color. The number ranges from 0 for black to 2 for white.
|
||||
|
||||
`alpha(color, number)`
|
||||
: multiplies the alpha value of `color` by `number` (between 0 and 1).
|
||||
`alpha(Color, Number)`
|
||||
: replaces the alpha value of color with number (between 0 and 1)
|
||||
|
||||
`mix(color1, color2, number)`
|
||||
: interpolates between the two colors.
|
||||
`mix(Color1, Color2, Number)`
|
||||
: interpolates between the two colors
|
||||
|
||||
## Images
|
||||
|
||||
@@ -140,7 +119,7 @@ GTK extends the CSS syntax for images and also uses it for specifying icons.
|
||||
To load a themed icon, use
|
||||
|
||||
```
|
||||
-gtk-icontheme(name)
|
||||
-gtk-icontheme(Name)
|
||||
```
|
||||
|
||||
The specified icon name is used to look up a themed icon, while taking into
|
||||
@@ -169,14 +148,14 @@ and the
|
||||
syntax makes this available. -gtk-recolor requires a url as first argument.
|
||||
The remaining arguments specify the color palette to use. If the palette is
|
||||
not explicitly specified, the current value of the -gtk-icon-palette property
|
||||
is used.
|
||||
is used.
|
||||
|
||||
GTK supports scaled rendering on hi-resolution displays. This works best if
|
||||
images can specify normal and hi-resolution variants. From CSS, this can be
|
||||
done with
|
||||
|
||||
```
|
||||
-gtk-scaled(image1, image2)
|
||||
-gtk-scaled(Image1, Image2)
|
||||
```
|
||||
|
||||
## GTK CSS Properties
|
||||
|
@@ -522,6 +522,8 @@ gdk_clipboard_get_content (GdkClipboard *clipboard)
|
||||
*
|
||||
* If the clipboard is not local, this function does nothing but report success.
|
||||
*
|
||||
* The @callback must call [method@Gdk.Clipboard.store_finish].
|
||||
*
|
||||
* The purpose of this call is to preserve clipboard contents beyond the
|
||||
* lifetime of an application, so this function is typically called on
|
||||
* exit. Depending on the platform, the functionality may not be available
|
||||
@@ -636,6 +638,9 @@ gdk_clipboard_read_internal (GdkClipboard *clipboard,
|
||||
* Asynchronously requests an input stream to read the @clipboard's
|
||||
* contents from.
|
||||
*
|
||||
* When the operation is finished @callback will be called. You must then
|
||||
* call [method@Gdk.Clipboard.read_finish] to get the result of the operation.
|
||||
*
|
||||
* The clipboard will choose the most suitable mime type from the given list
|
||||
* to fulfill the request, preferring the ones listed first.
|
||||
*/
|
||||
@@ -829,6 +834,9 @@ gdk_clipboard_read_value_internal (GdkClipboard *clipboard,
|
||||
* Asynchronously request the @clipboard contents converted to the given
|
||||
* @type.
|
||||
*
|
||||
* When the operation is finished @callback will be called. You must then call
|
||||
* [method@Gdk.Clipboard.read_value_finish] to get the resulting `GValue`.
|
||||
*
|
||||
* For local clipboard contents that are available in the given `GType`,
|
||||
* the value will be copied directly. Otherwise, GDK will try to use
|
||||
* [func@content_deserialize_async] to convert the clipboard's data.
|
||||
@@ -887,6 +895,9 @@ gdk_clipboard_read_value_finish (GdkClipboard *clipboard,
|
||||
*
|
||||
* Asynchronously request the @clipboard contents converted to a `GdkPixbuf`.
|
||||
*
|
||||
* When the operation is finished @callback will be called. You must then
|
||||
* call [method@Gdk.Clipboard.read_texture_finish] to get the result.
|
||||
*
|
||||
* This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].
|
||||
* Use that function or [method@Gdk.Clipboard.read_async] directly if you
|
||||
* need more control over the operation.
|
||||
@@ -949,6 +960,9 @@ gdk_clipboard_read_texture_finish (GdkClipboard *clipboard,
|
||||
*
|
||||
* Asynchronously request the @clipboard contents converted to a string.
|
||||
*
|
||||
* When the operation is finished @callback will be called. You must then
|
||||
* call [method@Gdk.Clipboard.read_text_finish] to get the result.
|
||||
*
|
||||
* This is a simple wrapper around [method@Gdk.Clipboard.read_value_async].
|
||||
* Use that function or [method@Gdk.Clipboard.read_async] directly if you
|
||||
* need more control over the operation.
|
||||
|
@@ -540,6 +540,9 @@ deserialize_not_found (GdkContentDeserializer *deserializer)
|
||||
*
|
||||
* The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers
|
||||
* indicate a higher priority.
|
||||
*
|
||||
* When the operation is finished, @callback will be called. You must then
|
||||
* call [func@Gdk.content_deserialize_finish] to get the result of the operation.
|
||||
*/
|
||||
void
|
||||
gdk_content_deserialize_async (GInputStream *stream,
|
||||
|
@@ -279,6 +279,10 @@ gdk_content_provider_content_changed (GdkContentProvider *provider)
|
||||
* Asynchronously writes the contents of @provider to @stream in the given
|
||||
* @mime_type.
|
||||
*
|
||||
* When the operation is finished @callback will be called. You must then call
|
||||
* [method@Gdk.ContentProvider.write_mime_type_finish] to get the result
|
||||
* of the operation.
|
||||
*
|
||||
* The given mime type does not need to be listed in the formats returned by
|
||||
* [method@Gdk.ContentProvider.ref_formats]. However, if the given `GType` is
|
||||
* not supported, `G_IO_ERROR_NOT_SUPPORTED` will be reported.
|
||||
|
@@ -546,6 +546,9 @@ serialize_not_found (GdkContentSerializer *serializer)
|
||||
*
|
||||
* The default I/O priority is %G_PRIORITY_DEFAULT (i.e. 0), and lower numbers
|
||||
* indicate a higher priority.
|
||||
*
|
||||
* When the operation is finished, @callback will be called. You must then
|
||||
* call [func@Gdk.content_serialize_finish] to get the result of the operation.
|
||||
*/
|
||||
void
|
||||
gdk_content_serialize_async (GOutputStream *stream,
|
||||
|
@@ -134,7 +134,7 @@ gdk_drop_read_local_async (GdkDrop *self,
|
||||
|
||||
g_object_get (priv->drag, "content", &content, NULL);
|
||||
content_formats = gdk_content_provider_ref_formats (content);
|
||||
g_object_unref (content);
|
||||
g_object_unref (content);
|
||||
content_formats = gdk_content_formats_union_serialize_mime_types (content_formats);
|
||||
mime_type = gdk_content_formats_match_mime_type (content_formats, formats);
|
||||
|
||||
@@ -784,7 +784,7 @@ gdk_drop_read_value_internal (GdkDrop *self,
|
||||
GdkContentFormats *formats;
|
||||
GValue *value;
|
||||
GTask *task;
|
||||
|
||||
|
||||
g_return_if_fail (priv->state != GDK_DROP_STATE_FINISHED);
|
||||
|
||||
task = g_task_new (self, cancellable, callback, user_data);
|
||||
@@ -849,6 +849,10 @@ gdk_drop_read_value_internal (GdkDrop *self,
|
||||
* Asynchronously request the drag operation's contents converted
|
||||
* to the given @type.
|
||||
*
|
||||
* When the operation is finished @callback will be called. You must
|
||||
* then call [method@Gdk.Drop.read_value_finish] to get the resulting
|
||||
* `GValue`.
|
||||
*
|
||||
* For local drag-and-drop operations that are available in the given
|
||||
* `GType`, the value will be copied directly. Otherwise, GDK will
|
||||
* try to use [func@Gdk.content_deserialize_async] to convert the data.
|
||||
|
@@ -767,6 +767,9 @@ gdk_toplevel_titlebar_gesture (GdkToplevel *toplevel,
|
||||
* This function asynchronously obtains a handle for a toplevel surface
|
||||
* that can be passed to other processes.
|
||||
*
|
||||
* When a handle has been obtained, @callback will be called, and can
|
||||
* receive the handle via [method@Gdk.Toplevel.export_handle_finish].
|
||||
*
|
||||
* It is an error to call this function on a surface that is already
|
||||
* exported.
|
||||
*
|
||||
|
@@ -96,12 +96,12 @@ _gdk_macos_drag_surface_constructed (GObject *object)
|
||||
defer:NO
|
||||
screen:screen];
|
||||
|
||||
_gdk_macos_surface_set_native (self, window);
|
||||
|
||||
[window setOpaque:NO];
|
||||
[window setBackgroundColor:[NSColor clearColor]];
|
||||
[window setDecorated:NO];
|
||||
|
||||
_gdk_macos_surface_set_native (self, window);
|
||||
|
||||
frame_clock = _gdk_frame_clock_idle_new ();
|
||||
gdk_surface_set_frame_clock (surface, frame_clock);
|
||||
g_object_unref (frame_clock);
|
||||
|
@@ -52,7 +52,6 @@ gdk_macos_popup_surface_layout (GdkMacosPopupSurface *self,
|
||||
GdkRectangle bounds;
|
||||
GdkRectangle final_rect;
|
||||
int x, y;
|
||||
int shadow_left, shadow_right, shadow_top, shadow_bottom;
|
||||
|
||||
g_assert (GDK_IS_MACOS_POPUP_SURFACE (self));
|
||||
g_assert (layout != NULL);
|
||||
@@ -69,19 +68,10 @@ gdk_macos_popup_surface_layout (GdkMacosPopupSurface *self,
|
||||
monitor = _gdk_macos_surface_get_best_monitor (GDK_MACOS_SURFACE (self));
|
||||
gdk_macos_monitor_get_workarea (monitor, &bounds);
|
||||
|
||||
gdk_popup_layout_get_shadow_width (layout,
|
||||
&shadow_left,
|
||||
&shadow_right,
|
||||
&shadow_top,
|
||||
&shadow_bottom);
|
||||
|
||||
gdk_surface_layout_popup_helper (GDK_SURFACE (self),
|
||||
width,
|
||||
height,
|
||||
shadow_left,
|
||||
shadow_right,
|
||||
shadow_top,
|
||||
shadow_bottom,
|
||||
0, 0, 0, 0, /* shadow-left/right/top/bottom */
|
||||
monitor,
|
||||
&bounds,
|
||||
self->layout,
|
||||
@@ -316,14 +306,14 @@ _gdk_macos_popup_surface_constructed (GObject *object)
|
||||
defer:NO
|
||||
screen:screen];
|
||||
|
||||
_gdk_macos_surface_set_native (GDK_MACOS_SURFACE (self), window);
|
||||
|
||||
[window setOpaque:NO];
|
||||
[window setBackgroundColor:[NSColor clearColor]];
|
||||
[window setDecorated:NO];
|
||||
[window setExcludedFromWindowsMenu:YES];
|
||||
[window setLevel:NSPopUpMenuWindowLevel];
|
||||
|
||||
_gdk_macos_surface_set_native (GDK_MACOS_SURFACE (self), window);
|
||||
|
||||
gdk_surface_set_frame_clock (surface, gdk_surface_get_frame_clock (surface->parent));
|
||||
|
||||
GDK_END_MACOS_ALLOC_POOL;
|
||||
|
@@ -591,11 +591,11 @@ _gdk_macos_toplevel_surface_constructed (GObject *object)
|
||||
defer:NO
|
||||
screen:screen];
|
||||
|
||||
_gdk_macos_surface_set_native (GDK_MACOS_SURFACE (self), window);
|
||||
|
||||
/* Allow NSWindow to go fullscreen */
|
||||
[window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
||||
|
||||
_gdk_macos_surface_set_native (GDK_MACOS_SURFACE (self), window);
|
||||
|
||||
frame_clock = _gdk_frame_clock_idle_new ();
|
||||
gdk_surface_set_frame_clock (surface, frame_clock);
|
||||
g_object_unref (frame_clock);
|
||||
|
@@ -128,8 +128,8 @@ install_headers(gdk_deprecated_headers, subdir: 'gtk-4.0/gdk/deprecated')
|
||||
gdk_sources = gdk_public_sources + gdk_deprecated_sources
|
||||
|
||||
gdk_private_h_sources = files([
|
||||
'gdkdevicetoolprivate.h',
|
||||
'gdkeventsprivate.h',
|
||||
'gdkdevicetoolprivate.h',
|
||||
'gdkhslaprivate.h',
|
||||
'gdkmonitorprivate.h',
|
||||
'gdkseatdefaultprivate.h',
|
||||
|
@@ -37,7 +37,6 @@ static struct {
|
||||
{ "appstarting", IDC_APPSTARTING },
|
||||
{ "arrow", IDC_ARROW },
|
||||
{ "cross", IDC_CROSS },
|
||||
{ "dnd-move", IDC_ARROW },
|
||||
{ "hand", IDC_HAND },
|
||||
{ "help", IDC_HELP },
|
||||
{ "ibeam", IDC_IBEAM },
|
||||
|
@@ -70,10 +70,7 @@ gsk_gl_frame_cleanup (GskGpuFrame *frame)
|
||||
if (self->sync)
|
||||
{
|
||||
glClientWaitSync (self->sync, 0, -1);
|
||||
|
||||
/* can't use g_clear_pointer() on glDeleteSync(), see MR !7294 */
|
||||
glDeleteSync (self->sync);
|
||||
self->sync = NULL;
|
||||
g_clear_pointer (&self->sync, glDeleteSync);
|
||||
}
|
||||
|
||||
self->next_texture_slot = 0;
|
||||
|
@@ -249,13 +249,7 @@ gsk_gl_texture_data_free (gpointer user_data)
|
||||
|
||||
gdk_gl_context_make_current (data->context);
|
||||
|
||||
/* can't use g_clear_pointer() on glDeleteSync(), see MR !7294 */
|
||||
if (data->sync)
|
||||
{
|
||||
glDeleteSync (data->sync);
|
||||
data->sync = NULL;
|
||||
}
|
||||
|
||||
g_clear_pointer (&data->sync, glDeleteSync);
|
||||
glDeleteTextures (1, &data->texture_id);
|
||||
g_object_unref (data->context);
|
||||
|
||||
|
@@ -1261,7 +1261,7 @@ gsk_vulkan_device_find_allocator (GskVulkanDevice *self,
|
||||
|
||||
g_assert (found < properties.memoryTypeCount);
|
||||
|
||||
return gsk_vulkan_allocator_ref (gsk_vulkan_device_get_allocator (self, found, &properties.memoryTypes[found]));
|
||||
return gsk_vulkan_allocator_ref (gsk_vulkan_device_get_allocator (self, i, &properties.memoryTypes[i]));
|
||||
}
|
||||
|
||||
GskVulkanAllocator *
|
||||
|
@@ -26,11 +26,6 @@
|
||||
#include "gtkcsserror.h"
|
||||
#include "gtkcsslocationprivate.h"
|
||||
|
||||
/* We cannot include gtkdebug.h, so we must keep this in sync */
|
||||
extern unsigned int gtk_get_debug_flags (void);
|
||||
#define DEBUG_CSS (1 << 20)
|
||||
#define DEBUG_CHECK_CSS ((gtk_get_debug_flags () & DEBUG_CSS) != 0)
|
||||
|
||||
static void clear_ref (GtkCssVariableValueReference *ref);
|
||||
|
||||
#define GDK_ARRAY_NAME gtk_css_parser_references
|
||||
@@ -631,7 +626,7 @@ void
|
||||
gtk_css_parser_skip (GtkCssParser *self)
|
||||
{
|
||||
const GtkCssToken *token;
|
||||
|
||||
|
||||
token = gtk_css_parser_get_token (self);
|
||||
if (gtk_css_token_is_preserved (token, NULL))
|
||||
{
|
||||
@@ -664,7 +659,7 @@ gtk_css_parser_skip_until (GtkCssParser *self,
|
||||
GtkCssTokenType token_type)
|
||||
{
|
||||
const GtkCssToken *token;
|
||||
|
||||
|
||||
for (token = gtk_css_parser_get_token (self);
|
||||
!gtk_css_token_is (token, token_type) &&
|
||||
!gtk_css_token_is (token, GTK_CSS_TOKEN_EOF);
|
||||
@@ -817,29 +812,6 @@ gtk_css_parser_warn_syntax (GtkCssParser *self,
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_css_parser_warn_deprecated (GtkCssParser *self,
|
||||
const char *format,
|
||||
...)
|
||||
{
|
||||
if (DEBUG_CHECK_CSS)
|
||||
{
|
||||
va_list args;
|
||||
GError *error;
|
||||
|
||||
va_start (args, format);
|
||||
error = g_error_new_valist (GTK_CSS_PARSER_WARNING,
|
||||
GTK_CSS_PARSER_WARNING_DEPRECATED,
|
||||
format, args);
|
||||
gtk_css_parser_emit_error (self,
|
||||
gtk_css_parser_get_start_location (self),
|
||||
gtk_css_parser_get_end_location (self),
|
||||
error);
|
||||
g_error_free (error);
|
||||
va_end (args);
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_css_parser_consume_function (GtkCssParser *self,
|
||||
guint min_args,
|
||||
@@ -1161,7 +1133,7 @@ gtk_css_parser_parse_url_arg (GtkCssParser *parser,
|
||||
*out_url = gtk_css_parser_consume_string (parser);
|
||||
if (*out_url == NULL)
|
||||
return 0;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1207,7 +1179,7 @@ gtk_css_parser_consume_url (GtkCssParser *self)
|
||||
gtk_css_parser_error_syntax (self, "Expected a URL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
|
@@ -120,9 +120,6 @@ void gtk_css_parser_warn (GtkCssParser
|
||||
void gtk_css_parser_warn_syntax (GtkCssParser *self,
|
||||
const char *format,
|
||||
...) G_GNUC_PRINTF(2, 3);
|
||||
void gtk_css_parser_warn_deprecated (GtkCssParser *self,
|
||||
const char *format,
|
||||
...) G_GNUC_PRINTF(2, 3);
|
||||
|
||||
|
||||
gboolean gtk_css_parser_has_token (GtkCssParser *self,
|
||||
|
@@ -62,7 +62,7 @@ struct _GtkMessageDialog
|
||||
*
|
||||
* > Please note that %GTK_BUTTONS_OK, %GTK_BUTTONS_YES_NO
|
||||
* > and %GTK_BUTTONS_OK_CANCEL are discouraged by the
|
||||
* > [GNOME Human Interface Guidelines](https://developer.gnome.org/hig/).
|
||||
* > [GNOME Human Interface Guidelines](http://library.gnome.org/devel/hig-book/stable/).
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
|
@@ -99,6 +99,7 @@ window_handle_exported (GtkWindow *window,
|
||||
* a given uri.
|
||||
*
|
||||
* The @callback will be called when the launch is completed.
|
||||
* It should call gtk_show_uri_full_finish() to obtain the result.
|
||||
*
|
||||
* This is the recommended call to be used as it passes information
|
||||
* necessary for sandbox helpers to parent their dialogs properly.
|
||||
@@ -152,8 +153,8 @@ gtk_show_uri_full (GtkWindow *parent,
|
||||
* Returns: %TRUE if the URI was shown successfully.
|
||||
* Otherwise, %FALSE is returned and @error is set
|
||||
*
|
||||
* Deprecated: 4.10: Use [method@Gtk.FileLauncher.launch] or
|
||||
* [method@Gtk.UriLauncher.launch] instead
|
||||
* Deprecated: 4.10: Use [method@Gtk.FileLauncher.launch_finish] or
|
||||
* [method@Gtk.UriLauncher.launch_finish] instead
|
||||
*/
|
||||
gboolean
|
||||
gtk_show_uri_full_finish (GtkWindow *parent,
|
||||
|
@@ -33,7 +33,8 @@
|
||||
* are needed to present a message to the user.
|
||||
*
|
||||
* The message is shown with the [method@Gtk.AlertDialog.choose]
|
||||
* function.
|
||||
* function. This API follows the GIO async pattern, and the result can
|
||||
* be obtained by calling [method@Gtk.AlertDialog.choose_finish].
|
||||
*
|
||||
* If you don't need to wait for a button to be clicked, you can use
|
||||
* [method@Gtk.AlertDialog.show].
|
||||
@@ -686,6 +687,10 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
*
|
||||
* This function shows the alert to the user.
|
||||
*
|
||||
* The @callback will be called when the alert is dismissed.
|
||||
* It should call [method@Gtk.AlertDialog.choose_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* It is ok to pass `NULL` for the callback if the alert
|
||||
* does not have more than one button. A simpler API for
|
||||
* this case is [method@Gtk.AlertDialog.show].
|
||||
|
@@ -36,7 +36,9 @@
|
||||
* should be modal.
|
||||
*
|
||||
* The dialog is shown with the [method@Gtk.ColorDialog.choose_rgba]
|
||||
* function.
|
||||
* function. This API follows the GIO async pattern, and the
|
||||
* result can be obtained by calling
|
||||
* [method@Gtk.ColorDialog.choose_rgba_finish].
|
||||
*
|
||||
* See [class@Gtk.ColorDialogButton] for a convenient control
|
||||
* that uses `GtkColorDialog` and presents the results.
|
||||
@@ -434,6 +436,10 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
* This function initiates a color choice operation by
|
||||
* presenting a color chooser dialog to the user.
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* It should call [method@Gtk.ColorDialog.choose_rgba_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
void
|
||||
|
@@ -32,9 +32,7 @@
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gtkcolorutilsprivate.h"
|
||||
#include "gdkhslaprivate.h"
|
||||
#include <math.h>
|
||||
#include "gtkcolorutils.h"
|
||||
|
||||
/* Converts from RGB to HSV */
|
||||
static void
|
||||
@@ -228,135 +226,3 @@ gtk_rgb_to_hsv (float r, float g, float b,
|
||||
if (v)
|
||||
*v = b;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_rgb_to_hwb (float red, float green, float blue,
|
||||
float *hue, float *white, float *black)
|
||||
{
|
||||
GdkRGBA rgba = (GdkRGBA) { red, green, blue, 1 };
|
||||
GdkHSLA hsla;
|
||||
|
||||
_gdk_hsla_init_from_rgba (&hsla, &rgba);
|
||||
|
||||
*hue = hsla.hue;
|
||||
*white = MIN (MIN (red, green), blue);
|
||||
*black = (1 - MAX (MAX (red, green), blue));
|
||||
}
|
||||
|
||||
void
|
||||
gtk_hwb_to_rgb (float hue, float white, float black,
|
||||
float *red, float *green, float *blue)
|
||||
{
|
||||
GdkHSLA hsla;
|
||||
GdkRGBA rgba;
|
||||
|
||||
if (white + black >= 1)
|
||||
{
|
||||
float gray = white / (white + black);
|
||||
|
||||
*red = gray;
|
||||
*green = gray;
|
||||
*blue = gray;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
hsla.hue = hue;
|
||||
hsla.saturation = 1.0;
|
||||
hsla.lightness = 0.5;
|
||||
|
||||
_gdk_rgba_init_from_hsla (&rgba, &hsla);
|
||||
|
||||
*red = rgba.red * (1 - white - black) + white;
|
||||
*green = rgba.green * (1 - white - black) + white;
|
||||
*blue = rgba.blue * (1 - white - black) + white;
|
||||
}
|
||||
|
||||
#define DEG_TO_RAD(x) ((x) * G_PI / 180)
|
||||
#define RAD_TO_DEG(x) ((x) * 180 / G_PI)
|
||||
|
||||
void
|
||||
gtk_oklab_to_oklch (float L, float a, float b,
|
||||
float *L2, float *C, float *H)
|
||||
{
|
||||
*L2 = L;
|
||||
*C = sqrtf (a * a + b * b);
|
||||
*H = atan2 (b, a);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_oklch_to_oklab (float L, float C, float H,
|
||||
float *L2, float *a, float *b)
|
||||
{
|
||||
*L2 = L;
|
||||
|
||||
if (H == 0)
|
||||
{
|
||||
*a = *b = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*a = C * cosf (DEG_TO_RAD (H));
|
||||
*b = C * sinf (DEG_TO_RAD (H));
|
||||
}
|
||||
}
|
||||
|
||||
static float
|
||||
apply_gamma (float v)
|
||||
{
|
||||
if (v > 0.0031308)
|
||||
return 1.055 * pow (v, 1/2.4) - 0.055;
|
||||
else
|
||||
return 12.92 * v;
|
||||
}
|
||||
|
||||
static float
|
||||
unapply_gamma (float v)
|
||||
{
|
||||
if (v >= 0.04045)
|
||||
return pow (((v + 0.055)/(1 + 0.055)), 2.4);
|
||||
else
|
||||
return v / 12.92;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_oklab_to_rgb (float L, float a, float b,
|
||||
float *red, float *green, float *blue)
|
||||
{
|
||||
float l = L + 0.3963377774f * a + 0.2158037573f * b;
|
||||
float m = L - 0.1055613458f * a - 0.0638541728f * b;
|
||||
float s = L - 0.0894841775f * a - 1.2914855480f * b;
|
||||
|
||||
l = powf (l, 3);
|
||||
m = powf (m, 3);
|
||||
s = powf (s, 3);
|
||||
|
||||
float linear_red = +4.0767416621f * l - 3.3077115913f * m + 0.2309699292f * s;
|
||||
float linear_green = -1.2684380046f * l + 2.6097574011f * m - 0.3413193965f * s;
|
||||
float linear_blue = -0.0041960863f * l - 0.7034186147f * m + 1.7076147010f * s;
|
||||
|
||||
*red = apply_gamma (linear_red);
|
||||
*green = apply_gamma (linear_green);
|
||||
*blue = apply_gamma (linear_blue);
|
||||
}
|
||||
|
||||
void
|
||||
gtk_rgb_to_oklab (float red, float green, float blue,
|
||||
float *L, float *a, float *b)
|
||||
{
|
||||
float linear_red = unapply_gamma (red);
|
||||
float linear_green = unapply_gamma (green);
|
||||
float linear_blue = unapply_gamma (blue);
|
||||
|
||||
float l = 0.4122214708f * linear_red + 0.5363325363f * linear_green + 0.0514459929f * linear_blue;
|
||||
float m = 0.2119034982f * linear_red + 0.6806995451f * linear_green + 0.1073969566f * linear_blue;
|
||||
float s = 0.0883024619f * linear_red + 0.2817188376f * linear_green + 0.6299787005f * linear_blue;
|
||||
|
||||
l = cbrtf (l);
|
||||
m = cbrtf (m);
|
||||
s = cbrtf (s);
|
||||
|
||||
*L = 0.2104542553f*l + 0.7936177850f*m - 0.0040720468f*s;
|
||||
*a = 1.9779984951f*l - 2.4285922050f*m + 0.4505937099f*s;
|
||||
*b = 0.0259040371f*l + 0.7827717662f*m - 0.8086757660f*s;
|
||||
}
|
||||
|
@@ -1,40 +0,0 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2024 Red Hat, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "gtkcolorutils.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void gtk_rgb_to_hwb (float red, float green, float blue,
|
||||
float *hue, float *white, float *black);
|
||||
void gtk_hwb_to_rgb (float hue, float white, float black,
|
||||
float *red, float *green, float *blue);
|
||||
|
||||
void gtk_oklab_to_oklch (float L, float a, float b,
|
||||
float *L2, float *C, float *H);
|
||||
void gtk_oklch_to_oklab (float L, float C, float H,
|
||||
float *L2, float *a, float *b);
|
||||
|
||||
void gtk_oklab_to_rgb (float L, float a, float b,
|
||||
float *red, float *green, float *blue);
|
||||
void gtk_rgb_to_oklab (float red, float green, float blue,
|
||||
float *L, float *a, float *b);
|
||||
|
||||
G_END_DECLS
|
||||
|
@@ -645,20 +645,15 @@ gtk_css_animated_style_get_intrinsic_value (GtkCssAnimatedStyle *style,
|
||||
return gtk_css_style_get_value (style->style, id);
|
||||
}
|
||||
|
||||
gboolean
|
||||
void
|
||||
gtk_css_animated_style_set_animated_custom_value (GtkCssAnimatedStyle *animated,
|
||||
int id,
|
||||
GtkCssVariableValue *value)
|
||||
{
|
||||
GtkCssStyle *style = (GtkCssStyle *)animated;
|
||||
GtkCssVariableValue *old_value;
|
||||
|
||||
gtk_internal_return_val_if_fail (GTK_IS_CSS_ANIMATED_STYLE (style), FALSE);
|
||||
gtk_internal_return_val_if_fail (value != NULL, FALSE);
|
||||
|
||||
old_value = gtk_css_style_get_custom_property (style, id);
|
||||
if (gtk_css_variable_value_equal (old_value, value))
|
||||
return FALSE;
|
||||
gtk_internal_return_if_fail (GTK_IS_CSS_ANIMATED_STYLE (style));
|
||||
gtk_internal_return_if_fail (value != NULL);
|
||||
|
||||
if (style->variables == NULL)
|
||||
{
|
||||
@@ -674,8 +669,6 @@ gtk_css_animated_style_set_animated_custom_value (GtkCssAnimatedStyle *animated,
|
||||
}
|
||||
|
||||
gtk_css_variable_set_add (style->variables, id, value);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -70,7 +70,7 @@ void gtk_css_animated_style_set_animated_value(GtkCssAnimated
|
||||
GtkCssValue * gtk_css_animated_style_get_intrinsic_value (GtkCssAnimatedStyle *style,
|
||||
guint id);
|
||||
|
||||
gboolean gtk_css_animated_style_set_animated_custom_value (GtkCssAnimatedStyle *animated,
|
||||
void gtk_css_animated_style_set_animated_custom_value (GtkCssAnimatedStyle *animated,
|
||||
int id,
|
||||
GtkCssVariableValue *value);
|
||||
|
||||
|
@@ -126,10 +126,11 @@ gtk_css_animation_apply_values (GtkStyleAnimation *style_animation,
|
||||
if (!value)
|
||||
continue;
|
||||
|
||||
if (gtk_css_animated_style_set_animated_custom_value (style, variable_id, value))
|
||||
change |= GTK_CSS_ANIMATION_CHANGE_VARIABLES;
|
||||
gtk_css_animated_style_set_animated_custom_value (style, variable_id, value);
|
||||
|
||||
gtk_css_variable_value_unref (value);
|
||||
|
||||
change |= GTK_CSS_ANIMATION_CHANGE_VARIABLES;
|
||||
}
|
||||
|
||||
for (i = 0; i < _gtk_css_keyframes_get_n_properties (resolved_keyframes); i++)
|
||||
|
@@ -22,13 +22,11 @@
|
||||
#include "gtkcssstylepropertyprivate.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkstylepropertyprivate.h"
|
||||
#include "gtkcssnumbervalueprivate.h"
|
||||
#include "gtkcssstyleprivate.h"
|
||||
#include "gtkstyleproviderprivate.h"
|
||||
|
||||
#include "gdk/gdkhslaprivate.h"
|
||||
#include "gdk/gdkrgbaprivate.h"
|
||||
#include "gtkcolorutilsprivate.h"
|
||||
|
||||
typedef enum {
|
||||
COLOR_TYPE_LITERAL,
|
||||
@@ -695,511 +693,13 @@ gtk_css_color_value_can_parse (GtkCssParser *parser)
|
||||
|| gtk_css_parser_has_function (parser, "hsl")
|
||||
|| gtk_css_parser_has_function (parser, "hsla")
|
||||
|| gtk_css_parser_has_function (parser, "rgb")
|
||||
|| gtk_css_parser_has_function (parser, "rgba")
|
||||
|| gtk_css_parser_has_function (parser, "hwb")
|
||||
|| gtk_css_parser_has_function (parser, "oklab")
|
||||
|| gtk_css_parser_has_function (parser, "oklch");
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GdkRGBA *rgba;
|
||||
gboolean use_percentages;
|
||||
} ParseRGBAData;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
COLOR_SYNTAX_DETECTING,
|
||||
COLOR_SYNTAX_MODERN,
|
||||
COLOR_SYNTAX_LEGACY,
|
||||
} ColorSyntax;
|
||||
|
||||
static gboolean
|
||||
parse_rgb_channel_value (GtkCssParser *parser,
|
||||
float *value,
|
||||
ColorSyntax syntax,
|
||||
ParseRGBAData *data)
|
||||
{
|
||||
gboolean has_percentage =
|
||||
gtk_css_token_is (gtk_css_parser_get_token (parser), GTK_CSS_TOKEN_PERCENTAGE);
|
||||
GtkCssValue *val;
|
||||
|
||||
switch (syntax)
|
||||
{
|
||||
case COLOR_SYNTAX_DETECTING:
|
||||
data->use_percentages = has_percentage;
|
||||
break;
|
||||
|
||||
case COLOR_SYNTAX_LEGACY:
|
||||
if (data->use_percentages != has_percentage)
|
||||
{
|
||||
gtk_css_parser_error_syntax (parser, "Legacy color syntax doesn't allow mixing numbers and percentages");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case COLOR_SYNTAX_MODERN:
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
val = gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER | GTK_CSS_PARSE_PERCENT);
|
||||
if (val == NULL)
|
||||
return FALSE;
|
||||
|
||||
*value = gtk_css_number_value_get_canonical (val, 255);
|
||||
*value = CLAMP (*value, 0.0, 255.0) / 255.0;
|
||||
|
||||
gtk_css_value_unref (val);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_alpha_value (GtkCssParser *parser,
|
||||
float *value,
|
||||
ColorSyntax syntax)
|
||||
{
|
||||
GtkCssNumberParseFlags flags = GTK_CSS_PARSE_NUMBER;
|
||||
GtkCssValue *val;
|
||||
|
||||
if (syntax == COLOR_SYNTAX_MODERN)
|
||||
flags |= GTK_CSS_PARSE_PERCENT;
|
||||
|
||||
val = gtk_css_number_value_parse (parser, flags);
|
||||
if (val == NULL)
|
||||
return FALSE;
|
||||
|
||||
*value = gtk_css_number_value_get_canonical (val, 1);
|
||||
*value = CLAMP (*value, 0.0, 1.0);
|
||||
|
||||
gtk_css_value_unref (val);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_hsl_channel_value (GtkCssParser *parser,
|
||||
float *value,
|
||||
ColorSyntax syntax)
|
||||
{
|
||||
GtkCssNumberParseFlags flags = GTK_CSS_PARSE_PERCENT;
|
||||
GtkCssValue *val;
|
||||
|
||||
if (syntax == COLOR_SYNTAX_MODERN)
|
||||
flags |= GTK_CSS_PARSE_NUMBER;
|
||||
|
||||
val = gtk_css_number_value_parse (parser, flags);
|
||||
if (val == NULL)
|
||||
return FALSE;
|
||||
|
||||
*value = gtk_css_number_value_get_canonical (val, 100);
|
||||
*value = CLAMP (*value, 0.0, 100.0) / 100.0;
|
||||
|
||||
gtk_css_value_unref (val);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_hwb_channel_value (GtkCssParser *parser,
|
||||
float *value)
|
||||
{
|
||||
GtkCssNumberParseFlags flags = GTK_CSS_PARSE_PERCENT | GTK_CSS_PARSE_NUMBER;
|
||||
GtkCssValue *val;
|
||||
|
||||
val = gtk_css_number_value_parse (parser, flags);
|
||||
if (val == NULL)
|
||||
return FALSE;
|
||||
|
||||
*value = gtk_css_number_value_get_canonical (val, 100);
|
||||
*value = CLAMP (*value, 0.0, 100.0);
|
||||
|
||||
gtk_css_value_unref (val);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_hue_value (GtkCssParser *parser,
|
||||
float *value)
|
||||
{
|
||||
GtkCssValue *hue;
|
||||
|
||||
hue = gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER | GTK_CSS_PARSE_ANGLE);
|
||||
if (hue == NULL)
|
||||
return FALSE;
|
||||
|
||||
*value = gtk_css_number_value_get_canonical (hue, 360);
|
||||
|
||||
gtk_css_value_unref (hue);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_ok_L_value (GtkCssParser *parser,
|
||||
float *value)
|
||||
{
|
||||
GtkCssNumberParseFlags flags = GTK_CSS_PARSE_PERCENT | GTK_CSS_PARSE_NUMBER;
|
||||
GtkCssValue *val;
|
||||
|
||||
val = gtk_css_number_value_parse (parser, flags);
|
||||
if (val == NULL)
|
||||
return FALSE;
|
||||
|
||||
*value = gtk_css_number_value_get_canonical (val, 1);
|
||||
*value = CLAMP (*value, 0.0, 1.0);
|
||||
|
||||
gtk_css_value_unref (val);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_ok_C_value (GtkCssParser *parser,
|
||||
float *value)
|
||||
{
|
||||
GtkCssNumberParseFlags flags = GTK_CSS_PARSE_PERCENT | GTK_CSS_PARSE_NUMBER;
|
||||
GtkCssValue *val;
|
||||
|
||||
val = gtk_css_number_value_parse (parser, flags);
|
||||
if (val == NULL)
|
||||
return FALSE;
|
||||
|
||||
*value = gtk_css_number_value_get_canonical (val, 1);
|
||||
*value = MAX (*value, 0.0);
|
||||
|
||||
gtk_css_value_unref (val);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_ok_ab_value (GtkCssParser *parser,
|
||||
float *value)
|
||||
{
|
||||
GtkCssNumberParseFlags flags = GTK_CSS_PARSE_PERCENT | GTK_CSS_PARSE_NUMBER;
|
||||
GtkCssValue *val;
|
||||
|
||||
val = gtk_css_number_value_parse (parser, flags);
|
||||
if (val == NULL)
|
||||
return FALSE;
|
||||
|
||||
*value = gtk_css_number_value_get_canonical (val, 0.4);
|
||||
|
||||
gtk_css_value_unref (val);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static guint
|
||||
parse_rgba_color_channel (GtkCssParser *parser,
|
||||
guint arg,
|
||||
ColorSyntax syntax,
|
||||
gpointer data)
|
||||
{
|
||||
ParseRGBAData *rgba_data = data;
|
||||
GdkRGBA *rgba = rgba_data->rgba;
|
||||
|
||||
switch (arg)
|
||||
{
|
||||
case 0:
|
||||
if (!parse_rgb_channel_value (parser, &rgba->red, syntax, rgba_data))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 1:
|
||||
if (!parse_rgb_channel_value (parser, &rgba->green, syntax, rgba_data))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 2:
|
||||
if (!parse_rgb_channel_value (parser, &rgba->blue, syntax, rgba_data))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 3:
|
||||
if (!parse_alpha_value (parser, &rgba->alpha, syntax))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static guint
|
||||
parse_hsla_color_channel (GtkCssParser *parser,
|
||||
guint arg,
|
||||
ColorSyntax syntax,
|
||||
gpointer data)
|
||||
{
|
||||
GdkHSLA *hsla = data;
|
||||
|
||||
switch (arg)
|
||||
{
|
||||
case 0:
|
||||
if (!parse_hue_value (parser, &hsla->hue))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 1:
|
||||
if (!parse_hsl_channel_value (parser, &hsla->saturation, syntax))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 2:
|
||||
if (!parse_hsl_channel_value (parser, &hsla->lightness, syntax))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 3:
|
||||
if (!parse_alpha_value (parser, &hsla->alpha, syntax))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
float hue, white, black, alpha;
|
||||
} HwbData;
|
||||
|
||||
static guint
|
||||
parse_hwb_color_channel (GtkCssParser *parser,
|
||||
guint arg,
|
||||
ColorSyntax syntax,
|
||||
gpointer data)
|
||||
{
|
||||
HwbData *hwb = data;
|
||||
|
||||
switch (arg)
|
||||
{
|
||||
case 0:
|
||||
if (!parse_hue_value (parser, &hwb->hue))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 1:
|
||||
if (!parse_hwb_channel_value (parser, &hwb->white))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 2:
|
||||
if (!parse_hwb_channel_value (parser, &hwb->black))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 3:
|
||||
if (!parse_alpha_value (parser, &hwb->alpha, syntax))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
float L, a, b, alpha;
|
||||
} LabData;
|
||||
|
||||
static guint
|
||||
parse_oklab_color_channel (GtkCssParser *parser,
|
||||
guint arg,
|
||||
ColorSyntax syntax,
|
||||
gpointer data)
|
||||
{
|
||||
LabData *oklab = data;
|
||||
|
||||
switch (arg)
|
||||
{
|
||||
case 0:
|
||||
if (!parse_ok_L_value (parser, &oklab->L))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 1:
|
||||
if (!parse_ok_ab_value (parser, &oklab->a))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 2:
|
||||
if (!parse_ok_ab_value (parser, &oklab->b))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 3:
|
||||
if (!parse_alpha_value (parser, &oklab->alpha, syntax))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
float L, C, H, alpha;
|
||||
} LchData;
|
||||
|
||||
static guint
|
||||
parse_oklch_color_channel (GtkCssParser *parser,
|
||||
guint arg,
|
||||
ColorSyntax syntax,
|
||||
gpointer data)
|
||||
{
|
||||
LchData *oklch = data;
|
||||
|
||||
switch (arg)
|
||||
{
|
||||
case 0:
|
||||
if (!parse_ok_L_value (parser, &oklch->L))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 1:
|
||||
if (!parse_ok_C_value (parser, &oklch->C))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 2:
|
||||
if (!parse_hue_value (parser, &oklch->H))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case 3:
|
||||
if (!parse_alpha_value (parser, &oklch->alpha, syntax))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
parse_color_function (GtkCssParser *self,
|
||||
ColorSyntax syntax,
|
||||
gboolean allow_alpha,
|
||||
gboolean require_alpha,
|
||||
guint (* parse_func) (GtkCssParser *, guint, ColorSyntax, gpointer),
|
||||
gpointer data)
|
||||
{
|
||||
const GtkCssToken *token;
|
||||
gboolean result = FALSE;
|
||||
char function_name[64];
|
||||
guint arg;
|
||||
guint min_args = 3;
|
||||
guint max_args = 4;
|
||||
|
||||
token = gtk_css_parser_get_token (self);
|
||||
g_return_val_if_fail (gtk_css_token_is (token, GTK_CSS_TOKEN_FUNCTION), FALSE);
|
||||
|
||||
g_strlcpy (function_name, gtk_css_token_get_string (token), 64);
|
||||
gtk_css_parser_start_block (self);
|
||||
|
||||
arg = 0;
|
||||
while (TRUE)
|
||||
{
|
||||
guint parse_args = parse_func (self, arg, syntax, data);
|
||||
if (parse_args == 0)
|
||||
break;
|
||||
arg += parse_args;
|
||||
token = gtk_css_parser_get_token (self);
|
||||
|
||||
if (syntax == COLOR_SYNTAX_DETECTING)
|
||||
{
|
||||
if (gtk_css_token_is (token, GTK_CSS_TOKEN_COMMA))
|
||||
{
|
||||
syntax = COLOR_SYNTAX_LEGACY;
|
||||
min_args = require_alpha ? 4 : 3;
|
||||
max_args = allow_alpha ? 4 : 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
syntax = COLOR_SYNTAX_MODERN;
|
||||
}
|
||||
}
|
||||
|
||||
if (gtk_css_token_is (token, GTK_CSS_TOKEN_EOF))
|
||||
{
|
||||
if (arg < min_args)
|
||||
{
|
||||
gtk_css_parser_error_syntax (self, "%s() requires at least %u arguments", function_name, min_args);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (gtk_css_token_is (token, GTK_CSS_TOKEN_COMMA))
|
||||
{
|
||||
if (syntax == COLOR_SYNTAX_MODERN)
|
||||
{
|
||||
gtk_css_parser_error_syntax (self, "Commas aren't allowed in modern %s() syntax", function_name);
|
||||
break;
|
||||
}
|
||||
|
||||
if (arg >= max_args)
|
||||
{
|
||||
gtk_css_parser_error_syntax (self, "Expected ')' at end of %s()", function_name);
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_css_parser_consume_token (self);
|
||||
continue;
|
||||
}
|
||||
else if (syntax == COLOR_SYNTAX_LEGACY)
|
||||
{
|
||||
gtk_css_parser_error_syntax (self, "Unexpected data at end of %s() argument", function_name);
|
||||
break;
|
||||
}
|
||||
else if (arg == 3)
|
||||
{
|
||||
if (gtk_css_token_is_delim (token, '/'))
|
||||
{
|
||||
gtk_css_parser_consume_token (self);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (arg >= max_args)
|
||||
{
|
||||
gtk_css_parser_error_syntax (self, "Expected ')' at end of %s()", function_name);
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_css_parser_error_syntax (self, "Expected '/' or ')'");
|
||||
break;
|
||||
}
|
||||
else if (arg >= max_args)
|
||||
{
|
||||
gtk_css_parser_error_syntax (self, "Expected ')' at end of %s()", function_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
gtk_css_parser_end_block (self);
|
||||
|
||||
return result;
|
||||
|| gtk_css_parser_has_function (parser, "rgba");
|
||||
}
|
||||
|
||||
GtkCssValue *
|
||||
gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
GtkCssValue *value;
|
||||
GdkRGBA rgba;
|
||||
|
||||
@@ -1211,99 +711,13 @@ gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
{
|
||||
const GtkCssToken *token = gtk_css_parser_get_token (parser);
|
||||
|
||||
gtk_css_parser_warn_deprecated (parser, "@define-color and named colors are deprecated");
|
||||
|
||||
value = gtk_css_color_value_new_name (gtk_css_token_get_string (token));
|
||||
gtk_css_parser_consume_token (parser);
|
||||
|
||||
return value;
|
||||
}
|
||||
else if (gtk_css_parser_has_function (parser, "rgb") || gtk_css_parser_has_function (parser, "rgba"))
|
||||
{
|
||||
gboolean has_alpha;
|
||||
ParseRGBAData data = { NULL, };
|
||||
data.rgba = &rgba;
|
||||
|
||||
rgba.alpha = 1.0;
|
||||
|
||||
has_alpha = gtk_css_parser_has_function (parser, "rgba");
|
||||
|
||||
if (!parse_color_function (parser, COLOR_SYNTAX_DETECTING, has_alpha, has_alpha, parse_rgba_color_channel, &data))
|
||||
return NULL;
|
||||
|
||||
return gtk_css_color_value_new_literal (&rgba);
|
||||
}
|
||||
else if (gtk_css_parser_has_function (parser, "hsl") || gtk_css_parser_has_function (parser, "hsla"))
|
||||
{
|
||||
GdkHSLA hsla;
|
||||
|
||||
hsla.alpha = 1.0;
|
||||
|
||||
if (!parse_color_function (parser, COLOR_SYNTAX_DETECTING, TRUE, FALSE, parse_hsla_color_channel, &hsla))
|
||||
return NULL;
|
||||
|
||||
_gdk_rgba_init_from_hsla (&rgba, &hsla);
|
||||
|
||||
return gtk_css_color_value_new_literal (&rgba);
|
||||
}
|
||||
else if (gtk_css_parser_has_function (parser, "hwb"))
|
||||
{
|
||||
HwbData hwb = { 0, };
|
||||
float red, green, blue;
|
||||
|
||||
hwb.alpha = 1.0;
|
||||
|
||||
if (!parse_color_function (parser, COLOR_SYNTAX_MODERN, TRUE, FALSE, parse_hwb_color_channel, &hwb))
|
||||
return NULL;
|
||||
|
||||
hwb.white /= 100.0;
|
||||
hwb.black /= 100.0;
|
||||
|
||||
gtk_hwb_to_rgb (hwb.hue, hwb.white, hwb.black, &red, &green, &blue);
|
||||
|
||||
rgba.red = red;
|
||||
rgba.green = green;
|
||||
rgba.blue = blue;
|
||||
rgba.alpha = hwb.alpha;
|
||||
|
||||
return gtk_css_color_value_new_literal (&rgba);
|
||||
}
|
||||
else if (gtk_css_parser_has_function (parser, "oklab"))
|
||||
{
|
||||
LabData oklab = { 0, };
|
||||
|
||||
oklab.alpha = 1.0;
|
||||
|
||||
if (!parse_color_function (parser, COLOR_SYNTAX_MODERN, TRUE, FALSE, parse_oklab_color_channel, &oklab))
|
||||
return NULL;
|
||||
|
||||
gtk_oklab_to_rgb (oklab.L, oklab.a, oklab.b, &rgba.red, &rgba.green, &rgba.blue);
|
||||
rgba.alpha = oklab.alpha;
|
||||
|
||||
return gtk_css_color_value_new_literal (&rgba);
|
||||
}
|
||||
else if (gtk_css_parser_has_function (parser, "oklch"))
|
||||
{
|
||||
LchData oklch = { 0, };
|
||||
float L, a, b;
|
||||
float red, green, blue;
|
||||
|
||||
oklch.alpha = 1.0;
|
||||
|
||||
if (!parse_color_function (parser, COLOR_SYNTAX_MODERN, TRUE, FALSE, parse_oklch_color_channel, &oklch))
|
||||
return NULL;
|
||||
|
||||
gtk_oklch_to_oklab (oklch.L, oklch.C, oklch.H, &L, &a, &b);
|
||||
gtk_oklab_to_rgb (L, a, b, &red, &green, &blue);
|
||||
|
||||
rgba.alpha = oklch.alpha;
|
||||
|
||||
return gtk_css_color_value_new_literal (&rgba);
|
||||
}
|
||||
else if (gtk_css_parser_has_function (parser, "lighter"))
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
|
||||
if (gtk_css_parser_consume_function (parser, 1, 1, parse_color_number, &data))
|
||||
value = gtk_css_color_value_new_shade (data.color, 1.3);
|
||||
else
|
||||
@@ -1314,8 +728,6 @@ gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
}
|
||||
else if (gtk_css_parser_has_function (parser, "darker"))
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
|
||||
if (gtk_css_parser_consume_function (parser, 1, 1, parse_color_number, &data))
|
||||
value = gtk_css_color_value_new_shade (data.color, 0.7);
|
||||
else
|
||||
@@ -1326,8 +738,6 @@ gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
}
|
||||
else if (gtk_css_parser_has_function (parser, "shade"))
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
|
||||
if (gtk_css_parser_consume_function (parser, 2, 2, parse_color_number, &data))
|
||||
value = gtk_css_color_value_new_shade (data.color, data.value);
|
||||
else
|
||||
@@ -1338,8 +748,6 @@ gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
}
|
||||
else if (gtk_css_parser_has_function (parser, "alpha"))
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
|
||||
if (gtk_css_parser_consume_function (parser, 2, 2, parse_color_number, &data))
|
||||
value = gtk_css_color_value_new_alpha (data.color, data.value);
|
||||
else
|
||||
@@ -1350,8 +758,6 @@ gtk_css_color_value_parse (GtkCssParser *parser)
|
||||
}
|
||||
else if (gtk_css_parser_has_function (parser, "mix"))
|
||||
{
|
||||
ColorFunctionData data = { NULL, };
|
||||
|
||||
if (gtk_css_parser_consume_function (parser, 3, 3, parse_color_mix, &data))
|
||||
value = gtk_css_color_value_new_mix (data.color, data.color2, data.value);
|
||||
else
|
||||
|
@@ -1715,16 +1715,6 @@ gtk_css_number_value_get (const GtkCssValue *value,
|
||||
}
|
||||
}
|
||||
|
||||
double
|
||||
gtk_css_number_value_get_canonical (GtkCssValue *number,
|
||||
double one_hundred_percent)
|
||||
{
|
||||
if (number->type == TYPE_DIMENSION && number->dimension.unit != GTK_CSS_PERCENT)
|
||||
return get_converted_value (number, canonical_unit (number->dimension.unit));
|
||||
|
||||
return gtk_css_number_value_get (number, one_hundred_percent);
|
||||
}
|
||||
|
||||
gboolean
|
||||
gtk_css_dimension_value_is_zero (const GtkCssValue *value)
|
||||
{
|
||||
|
@@ -57,8 +57,6 @@ GtkCssValue * gtk_css_number_value_try_add (GtkCssValue *val
|
||||
GtkCssValue *value2);
|
||||
double gtk_css_number_value_get (const GtkCssValue *number,
|
||||
double one_hundred_percent) G_GNUC_PURE;
|
||||
double gtk_css_number_value_get_canonical (GtkCssValue *number,
|
||||
double one_hundred_percent) G_GNUC_PURE;
|
||||
|
||||
gboolean gtk_css_dimension_value_is_zero (const GtkCssValue *value) G_GNUC_PURE;
|
||||
|
||||
|
@@ -124,6 +124,7 @@ struct _GtkCssScanner
|
||||
GtkCssProvider *provider;
|
||||
GtkCssParser *parser;
|
||||
GtkCssScanner *parent;
|
||||
gboolean may_have_var;
|
||||
};
|
||||
|
||||
struct _GtkCssProviderPrivate
|
||||
@@ -184,12 +185,10 @@ gtk_css_provider_parsing_error (GtkCssProvider *provider,
|
||||
{
|
||||
char *s = gtk_css_section_to_string (section);
|
||||
|
||||
if (GTK_DEBUG_CHECK (CSS) ||
|
||||
!g_error_matches (error, GTK_CSS_PARSER_WARNING, GTK_CSS_PARSER_WARNING_DEPRECATED))
|
||||
g_warning ("Theme parser %s: %s: %s",
|
||||
error->domain == GTK_CSS_PARSER_WARNING ? "warning" : "error",
|
||||
s,
|
||||
error->message);
|
||||
g_warning ("Theme parser %s: %s: %s",
|
||||
error->domain == GTK_CSS_PARSER_WARNING ? "warning" : "error",
|
||||
s,
|
||||
error->message);
|
||||
|
||||
g_free (s);
|
||||
}
|
||||
@@ -394,6 +393,17 @@ gtk_css_scanner_parser_error (GtkCssParser *parser,
|
||||
gtk_css_section_unref (section);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_for_var (GBytes *bytes)
|
||||
{
|
||||
const char *data;
|
||||
gsize len;
|
||||
|
||||
data = g_bytes_get_data (bytes, &len);
|
||||
|
||||
return memmem (data, len, "var(", 4) != NULL;
|
||||
}
|
||||
|
||||
static GtkCssScanner *
|
||||
gtk_css_scanner_new (GtkCssProvider *provider,
|
||||
GtkCssScanner *parent,
|
||||
@@ -407,6 +417,7 @@ gtk_css_scanner_new (GtkCssProvider *provider,
|
||||
g_object_ref (provider);
|
||||
scanner->provider = provider;
|
||||
scanner->parent = parent;
|
||||
scanner->may_have_var = check_for_var (bytes);
|
||||
|
||||
scanner->parser = gtk_css_parser_new_for_bytes (bytes,
|
||||
file,
|
||||
@@ -936,7 +947,8 @@ parse_declaration (GtkCssScanner *scanner,
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (gtk_css_parser_has_references (scanner->parser))
|
||||
if (scanner->may_have_var &&
|
||||
gtk_css_parser_has_references (scanner->parser))
|
||||
{
|
||||
GtkCssLocation start_location;
|
||||
GtkCssVariableValue *var_value;
|
||||
|
@@ -220,8 +220,6 @@ parser_error (GtkCssParser *parser,
|
||||
{
|
||||
for (int i = 0; i < n_vars; i++)
|
||||
{
|
||||
GtkCssSection *section;
|
||||
|
||||
if (names[i + 1])
|
||||
g_set_error (&new_error,
|
||||
GTK_CSS_PARSER_ERROR, GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
|
||||
@@ -230,15 +228,7 @@ parser_error (GtkCssParser *parser,
|
||||
g_set_error_literal (&new_error,
|
||||
GTK_CSS_PARSER_ERROR, GTK_CSS_PARSER_ERROR_UNKNOWN_VALUE,
|
||||
error->message);
|
||||
|
||||
if (vars[i]->section == NULL)
|
||||
section = gtk_css_section_new (gtk_css_parser_get_file (parser), start, end);
|
||||
else
|
||||
section = gtk_css_section_ref (vars[i]->section);
|
||||
|
||||
gtk_style_provider_emit_error (provider, section, new_error);
|
||||
|
||||
gtk_css_section_unref (section);
|
||||
gtk_style_provider_emit_error (provider, vars[i]->section, new_error);
|
||||
g_clear_error (&new_error);
|
||||
}
|
||||
|
||||
|
@@ -96,7 +96,6 @@ typedef enum {
|
||||
GTK_DEBUG_A11Y = 1 << 17,
|
||||
GTK_DEBUG_ICONFALLBACK = 1 << 18,
|
||||
GTK_DEBUG_INVERT_TEXT_DIR = 1 << 19,
|
||||
GTK_DEBUG_CSS = 1 << 20,
|
||||
} GtkDebugFlags;
|
||||
|
||||
#define GTK_DEBUG_CHECK(type) G_UNLIKELY (gtk_get_debug_flags () & GTK_DEBUG_##type)
|
||||
|
@@ -1033,8 +1033,6 @@ selection_check (GtkFileChooserWidget *impl,
|
||||
g_clear_object (&info);
|
||||
}
|
||||
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
|
||||
g_assert (n_selected == 0 || !(all_files && all_folders));
|
||||
|
||||
if (out_num_selected)
|
||||
@@ -1139,8 +1137,6 @@ add_to_shortcuts_cb (GSimpleAction *action,
|
||||
|
||||
g_clear_object (&info);
|
||||
}
|
||||
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@@ -1221,8 +1217,6 @@ delete_file_cb (GSimpleAction *action,
|
||||
|
||||
g_clear_object (&info);
|
||||
}
|
||||
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1253,8 +1247,6 @@ trash_file_cb (GSimpleAction *action,
|
||||
|
||||
g_clear_object (&info);
|
||||
}
|
||||
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2597,8 +2589,6 @@ location_bar_update (GtkFileChooserWidget *impl)
|
||||
|
||||
if (gtk_bitset_iter_init_first (&iter, bitset, &position))
|
||||
put_recent_folder_in_pathbar (impl, position);
|
||||
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
}
|
||||
visible = FALSE;
|
||||
break;
|
||||
@@ -3993,8 +3983,6 @@ update_chooser_entry (GtkFileChooserWidget *impl)
|
||||
n_selected++;
|
||||
}
|
||||
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
|
||||
if (n_selected == 0)
|
||||
{
|
||||
if (impl->operation_mode == OPERATION_MODE_RECENT)
|
||||
@@ -4481,8 +4469,6 @@ gtk_file_chooser_widget_unselect_file (GtkFileChooser *chooser,
|
||||
|
||||
if (gtk_bitset_iter_is_valid (&iter))
|
||||
gtk_selection_model_unselect_item (impl->selection_model, i);
|
||||
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4699,8 +4685,6 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser)
|
||||
g_list_store_append (result, file);
|
||||
}
|
||||
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
|
||||
/* If there is no selection in the file list, we probably have this situation:
|
||||
*
|
||||
* 1. The user typed a filename in the SAVE filename entry ("foo.txt").
|
||||
@@ -4911,15 +4895,12 @@ switch_to_selected_folder (GtkFileChooserWidget *impl)
|
||||
|
||||
file = _gtk_file_info_get_file (info);
|
||||
change_folder_and_display_error (impl, file, FALSE);
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
g_object_unref (info);
|
||||
return;
|
||||
}
|
||||
|
||||
g_clear_object (&info);
|
||||
}
|
||||
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
}
|
||||
|
||||
/* Gets the display name of the selected file in the file list; assumes single
|
||||
@@ -5649,8 +5630,6 @@ gtk_file_chooser_widget_get_selected_files (GtkFileChooserWidget *impl)
|
||||
g_clear_object (&info);
|
||||
}
|
||||
|
||||
g_clear_pointer (&bitset, gtk_bitset_unref);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,10 @@
|
||||
* should be modal.
|
||||
*
|
||||
* The dialog is shown with [method@Gtk.FileDialog.open],
|
||||
* [method@Gtk.FileDialog.save], etc.
|
||||
* [method@Gtk.FileDialog.save], etc. These APIs follow the
|
||||
* GIO async pattern, and the result can be obtained by calling
|
||||
* the corresponding finish function, for example
|
||||
* [method@Gtk.FileDialog.open_finish].
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
@@ -690,7 +693,7 @@ gtk_file_dialog_set_initial_file (GtkFileDialog *self,
|
||||
{
|
||||
GFile *folder;
|
||||
GFileInfo *info;
|
||||
|
||||
|
||||
if (self->initial_file && g_file_equal (self->initial_file, file))
|
||||
return;
|
||||
|
||||
@@ -924,6 +927,8 @@ finish_multiple_files_op (GtkFileDialog *self,
|
||||
* presenting a file chooser dialog to the user.
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* It should call [method@Gtk.FileDialog.open_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
@@ -996,6 +1001,8 @@ gtk_file_dialog_open_finish (GtkFileDialog *self,
|
||||
* will be in the directory [property@Gtk.FileDialog:initial-folder].
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* It should call [method@Gtk.FileDialog.select_folder_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
@@ -1064,6 +1071,8 @@ gtk_file_dialog_select_folder_finish (GtkFileDialog *self,
|
||||
* presenting a file chooser dialog to the user.
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* It should call [method@Gtk.FileDialog.save_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
@@ -1135,6 +1144,8 @@ gtk_file_dialog_save_finish (GtkFileDialog *self,
|
||||
* [property@Gtk.FileDialog:initial-folder].
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* It should call [method@Gtk.FileDialog.open_multiple_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
@@ -1207,6 +1218,8 @@ gtk_file_dialog_open_multiple_finish (GtkFileDialog *self,
|
||||
* [property@Gtk.FileDialog:initial-folder].
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* It should call [method@Gtk.FileDialog.select_multiple_folders_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
|
@@ -37,6 +37,8 @@
|
||||
* right away.
|
||||
*
|
||||
* The operation is started with the [method@Gtk.FileLauncher.launch] function.
|
||||
* This API follows the GIO async pattern, and the result can be obtained by
|
||||
* calling [method@Gtk.FileLauncher.launch_finish].
|
||||
*
|
||||
* To launch uris that don't represent files, use [class@Gtk.UriLauncher].
|
||||
*
|
||||
@@ -462,6 +464,10 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
*
|
||||
* This may present an app chooser dialog to the user.
|
||||
*
|
||||
* The @callback will be called when the operation is completed.
|
||||
* It should call [method@Gtk.FileLauncher.launch_finish] to obtain
|
||||
* the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
void
|
||||
@@ -552,6 +558,10 @@ gtk_file_launcher_launch_finish (GtkFileLauncher *self,
|
||||
* This is only supported native files. It will fail if @file
|
||||
* is e.g. a http:// uri.
|
||||
*
|
||||
* The @callback will be called when the operation is completed.
|
||||
* It should call [method@Gtk.FileLauncher.open_containing_folder_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
void
|
||||
|
@@ -23,7 +23,6 @@
|
||||
|
||||
#include "deprecated/gtkfontchooserwidget.h"
|
||||
#include "gtkfontchooserwidgetprivate.h"
|
||||
#include "gtkfontfilterprivate.h"
|
||||
|
||||
#include "gtkadjustment.h"
|
||||
#include "gtkbuildable.h"
|
||||
@@ -109,10 +108,10 @@ struct _GtkFontChooserWidget
|
||||
GtkWidget *family_face_list;
|
||||
GtkWidget *list_stack;
|
||||
GtkSingleSelection *selection;
|
||||
GtkCustomFilter *custom_filter;
|
||||
GtkFontFilter *user_filter;
|
||||
GtkCustomFilter *multi_filter;
|
||||
GtkFilterListModel *filter_model;
|
||||
GtkCustomFilter *custom_filter;
|
||||
GtkCustomFilter *user_filter;
|
||||
GtkCustomFilter *multi_filter;
|
||||
GtkFilterListModel *filter_model;
|
||||
|
||||
GtkWidget *preview;
|
||||
GtkWidget *preview2;
|
||||
@@ -131,12 +130,16 @@ struct _GtkFontChooserWidget
|
||||
GtkWidget *axis_grid;
|
||||
GtkWidget *feature_box;
|
||||
|
||||
GtkCheckButton *language_button;
|
||||
GtkFrame *language_button;
|
||||
GtkFrame *language_frame;
|
||||
GtkWidget *language_list;
|
||||
GtkStringList *languages;
|
||||
GHashTable *language_table;
|
||||
|
||||
PangoLanguage *filter_language;
|
||||
gboolean filter_by_language;
|
||||
gboolean filter_by_monospace;
|
||||
|
||||
PangoFontMap *font_map;
|
||||
|
||||
PangoFontDescription *font_desc;
|
||||
@@ -345,29 +348,77 @@ output_cb (GtkSpinButton *spin,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
update_filter_language (GtkFontChooserWidget *self)
|
||||
static gboolean
|
||||
user_filter_cb (gpointer item,
|
||||
gpointer data)
|
||||
{
|
||||
gboolean should_filter_language;
|
||||
GtkFontChooserWidget *self = GTK_FONT_CHOOSER_WIDGET (data);
|
||||
PangoFontFamily *family;
|
||||
PangoFontFace *face;
|
||||
|
||||
should_filter_language = gtk_check_button_get_active (self->language_button);
|
||||
if (!should_filter_language)
|
||||
if (PANGO_IS_FONT_FAMILY (item))
|
||||
{
|
||||
_gtk_font_filter_set_language (self->user_filter, NULL);
|
||||
family = item;
|
||||
face = pango_font_family_get_face (family, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkSelectionModel *model;
|
||||
gpointer obj;
|
||||
PangoLanguage *language = NULL;
|
||||
|
||||
model = gtk_list_view_get_model (GTK_LIST_VIEW (self->language_list));
|
||||
obj = gtk_single_selection_get_selected_item (GTK_SINGLE_SELECTION (model));
|
||||
if (obj)
|
||||
language = pango_language_from_string (gtk_string_object_get_string (obj));
|
||||
|
||||
_gtk_font_filter_set_language (self->user_filter, language);
|
||||
face = PANGO_FONT_FACE (item);
|
||||
family = pango_font_face_get_family (face);
|
||||
}
|
||||
|
||||
if (self->filter_by_monospace &&
|
||||
!pango_font_family_is_monospace (family))
|
||||
return FALSE;
|
||||
|
||||
if (self->filter_by_language &&
|
||||
self->filter_language)
|
||||
{
|
||||
PangoFontDescription *desc;
|
||||
PangoContext *context;
|
||||
PangoFont *font;
|
||||
gboolean ret;
|
||||
PangoLanguage **langs;
|
||||
|
||||
desc = pango_font_face_describe (face);
|
||||
pango_font_description_set_size (desc, 20);
|
||||
|
||||
context = gtk_widget_get_pango_context (GTK_WIDGET (self));
|
||||
font = pango_context_load_font (context, desc);
|
||||
|
||||
ret = FALSE;
|
||||
|
||||
langs = pango_font_get_languages (font);
|
||||
if (langs)
|
||||
{
|
||||
for (int i = 0; langs[i]; i++)
|
||||
{
|
||||
if (langs[i] == self->filter_language)
|
||||
{
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (font);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
monospace_check_changed (GtkCheckButton *check,
|
||||
GParamSpec *pspec,
|
||||
GtkFontChooserWidget *self)
|
||||
{
|
||||
self->filter_by_monospace = gtk_check_button_get_active (check);
|
||||
gtk_filter_changed (GTK_FILTER (self->user_filter),
|
||||
self->filter_by_monospace ? GTK_FILTER_CHANGE_MORE_STRICT
|
||||
: GTK_FILTER_CHANGE_LESS_STRICT);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -375,7 +426,10 @@ language_check_changed (GtkCheckButton *check,
|
||||
GParamSpec *pspec,
|
||||
GtkFontChooserWidget *self)
|
||||
{
|
||||
update_filter_language (self);
|
||||
self->filter_by_language = gtk_check_button_get_active (check);
|
||||
gtk_filter_changed (GTK_FILTER (self->user_filter),
|
||||
self->filter_by_language ? GTK_FILTER_CHANGE_MORE_STRICT
|
||||
: GTK_FILTER_CHANGE_LESS_STRICT);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -497,7 +551,6 @@ maybe_update_preview_text (GtkFontChooserWidget *self,
|
||||
{
|
||||
PangoContext *context;
|
||||
PangoFont *font;
|
||||
PangoLanguage *filter_lang;
|
||||
const char *sample;
|
||||
PangoLanguage **languages;
|
||||
GHashTable *langs = NULL;
|
||||
@@ -511,10 +564,9 @@ maybe_update_preview_text (GtkFontChooserWidget *self,
|
||||
if (self->preview_text_set)
|
||||
return;
|
||||
|
||||
filter_lang = _gtk_font_filter_get_language (self->user_filter);
|
||||
if (filter_lang != NULL)
|
||||
if (self->filter_by_language && self->filter_language)
|
||||
{
|
||||
sample = pango_language_get_sample_string (filter_lang);
|
||||
sample = pango_language_get_sample_string (self->filter_language);
|
||||
gtk_font_chooser_widget_set_preview_text (self, sample);
|
||||
return;
|
||||
}
|
||||
@@ -788,23 +840,15 @@ gtk_font_chooser_widget_unmap (GtkWidget *widget)
|
||||
static void
|
||||
gtk_font_chooser_widget_root (GtkWidget *widget)
|
||||
{
|
||||
GtkFontChooserWidget *self = GTK_FONT_CHOOSER_WIDGET (widget);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_font_chooser_widget_parent_class)->root (widget);
|
||||
|
||||
g_signal_connect_swapped (gtk_widget_get_root (widget), "notify::focus-widget",
|
||||
G_CALLBACK (update_key_capture), widget);
|
||||
_gtk_font_filter_set_pango_context (self->user_filter,
|
||||
gtk_widget_get_pango_context (widget));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_font_chooser_widget_unroot (GtkWidget *widget)
|
||||
{
|
||||
GtkFontChooserWidget *self = GTK_FONT_CHOOSER_WIDGET (widget);
|
||||
|
||||
_gtk_font_filter_set_pango_context (self->user_filter,
|
||||
gtk_widget_get_pango_context (widget));
|
||||
g_signal_handlers_disconnect_by_func (gtk_widget_get_root (widget),
|
||||
update_key_capture, widget);
|
||||
|
||||
@@ -836,7 +880,6 @@ gtk_font_chooser_widget_class_init (GtkFontChooserWidgetClass *klass)
|
||||
GParamSpec *pspec;
|
||||
|
||||
g_type_ensure (G_TYPE_THEMED_ICON);
|
||||
g_type_ensure (GTK_TYPE_FONT_FILTER);
|
||||
|
||||
widget_class->root = gtk_font_chooser_widget_root;
|
||||
widget_class->unroot = gtk_font_chooser_widget_unroot;
|
||||
@@ -902,6 +945,7 @@ gtk_font_chooser_widget_class_init (GtkFontChooserWidgetClass *klass)
|
||||
gtk_widget_class_bind_template_callback (widget_class, output_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, selection_changed_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, resize_by_scroll_cb);
|
||||
gtk_widget_class_bind_template_callback (widget_class, monospace_check_changed);
|
||||
gtk_widget_class_bind_template_callback (widget_class, language_check_changed);
|
||||
|
||||
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
|
||||
@@ -1168,7 +1212,17 @@ language_selection_changed (GtkSelectionModel *model,
|
||||
guint n_items,
|
||||
GtkFontChooserWidget *self)
|
||||
{
|
||||
update_filter_language (self);
|
||||
gpointer obj;
|
||||
|
||||
obj = gtk_single_selection_get_selected_item (GTK_SINGLE_SELECTION (model));
|
||||
|
||||
if (obj)
|
||||
self->filter_language = pango_language_from_string (gtk_string_object_get_string (obj));
|
||||
else
|
||||
self->filter_language = NULL;
|
||||
|
||||
if (self->filter_by_language)
|
||||
gtk_filter_changed (GTK_FILTER (self->user_filter), GTK_FILTER_CHANGE_DIFFERENT);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1239,6 +1293,8 @@ gtk_font_chooser_widget_init (GtkFontChooserWidget *self)
|
||||
|
||||
gtk_font_chooser_widget_take_font_desc (self, NULL);
|
||||
|
||||
gtk_custom_filter_set_filter_func (self->user_filter, user_filter_cb, self, NULL);
|
||||
|
||||
setup_language_list (self);
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,9 @@
|
||||
* should be modal.
|
||||
*
|
||||
* The dialog is shown with the [method@Gtk.FontDialog.choose_font]
|
||||
* function or its variants.
|
||||
* function or its variants. This API follows the GIO async pattern,
|
||||
* and the result can be obtained by calling the corresponding
|
||||
* finish function, such as [method@Gtk.FontDialog.choose_font_finish].
|
||||
*
|
||||
* See [class@Gtk.FontDialogButton] for a convenient control
|
||||
* that uses `GtkFontDialog` and presents the results.
|
||||
@@ -625,6 +627,10 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
* This function initiates a font selection operation by
|
||||
* presenting a dialog to the user for selecting a font family.
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* It should call [method@Gtk.FontDialog.choose_family_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
void
|
||||
@@ -710,6 +716,10 @@ gtk_font_dialog_choose_family_finish (GtkFontDialog *self,
|
||||
* presenting a dialog to the user for selecting a font face
|
||||
* (i.e. a font family and style, but not a specific font size).
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* It should call [method@Gtk.FontDialog.choose_face_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
void
|
||||
@@ -788,6 +798,10 @@ gtk_font_dialog_choose_face_finish (GtkFontDialog *self,
|
||||
* This function initiates a font selection operation by
|
||||
* presenting a dialog to the user for selecting a font.
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* It should call [method@Gtk.FontDialog.choose_font_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* If you want to let the user select font features as well,
|
||||
* use [method@Gtk.FontDialog.choose_font_and_features] instead.
|
||||
*
|
||||
@@ -869,6 +883,10 @@ gtk_font_dialog_choose_font_finish (GtkFontDialog *self,
|
||||
* Font features affect how the font is rendered, for example
|
||||
* enabling glyph variants or ligatures.
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* It should call [method@Gtk.FontDialog.choose_font_and_features_finish]
|
||||
* to obtain the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
void
|
||||
|
@@ -1,272 +0,0 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* gtkfontfilter.c:
|
||||
* Copyright (C) 2024 Niels De Graef <nielsdegraef@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <glib/gprintf.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gtkfontfilterprivate.h"
|
||||
#include "gtkprivate.h"
|
||||
|
||||
struct _GtkFontFilter
|
||||
{
|
||||
GtkFilter parent_instance;
|
||||
|
||||
PangoContext *pango_context;
|
||||
|
||||
gboolean monospace;
|
||||
PangoLanguage *language;
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_0,
|
||||
PROP_PANGO_CONTEXT,
|
||||
PROP_MONOSPACE,
|
||||
PROP_LANGUAGE,
|
||||
N_PROPS
|
||||
};
|
||||
static GParamSpec *properties[N_PROPS] = { NULL, };
|
||||
|
||||
G_DEFINE_TYPE (GtkFontFilter, gtk_font_filter, GTK_TYPE_FILTER)
|
||||
|
||||
static void
|
||||
gtk_font_filter_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkFontFilter *self = GTK_FONT_FILTER (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_PANGO_CONTEXT:
|
||||
_gtk_font_filter_set_pango_context (self, g_value_get_object (value));
|
||||
break;
|
||||
case PROP_MONOSPACE:
|
||||
_gtk_font_filter_set_monospace (self, g_value_get_boolean (value));
|
||||
break;
|
||||
case PROP_LANGUAGE:
|
||||
_gtk_font_filter_set_language (self, g_value_get_boxed (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_font_filter_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
GtkFontFilter *self = GTK_FONT_FILTER (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_PANGO_CONTEXT:
|
||||
g_value_set_object (value, self->pango_context);
|
||||
break;
|
||||
case PROP_MONOSPACE:
|
||||
g_value_set_boolean (value, _gtk_font_filter_get_monospace (self));
|
||||
break;
|
||||
case PROP_LANGUAGE:
|
||||
g_value_set_boxed (value, _gtk_font_filter_get_language (self));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_font_filter_match (GtkFilter *filter,
|
||||
gpointer item)
|
||||
{
|
||||
GtkFontFilter *self = GTK_FONT_FILTER (filter);
|
||||
PangoFontFamily *family;
|
||||
PangoFontFace *face;
|
||||
|
||||
if (PANGO_IS_FONT_FAMILY (item))
|
||||
{
|
||||
family = item;
|
||||
face = pango_font_family_get_face (family, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
face = PANGO_FONT_FACE (item);
|
||||
family = pango_font_face_get_family (face);
|
||||
}
|
||||
|
||||
if (self->monospace &&
|
||||
!pango_font_family_is_monospace (family))
|
||||
return FALSE;
|
||||
|
||||
if (self->language)
|
||||
{
|
||||
PangoFontDescription *desc;
|
||||
PangoFont *font;
|
||||
PangoLanguage **langs;
|
||||
gboolean ret = FALSE;
|
||||
|
||||
desc = pango_font_face_describe (face);
|
||||
pango_font_description_set_size (desc, 20);
|
||||
|
||||
font = pango_context_load_font (self->pango_context, desc);
|
||||
|
||||
langs = pango_font_get_languages (font);
|
||||
if (langs)
|
||||
{
|
||||
for (int i = 0; langs[i]; i++)
|
||||
{
|
||||
if (langs[i] == self->language)
|
||||
{
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_object_unref (font);
|
||||
pango_font_description_free (desc);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GtkFilterMatch
|
||||
gtk_font_filter_get_strictness (GtkFilter *filter)
|
||||
{
|
||||
GtkFontFilter *self = GTK_FONT_FILTER (filter);
|
||||
|
||||
if (!self->monospace && self->language == NULL)
|
||||
return GTK_FILTER_MATCH_ALL;
|
||||
|
||||
return GTK_FILTER_MATCH_SOME;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_font_filter_class_init (GtkFontFilterClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GtkFilterClass *filter_class = GTK_FILTER_CLASS (klass);
|
||||
|
||||
filter_class->match = gtk_font_filter_match;
|
||||
filter_class->get_strictness = gtk_font_filter_get_strictness;
|
||||
|
||||
gobject_class->set_property = gtk_font_filter_set_property;
|
||||
gobject_class->get_property = gtk_font_filter_get_property;
|
||||
|
||||
properties[PROP_PANGO_CONTEXT] =
|
||||
g_param_spec_object ("pango-context", NULL, NULL,
|
||||
PANGO_TYPE_CONTEXT,
|
||||
GTK_PARAM_READWRITE);
|
||||
properties[PROP_MONOSPACE] =
|
||||
g_param_spec_boolean ("monospace", NULL, NULL,
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE);
|
||||
properties[PROP_LANGUAGE] =
|
||||
g_param_spec_boxed ("language", NULL, NULL,
|
||||
PANGO_TYPE_LANGUAGE,
|
||||
GTK_PARAM_READWRITE);
|
||||
|
||||
g_object_class_install_properties (gobject_class, N_PROPS, properties);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_font_filter_init (GtkFontFilter *self)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_font_filter_set_pango_context (GtkFontFilter *self,
|
||||
PangoContext *context)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_FONT_FILTER (self));
|
||||
g_return_if_fail (PANGO_IS_CONTEXT (context));
|
||||
|
||||
if (self->pango_context == context)
|
||||
return;
|
||||
|
||||
self->pango_context = context;
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_PANGO_CONTEXT]);
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gtk_font_filter_get_monospace (GtkFontFilter *self)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_FONT_FILTER (self), FALSE);
|
||||
|
||||
return self->monospace;
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_font_filter_set_monospace (GtkFontFilter *self,
|
||||
gboolean monospace)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_FONT_FILTER (self));
|
||||
|
||||
if (self->monospace == monospace)
|
||||
return;
|
||||
|
||||
self->monospace = monospace;
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_MONOSPACE]);
|
||||
gtk_filter_changed (GTK_FILTER (self),
|
||||
monospace ? GTK_FILTER_CHANGE_MORE_STRICT
|
||||
: GTK_FILTER_CHANGE_LESS_STRICT);
|
||||
}
|
||||
|
||||
PangoLanguage *
|
||||
_gtk_font_filter_get_language (GtkFontFilter *self)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_FONT_FILTER (self), NULL);
|
||||
|
||||
return self->language;
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_font_filter_set_language (GtkFontFilter *self,
|
||||
PangoLanguage *lang)
|
||||
{
|
||||
GtkFilterChange filter_change = GTK_FILTER_CHANGE_DIFFERENT;
|
||||
|
||||
g_return_if_fail (GTK_IS_FONT_FILTER (self));
|
||||
|
||||
if (self->language == lang)
|
||||
return;
|
||||
|
||||
if (lang == NULL || self->language == NULL)
|
||||
{
|
||||
filter_change = (lang != NULL) ? GTK_FILTER_CHANGE_MORE_STRICT
|
||||
: GTK_FILTER_CHANGE_LESS_STRICT;
|
||||
}
|
||||
|
||||
self->language = lang;
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_LANGUAGE]);
|
||||
gtk_filter_changed (GTK_FILTER (self), filter_change);
|
||||
}
|
||||
|
||||
GtkFilter *
|
||||
_gtk_font_filter_new (void)
|
||||
{
|
||||
return g_object_new (GTK_TYPE_FONT_FILTER, NULL);
|
||||
}
|
@@ -1,46 +0,0 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* gtkfontfilterprivate.h:
|
||||
* Copyright (C) 2024 Niels De Graef <nielsdegraef@gmail.com>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtkfilter.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_FONT_FILTER (gtk_font_filter_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GtkFontFilter, gtk_font_filter,
|
||||
GTK, FONT_FILTER,
|
||||
GtkFilter)
|
||||
|
||||
GtkFilter * _gtk_font_filter_new (void);
|
||||
|
||||
void _gtk_font_filter_set_pango_context (GtkFontFilter *self,
|
||||
PangoContext *context);
|
||||
|
||||
gboolean _gtk_font_filter_get_monospace (GtkFontFilter *self);
|
||||
|
||||
void _gtk_font_filter_set_monospace (GtkFontFilter *self,
|
||||
gboolean monospace);
|
||||
|
||||
PangoLanguage * _gtk_font_filter_get_language (GtkFontFilter *self);
|
||||
|
||||
void _gtk_font_filter_set_language (GtkFontFilter *self,
|
||||
PangoLanguage *language);
|
||||
|
||||
G_END_DECLS
|
||||
|
@@ -200,7 +200,6 @@ static const GdkDebugKey gtk_debug_keys[] = {
|
||||
{ "accessibility", GTK_DEBUG_A11Y, "Information about accessibility state changes" },
|
||||
{ "iconfallback", GTK_DEBUG_ICONFALLBACK, "Information about icon fallback" },
|
||||
{ "invert-text-dir", GTK_DEBUG_INVERT_TEXT_DIR, "Invert the default text direction" },
|
||||
{ "css", GTK_DEBUG_CSS, "Information about deprecated CSS features" },
|
||||
};
|
||||
|
||||
/* This checks to see if the process is running suid or sgid
|
||||
|
@@ -1430,8 +1430,10 @@ print_response_cb (GtkPrintUnixDialog *window,
|
||||
* and set up print settings and page setup.
|
||||
*
|
||||
* The @callback will be called when the dialog is dismissed.
|
||||
* The obtained [struct@Gtk.PrintSetup] can then be passed
|
||||
* to [method@Gtk.PrintDialog.print] or [method@Gtk.PrintDialog.print_file].
|
||||
* It should call [method@Gtk.PrintDialog.setup_finish]
|
||||
* to obtain the results in the form of a [struct@Gtk.PrintSetup],
|
||||
* that can then be passed to [method@Gtk.PrintDialog.print]
|
||||
* or [method@Gtk.PrintDialog.print_file].
|
||||
*
|
||||
* One possible use for this method is to have the user select a printer,
|
||||
* then show a page setup UI in the application (e.g. to arrange images
|
||||
@@ -1531,7 +1533,8 @@ gtk_print_dialog_setup_finish (GtkPrintDialog *self,
|
||||
* If you pass `NULL` as @setup, then this method will present a print dialog.
|
||||
* Otherwise, it will attempt to print directly, without user interaction.
|
||||
*
|
||||
* The @callback will be called when the printing is done.
|
||||
* The @callback will be called when the printing is done. It should call
|
||||
* [method@Gtk.PrintDialog.print_finish] to obtain the results.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
@@ -1656,6 +1659,9 @@ gtk_print_dialog_print_finish (GtkPrintDialog *self,
|
||||
* If you pass `NULL` as @setup, then this method will present a print dialog.
|
||||
* Otherwise, it will attempt to print directly, without user interaction.
|
||||
*
|
||||
* The @callback will be called when the printing is done. It should call
|
||||
* [method@Gtk.PrintDialog.print_file_finish] to obtain the results.
|
||||
*
|
||||
* Since: 4.14
|
||||
*/
|
||||
void
|
||||
|
@@ -64,8 +64,6 @@ typedef struct _GtkSpinnerClass GtkSpinnerClass;
|
||||
struct _GtkSpinner
|
||||
{
|
||||
GtkWidget parent;
|
||||
|
||||
guint spinning : 1;
|
||||
};
|
||||
|
||||
struct _GtkSpinnerClass
|
||||
@@ -83,17 +81,6 @@ G_DEFINE_TYPE (GtkSpinner, gtk_spinner, GTK_TYPE_WIDGET)
|
||||
|
||||
#define DEFAULT_SIZE 16
|
||||
|
||||
static void
|
||||
update_state_flags (GtkSpinner *spinner)
|
||||
{
|
||||
if (spinner->spinning && gtk_widget_get_mapped (GTK_WIDGET (spinner)))
|
||||
gtk_widget_set_state_flags (GTK_WIDGET (spinner),
|
||||
GTK_STATE_FLAG_CHECKED, FALSE);
|
||||
else
|
||||
gtk_widget_unset_state_flags (GTK_WIDGET (spinner),
|
||||
GTK_STATE_FLAG_CHECKED);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_spinner_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
@@ -121,26 +108,6 @@ gtk_spinner_snapshot (GtkWidget *widget,
|
||||
gtk_widget_get_height (widget));
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_spinner_map (GtkWidget *widget)
|
||||
{
|
||||
GtkSpinner *spinner = GTK_SPINNER (widget);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_spinner_parent_class)->map (widget);
|
||||
|
||||
update_state_flags (spinner);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_spinner_unmap (GtkWidget *widget)
|
||||
{
|
||||
GtkSpinner *spinner = GTK_SPINNER (widget);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_spinner_parent_class)->unmap (widget);
|
||||
|
||||
update_state_flags (spinner);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_spinner_css_changed (GtkWidget *widget,
|
||||
GtkCssStyleChange *change)
|
||||
@@ -172,7 +139,7 @@ gtk_spinner_get_spinning (GtkSpinner *spinner)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_SPINNER (spinner), FALSE);
|
||||
|
||||
return spinner->spinning;
|
||||
return (gtk_widget_get_state_flags ((GtkWidget *)spinner) & GTK_STATE_FLAG_CHECKED) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -190,14 +157,17 @@ gtk_spinner_set_spinning (GtkSpinner *spinner,
|
||||
|
||||
spinning = !!spinning;
|
||||
|
||||
if (spinning == spinner->spinning)
|
||||
return;
|
||||
if (spinning != gtk_spinner_get_spinning (spinner))
|
||||
{
|
||||
g_object_notify (G_OBJECT (spinner), "spinning");
|
||||
|
||||
spinner->spinning = spinning;
|
||||
|
||||
update_state_flags (spinner);
|
||||
|
||||
g_object_notify (G_OBJECT (spinner), "spinning");
|
||||
if (spinning)
|
||||
gtk_widget_set_state_flags (GTK_WIDGET (spinner),
|
||||
GTK_STATE_FLAG_CHECKED, FALSE);
|
||||
else
|
||||
gtk_widget_unset_state_flags (GTK_WIDGET (spinner),
|
||||
GTK_STATE_FLAG_CHECKED);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -245,8 +215,6 @@ gtk_spinner_class_init (GtkSpinnerClass *klass)
|
||||
widget_class = GTK_WIDGET_CLASS(klass);
|
||||
widget_class->snapshot = gtk_spinner_snapshot;
|
||||
widget_class->measure = gtk_spinner_measure;
|
||||
widget_class->map = gtk_spinner_map;
|
||||
widget_class->unmap = gtk_spinner_unmap;
|
||||
widget_class->css_changed = gtk_spinner_css_changed;
|
||||
|
||||
/**
|
||||
|
@@ -5417,8 +5417,6 @@ paste_received (GObject *clipboard,
|
||||
|
||||
if (priv->truncate_multiline)
|
||||
length = truncate_multiline (text);
|
||||
else
|
||||
length = strlen (text);
|
||||
|
||||
begin_change (self);
|
||||
if (priv->selection_bound != priv->current_pos)
|
||||
|
@@ -37,6 +37,8 @@
|
||||
* right away.
|
||||
*
|
||||
* The operation is started with the [method@Gtk.UriLauncher.launch] function.
|
||||
* This API follows the GIO async pattern, and the result can be obtained by
|
||||
* calling [method@Gtk.UriLauncher.launch_finish].
|
||||
*
|
||||
* To launch a file, use [class@Gtk.FileLauncher].
|
||||
*
|
||||
@@ -268,6 +270,10 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
*
|
||||
* This may present an app chooser dialog to the user.
|
||||
*
|
||||
* The @callback will be called when the operation is completed.
|
||||
* It should call [method@Gtk.UriLauncher.launch_finish] to obtain
|
||||
* the result.
|
||||
*
|
||||
* Since: 4.10
|
||||
*/
|
||||
void
|
||||
|
@@ -113,7 +113,6 @@ gtk_private_sources = files([
|
||||
'gtkfilechoosercell.c',
|
||||
'gtkfilesystemmodel.c',
|
||||
'gtkfilethumbnail.c',
|
||||
'gtkfontfilter.c',
|
||||
'gtkgizmo.c',
|
||||
'gtkiconcache.c',
|
||||
'gtkiconcachevalidator.c',
|
||||
@@ -413,7 +412,6 @@ gtk_public_sources += gtk_print_sources
|
||||
|
||||
gtk_private_type_headers = files([
|
||||
'gtkcsstypesprivate.h',
|
||||
'gtkfontfilterprivate.h',
|
||||
'gtktexthandleprivate.h',
|
||||
'gtkplacessidebarprivate.h',
|
||||
])
|
||||
|
@@ -23,9 +23,7 @@
|
||||
<object class="GtkCustomFilter" id="custom_filter"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFontFilter" id="user_filter">
|
||||
<property name="monospace" bind-source="monospace_button" bind-property="active"/>
|
||||
</object>
|
||||
<object class="GtkCustomFilter" id="user_filter"/>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
@@ -99,6 +97,7 @@
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="monospace_button">
|
||||
<property name="label" translatable="yes">Monospace</property>
|
||||
<signal name="notify::active" handler="monospace_check_changed"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
project('gtk', 'c',
|
||||
version: '4.15.2',
|
||||
version: '4.15.1',
|
||||
default_options: [
|
||||
'buildtype=debugoptimized',
|
||||
'warning_level=1',
|
||||
|
375
po/he.po
375
po/he.po
@@ -12,17 +12,17 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: gtk+.HEAD.he\n"
|
||||
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
|
||||
"POT-Creation-Date: 2024-05-24 05:15+0000\n"
|
||||
"PO-Revision-Date: 2024-05-28 11:54+0300\n"
|
||||
"Last-Translator: Yosef Or Boczko <yoseforb@gmail.com>\n"
|
||||
"POT-Creation-Date: 2024-04-04 17:02+0000\n"
|
||||
"PO-Revision-Date: 2024-04-06 16:18+0300\n"
|
||||
"Last-Translator: Yaron Shahrabani <sh.yaron@gmail.com>\n"
|
||||
"Language-Team: Hebrew\n"
|
||||
"Language: he\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n==2 ? 1 : n>10 && n%10==0 ? "
|
||||
"2 : 3)\n"
|
||||
"X-Generator: Gtranslator 46.1\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n==2 ? 1 : n>10 && n%10==0 ? 2 : "
|
||||
"3);\n"
|
||||
"X-Generator: Poedit 3.4.2\n"
|
||||
"X-Project-Style: default\n"
|
||||
|
||||
#: gdk/broadway/gdkbroadway-server.c:135
|
||||
@@ -34,11 +34,11 @@ msgstr "סוג תצוגת ה־broadway אינה נתמכת: %s"
|
||||
msgid "This clipboard cannot store data."
|
||||
msgstr "לוח גזירים זה לא יכול לאחסן נתונים."
|
||||
|
||||
#: gdk/gdkclipboard.c:287 gdk/gdkclipboard.c:781 gdk/gdkclipboard.c:1072
|
||||
#: gdk/gdkclipboard.c:287 gdk/gdkclipboard.c:786 gdk/gdkclipboard.c:1086
|
||||
msgid "Cannot read from empty clipboard."
|
||||
msgstr "אי אפשר לקרוא מלוח גזירים ריק."
|
||||
|
||||
#: gdk/gdkclipboard.c:318 gdk/gdkclipboard.c:1122 gdk/gdkdrag.c:606
|
||||
#: gdk/gdkclipboard.c:318 gdk/gdkclipboard.c:1136 gdk/gdkdrag.c:606
|
||||
msgid "No compatible formats to transfer clipboard contents."
|
||||
msgstr "אין תצורות תואמות להעברת תכני לוח גזירים."
|
||||
|
||||
@@ -57,7 +57,7 @@ msgstr "לא ניתן לספק תוכן בתור %s"
|
||||
msgid "The current backend does not support OpenGL"
|
||||
msgstr "המנשק הנוכחי אינו תומך ב־OpenGL"
|
||||
|
||||
#: gdk/gdkdisplay.c:1315 gdk/gdkvulkancontext.c:1638
|
||||
#: gdk/gdkdisplay.c:1315 gdk/gdkvulkancontext.c:1600
|
||||
msgid "Vulkan support disabled via GDK_DEBUG"
|
||||
msgstr "התמיכה ב־Vulkan מושבתת דרך GDK_DEBUG"
|
||||
|
||||
@@ -124,8 +124,8 @@ msgid "No GL API allowed."
|
||||
msgstr "אין GL API מאופשר."
|
||||
|
||||
#: gdk/gdkglcontext.c:447 gdk/win32/gdkglcontext-win32-wgl.c:395
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:538
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:582 gdk/x11/gdkglcontext-glx.c:691
|
||||
#: gdk/win32/gdkglcontext-win32-wgl.c:538 gdk/win32/gdkglcontext-win32-wgl.c:582
|
||||
#: gdk/x11/gdkglcontext-glx.c:691
|
||||
msgid "Unable to create a GL context"
|
||||
msgstr "Unable to create a GL context"
|
||||
|
||||
@@ -144,7 +144,7 @@ msgstr "היישום אינו תומך ב־API %s"
|
||||
|
||||
#. translators: This is about OpenGL backend names, like
|
||||
#. * "Trying to use X11 GLX, but EGL is already in use"
|
||||
#: gdk/gdkglcontext.c:2121
|
||||
#: gdk/gdkglcontext.c:2123
|
||||
#, c-format
|
||||
msgid "Trying to use %s, but %s is already in use"
|
||||
msgstr "מתבצע ניסיון להשתמש ב־%s אך %s כבר בשימוש"
|
||||
@@ -542,7 +542,7 @@ msgstr "שגיאה בפענוח קובץ תמונת JPEG (%s)"
|
||||
msgid "Unsupported JPEG colorspace (%d)"
|
||||
msgstr "מרחב הצבעים של ה־JPEG אינו נתמך (%d)"
|
||||
|
||||
#: gdk/loaders/gdkjpeg.c:203 gdk/loaders/gdkpng.c:289 gdk/loaders/gdktiff.c:472
|
||||
#: gdk/loaders/gdkjpeg.c:203 gdk/loaders/gdkpng.c:286 gdk/loaders/gdktiff.c:472
|
||||
#, c-format
|
||||
msgid "Not enough memory for image size %ux%u"
|
||||
msgstr "אין מספיק זיכרון לתמונה בגודל %u×%u"
|
||||
@@ -552,17 +552,17 @@ msgstr "אין מספיק זיכרון לתמונה בגודל %u×%u"
|
||||
msgid "Error reading png (%s)"
|
||||
msgstr "שגיאה בקריאת png (%s)"
|
||||
|
||||
#: gdk/loaders/gdkpng.c:215
|
||||
#: gdk/loaders/gdkpng.c:212
|
||||
#, c-format
|
||||
msgid "Unsupported depth %u in png image"
|
||||
msgstr "העומק %u אינו נתמך בתמונות png"
|
||||
|
||||
#: gdk/loaders/gdkpng.c:265
|
||||
#: gdk/loaders/gdkpng.c:262
|
||||
#, c-format
|
||||
msgid "Unsupported color type %u in png image"
|
||||
msgstr "סוג הצבע %u אינו נתמך בתמונות png"
|
||||
|
||||
#: gdk/loaders/gdkpng.c:275
|
||||
#: gdk/loaders/gdkpng.c:272
|
||||
#, c-format
|
||||
msgid "Image stride too large for image size %ux%u"
|
||||
msgstr "פסיעת התמונה גדולה מדי לגודל התמונה %ux%u"
|
||||
@@ -647,8 +647,7 @@ msgstr "לא ניתן לקבל נתונים מלוח הגזירים. הקצאת
|
||||
#: gdk/win32/gdkclipdrop-win32.c:930
|
||||
#, c-format
|
||||
msgid "Cannot get clipboard data. OpenClipboard() timed out."
|
||||
msgstr ""
|
||||
"לא ניתן לקבל נתונים מלוח הגזירים. הזמן שהוקצב ל־OpenClipboard() הסתיים."
|
||||
msgstr "לא ניתן לקבל נתונים מלוח הגזירים. הזמן שהוקצב ל־OpenClipboard() הסתיים."
|
||||
|
||||
#: gdk/win32/gdkclipdrop-win32.c:940
|
||||
#, c-format
|
||||
@@ -816,8 +815,7 @@ msgstr "אין מספיק זיכרון ביעד"
|
||||
msgid "Need complete input to do conversion"
|
||||
msgstr "נדרש קלט מלא כדי לבצע המרה"
|
||||
|
||||
#: gdk/x11/gdktextlistconverter-x11.c:216
|
||||
#: gdk/x11/gdktextlistconverter-x11.c:250
|
||||
#: gdk/x11/gdktextlistconverter-x11.c:216 gdk/x11/gdktextlistconverter-x11.c:250
|
||||
msgid "Invalid byte sequence in conversion input"
|
||||
msgstr "רצף בתים שגוי בקלט ההמרה"
|
||||
|
||||
@@ -1057,7 +1055,7 @@ msgid "%d %%"
|
||||
msgstr "%d %%"
|
||||
|
||||
#: gtk/deprecated/gtkcolorbutton.c:183 gtk/deprecated/gtkcolorbutton.c:314
|
||||
#: gtk/gtkcolordialog.c:409
|
||||
#: gtk/gtkcolordialog.c:411
|
||||
msgid "Pick a Color"
|
||||
msgstr "בחירת צבע"
|
||||
|
||||
@@ -1078,7 +1076,7 @@ msgid "Sans 12"
|
||||
msgstr "Sans 12"
|
||||
|
||||
#: gtk/deprecated/gtkfontbutton.c:507 gtk/deprecated/gtkfontbutton.c:624
|
||||
#: gtk/gtkfontdialog.c:594
|
||||
#: gtk/gtkfontdialog.c:596
|
||||
msgid "Pick a Font"
|
||||
msgstr "בחירת גופן"
|
||||
|
||||
@@ -1124,7 +1122,7 @@ msgstr ""
|
||||
"מדיניות המערכת מונעת ביצוע שינויים.\n"
|
||||
"נא ליצור קשר עם מנהל המערכת"
|
||||
|
||||
#: gtk/deprecated/gtkshow.c:182
|
||||
#: gtk/deprecated/gtkshow.c:183
|
||||
msgid "Could not show link"
|
||||
msgstr "לא ניתן להציג את הקישור"
|
||||
|
||||
@@ -1318,8 +1316,7 @@ msgstr ""
|
||||
#. * translated on keyboards used for your language, don't translate
|
||||
#. * this.
|
||||
#.
|
||||
#: gtk/gtkaccelgroup.c:837 gtk/gtkshortcutlabel.c:101
|
||||
#: gtk/gtkshortcutlabel.c:137
|
||||
#: gtk/gtkaccelgroup.c:837 gtk/gtkshortcutlabel.c:101 gtk/gtkshortcutlabel.c:137
|
||||
msgctxt "keyboard label"
|
||||
msgid "Shift"
|
||||
msgstr "Shift"
|
||||
@@ -1329,8 +1326,7 @@ msgstr "Shift"
|
||||
#. * translated on keyboards used for your language, don't translate
|
||||
#. * this.
|
||||
#.
|
||||
#: gtk/gtkaccelgroup.c:856 gtk/gtkshortcutlabel.c:104
|
||||
#: gtk/gtkshortcutlabel.c:139
|
||||
#: gtk/gtkaccelgroup.c:856 gtk/gtkshortcutlabel.c:104 gtk/gtkshortcutlabel.c:139
|
||||
msgctxt "keyboard label"
|
||||
msgid "Ctrl"
|
||||
msgstr "Ctrl"
|
||||
@@ -1340,8 +1336,7 @@ msgstr "Ctrl"
|
||||
#. * translated on keyboards used for your language, don't translate
|
||||
#. * this.
|
||||
#.
|
||||
#: gtk/gtkaccelgroup.c:875 gtk/gtkshortcutlabel.c:107
|
||||
#: gtk/gtkshortcutlabel.c:141
|
||||
#: gtk/gtkaccelgroup.c:875 gtk/gtkshortcutlabel.c:107 gtk/gtkshortcutlabel.c:141
|
||||
msgctxt "keyboard label"
|
||||
msgid "Alt"
|
||||
msgstr "Alt"
|
||||
@@ -1351,8 +1346,7 @@ msgstr "Alt"
|
||||
#. * translated on keyboards used for your language, don't translate
|
||||
#. * this.
|
||||
#.
|
||||
#: gtk/gtkaccelgroup.c:893 gtk/gtkshortcutlabel.c:113
|
||||
#: gtk/gtkshortcutlabel.c:143
|
||||
#: gtk/gtkaccelgroup.c:893 gtk/gtkshortcutlabel.c:113 gtk/gtkshortcutlabel.c:143
|
||||
msgctxt "keyboard label"
|
||||
msgid "Super"
|
||||
msgstr "Super"
|
||||
@@ -1362,8 +1356,7 @@ msgstr "Super"
|
||||
#. * translated on keyboards used for your language, don't translate
|
||||
#. * this.
|
||||
#.
|
||||
#: gtk/gtkaccelgroup.c:907 gtk/gtkshortcutlabel.c:116
|
||||
#: gtk/gtkshortcutlabel.c:145
|
||||
#: gtk/gtkaccelgroup.c:907 gtk/gtkshortcutlabel.c:116 gtk/gtkshortcutlabel.c:145
|
||||
msgctxt "keyboard label"
|
||||
msgid "Hyper"
|
||||
msgstr "Hyper"
|
||||
@@ -1373,8 +1366,7 @@ msgstr "Hyper"
|
||||
#. * translated on keyboards used for your language, don't translate
|
||||
#. * this.
|
||||
#.
|
||||
#: gtk/gtkaccelgroup.c:922 gtk/gtkshortcutlabel.c:110
|
||||
#: gtk/gtkshortcutlabel.c:148
|
||||
#: gtk/gtkaccelgroup.c:922 gtk/gtkshortcutlabel.c:110 gtk/gtkshortcutlabel.c:148
|
||||
msgctxt "keyboard label"
|
||||
msgid "Meta"
|
||||
msgstr "מטה"
|
||||
@@ -1819,7 +1811,7 @@ msgctxt "accessibility"
|
||||
msgid "terminal"
|
||||
msgstr "מסוף"
|
||||
|
||||
#: gtk/gtkalertdialog.c:667 gtk/print/gtkcustompaperunixdialog.c:322
|
||||
#: gtk/gtkalertdialog.c:668 gtk/print/gtkcustompaperunixdialog.c:322
|
||||
#: gtk/gtkmessagedialog.c:166 gtk/ui/gtkassistant.ui:40
|
||||
msgid "_Close"
|
||||
msgstr "_סגירה"
|
||||
@@ -2300,23 +2292,22 @@ msgstr "קובץ בשם זה כבר קיים"
|
||||
|
||||
#: gtk/gtkfilechoosernative.c:520 gtk/gtkfilechoosernative.c:600
|
||||
#: gtk/gtkfilechooserwidget.c:1188 gtk/gtkfilechooserwidget.c:4973
|
||||
#: gtk/gtkfiledialog.c:840 gtk/gtkmessagedialog.c:170
|
||||
#: gtk/gtkmessagedialog.c:179 gtk/gtkmountoperation.c:608
|
||||
#: gtk/print/gtkpagesetupunixdialog.c:282 gtk/print/gtkprintbackend.c:638
|
||||
#: gtk/print/gtkprintunixdialog.c:682 gtk/print/gtkprintunixdialog.c:839
|
||||
#: gtk/gtkwindow.c:6257 gtk/ui/gtkappchooserdialog.ui:48
|
||||
#: gtk/ui/gtkassistant.ui:52 gtk/ui/gtkcolorchooserdialog.ui:36
|
||||
#: gtk/ui/gtkfontchooserdialog.ui:27
|
||||
#: gtk/gtkfiledialog.c:843 gtk/gtkmessagedialog.c:170 gtk/gtkmessagedialog.c:179
|
||||
#: gtk/gtkmountoperation.c:608 gtk/print/gtkpagesetupunixdialog.c:282
|
||||
#: gtk/print/gtkprintbackend.c:638 gtk/print/gtkprintunixdialog.c:682
|
||||
#: gtk/print/gtkprintunixdialog.c:839 gtk/gtkwindow.c:6256
|
||||
#: gtk/ui/gtkappchooserdialog.ui:48 gtk/ui/gtkassistant.ui:52
|
||||
#: gtk/ui/gtkcolorchooserdialog.ui:36 gtk/ui/gtkfontchooserdialog.ui:27
|
||||
msgid "_Cancel"
|
||||
msgstr "_ביטול"
|
||||
|
||||
#: gtk/gtkfilechoosernative.c:521 gtk/gtkfilechoosernative.c:594
|
||||
#: gtk/gtkfiledialog.c:812 gtk/gtkplacessidebar.c:3149
|
||||
#: gtk/gtkfiledialog.c:815 gtk/gtkplacessidebar.c:3149
|
||||
#: gtk/gtkplacessidebar.c:3234 gtk/gtkplacesview.c:1645
|
||||
msgid "_Open"
|
||||
msgstr "_פתיחה"
|
||||
|
||||
#: gtk/gtkfilechoosernative.c:594 gtk/gtkfiledialog.c:817
|
||||
#: gtk/gtkfilechoosernative.c:594 gtk/gtkfiledialog.c:820
|
||||
msgid "_Save"
|
||||
msgstr "_שמירה"
|
||||
|
||||
@@ -2392,7 +2383,7 @@ msgid "If you delete an item, it will be permanently lost."
|
||||
msgstr "אם פריט ימחק, הוא יאבד לצמיתות."
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:1188 gtk/gtkfilechooserwidget.c:1786
|
||||
#: gtk/gtklabel.c:5745 gtk/gtktext.c:6196 gtk/gtktextview.c:9099
|
||||
#: gtk/gtklabel.c:5712 gtk/gtktext.c:6194 gtk/gtktextview.c:9099
|
||||
msgid "_Delete"
|
||||
msgstr "מ_חיקה"
|
||||
|
||||
@@ -2609,7 +2600,7 @@ msgid "Name"
|
||||
msgstr "שם"
|
||||
|
||||
#: gtk/gtkfilechooserwidget.c:7392 gtk/inspector/resource-list.ui:82
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:218 gtk/ui/gtkfontchooserwidget.ui:387
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:217 gtk/ui/gtkfontchooserwidget.ui:386
|
||||
msgid "Size"
|
||||
msgstr "גודל"
|
||||
|
||||
@@ -2620,28 +2611,28 @@ msgstr "סוג"
|
||||
|
||||
# hebrew note: "תיקייה" is "folder", but there is no better word for
|
||||
# "directory"
|
||||
#: gtk/gtkfiledialog.c:813
|
||||
#: gtk/gtkfiledialog.c:816
|
||||
msgid "Pick Files"
|
||||
msgstr "בחירת קבצים"
|
||||
|
||||
#: gtk/gtkfiledialog.c:813
|
||||
#: gtk/gtkfiledialog.c:816
|
||||
msgid "Pick a File"
|
||||
msgstr "בחירת קובץ"
|
||||
|
||||
#: gtk/gtkfiledialog.c:818
|
||||
#: gtk/gtkfiledialog.c:821
|
||||
msgid "Save a File"
|
||||
msgstr "שמירץ קובץ"
|
||||
|
||||
#: gtk/gtkfiledialog.c:822 gtk/ui/gtkappchooserdialog.ui:53
|
||||
#: gtk/gtkfiledialog.c:825 gtk/ui/gtkappchooserdialog.ui:53
|
||||
#: gtk/ui/gtkcolorchooserdialog.ui:41 gtk/ui/gtkfontchooserdialog.ui:32
|
||||
msgid "_Select"
|
||||
msgstr "ב_חירה"
|
||||
|
||||
#: gtk/gtkfiledialog.c:823
|
||||
#: gtk/gtkfiledialog.c:826
|
||||
msgid "Select Folders"
|
||||
msgstr "בחירת תיקיות"
|
||||
|
||||
#: gtk/gtkfiledialog.c:823
|
||||
#: gtk/gtkfiledialog.c:826
|
||||
msgid "Select a Folder"
|
||||
msgstr "בחירת תיקייה"
|
||||
|
||||
@@ -2653,75 +2644,75 @@ msgstr "לא צוין"
|
||||
msgid "Change Font Features"
|
||||
msgstr "שינוי מאפייני גופן"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1491
|
||||
#: gtk/gtkfontchooserwidget.c:1547
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Width"
|
||||
msgstr "רוחב"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1492
|
||||
#: gtk/gtkfontchooserwidget.c:1548
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Weight"
|
||||
msgstr "משקל"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1493
|
||||
#: gtk/gtkfontchooserwidget.c:1549
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Italic"
|
||||
msgstr "נטוי"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1494
|
||||
#: gtk/gtkfontchooserwidget.c:1550
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Slant"
|
||||
msgstr "משופע"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:1495
|
||||
#: gtk/gtkfontchooserwidget.c:1551
|
||||
msgctxt "Font variation axis"
|
||||
msgid "Optical Size"
|
||||
msgstr "גודל אופטי"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2053
|
||||
#: gtk/gtkfontchooserwidget.c:2109
|
||||
msgctxt "Font feature value"
|
||||
msgid "Default"
|
||||
msgstr "ברירת מחדל"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2070
|
||||
#: gtk/gtkfontchooserwidget.c:2126
|
||||
msgctxt "Font feature value"
|
||||
msgid "Enable"
|
||||
msgstr "לאפשר"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2403
|
||||
#: gtk/gtkfontchooserwidget.c:2459
|
||||
msgid "Default"
|
||||
msgstr "ברירת מחדל"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2465
|
||||
#: gtk/gtkfontchooserwidget.c:2521
|
||||
msgid "Ligatures"
|
||||
msgstr "צרוף אותיות"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2466
|
||||
#: gtk/gtkfontchooserwidget.c:2522
|
||||
msgid "Letter Case"
|
||||
msgstr "אותיות רישיות"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2467
|
||||
#: gtk/gtkfontchooserwidget.c:2523
|
||||
msgid "Number Case"
|
||||
msgstr "מספר מונה"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2468
|
||||
#: gtk/gtkfontchooserwidget.c:2524
|
||||
msgid "Number Spacing"
|
||||
msgstr "מספר רווח"
|
||||
|
||||
# msgctxt "OpenType layout"
|
||||
#: gtk/gtkfontchooserwidget.c:2469
|
||||
#: gtk/gtkfontchooserwidget.c:2525
|
||||
msgid "Fractions"
|
||||
msgstr "שברים"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2470
|
||||
#: gtk/gtkfontchooserwidget.c:2526
|
||||
msgid "Style Variations"
|
||||
msgstr "מאפייני סגנון"
|
||||
|
||||
#: gtk/gtkfontchooserwidget.c:2472
|
||||
#: gtk/gtkfontchooserwidget.c:2528
|
||||
msgid "Character Variations"
|
||||
msgstr "הגווני תו"
|
||||
|
||||
#: gtk/gtkglarea.c:316
|
||||
#: gtk/gtkglarea.c:309
|
||||
msgid "OpenGL context creation failed"
|
||||
msgstr "יצירת הקשר OpenGL נכשלה"
|
||||
|
||||
@@ -2734,32 +2725,32 @@ msgstr "סגירה"
|
||||
msgid "Close the infobar"
|
||||
msgstr "סגירת פס המידע"
|
||||
|
||||
#: gtk/gtklabel.c:5742 gtk/gtktext.c:6184 gtk/gtktextview.c:9087
|
||||
#: gtk/gtklabel.c:5709 gtk/gtktext.c:6182 gtk/gtktextview.c:9087
|
||||
msgid "Cu_t"
|
||||
msgstr "_גזירה"
|
||||
|
||||
#: gtk/gtklabel.c:5743 gtk/gtktext.c:6188 gtk/gtktextview.c:9091
|
||||
#: gtk/gtklabel.c:5710 gtk/gtktext.c:6186 gtk/gtktextview.c:9091
|
||||
msgid "_Copy"
|
||||
msgstr "ה_עתקה"
|
||||
|
||||
#: gtk/gtklabel.c:5744 gtk/gtktext.c:6192 gtk/gtktextview.c:9095
|
||||
#: gtk/gtklabel.c:5711 gtk/gtktext.c:6190 gtk/gtktextview.c:9095
|
||||
msgid "_Paste"
|
||||
msgstr "ה_דבקה"
|
||||
|
||||
#: gtk/gtklabel.c:5750 gtk/gtktext.c:6205 gtk/gtktextview.c:9120
|
||||
#: gtk/gtklabel.c:5717 gtk/gtktext.c:6203 gtk/gtktextview.c:9120
|
||||
msgid "Select _All"
|
||||
msgstr "בחירה בה_כול"
|
||||
|
||||
#: gtk/gtklabel.c:5755
|
||||
#: gtk/gtklabel.c:5722
|
||||
msgid "_Open Link"
|
||||
msgstr "_פתיחת קישור"
|
||||
|
||||
#: gtk/gtklabel.c:5759
|
||||
#: gtk/gtklabel.c:5726
|
||||
msgid "Copy _Link Address"
|
||||
msgstr "העתקת כתובת ה_קישור"
|
||||
|
||||
# msgctxt "OpenType layout"
|
||||
#: gtk/gtklabel.c:5803 gtk/gtktext.c:2723 gtk/gtktextview.c:9169
|
||||
#: gtk/gtklabel.c:5770 gtk/gtktext.c:2723 gtk/gtktextview.c:9169
|
||||
msgid "Context menu"
|
||||
msgstr "תפריט הקשר"
|
||||
|
||||
@@ -2767,7 +2758,7 @@ msgstr "תפריט הקשר"
|
||||
msgid "_Copy URL"
|
||||
msgstr "ה_עתקת כתובת"
|
||||
|
||||
#: gtk/gtklinkbutton.c:589
|
||||
#: gtk/gtklinkbutton.c:567
|
||||
msgid "Invalid URI"
|
||||
msgstr "כתובת לא תקנית"
|
||||
|
||||
@@ -2831,7 +2822,7 @@ msgid "Play"
|
||||
msgstr "ניגון"
|
||||
|
||||
#: gtk/gtkmessagedialog.c:162 gtk/gtkmessagedialog.c:180
|
||||
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6258
|
||||
#: gtk/print/gtkprintbackend.c:639 gtk/gtkwindow.c:6257
|
||||
msgid "_OK"
|
||||
msgstr "_אישור"
|
||||
|
||||
@@ -2979,8 +2970,7 @@ msgstr "ניהול גדלים מותאמים…"
|
||||
msgid "_Apply"
|
||||
msgstr "ה_חלה"
|
||||
|
||||
#: gtk/print/gtkpagesetupunixdialog.c:318
|
||||
#: gtk/print/gtkpagesetupunixdialog.c:570
|
||||
#: gtk/print/gtkpagesetupunixdialog.c:318 gtk/print/gtkpagesetupunixdialog.c:570
|
||||
msgid "Any Printer"
|
||||
msgstr "מדפסת כלשהי"
|
||||
|
||||
@@ -3698,7 +3688,7 @@ msgctxt "accessibility"
|
||||
msgid "Sidebar"
|
||||
msgstr "סרגל צד"
|
||||
|
||||
#: gtk/gtktext.c:6210 gtk/gtktextview.c:9125
|
||||
#: gtk/gtktext.c:6208 gtk/gtktextview.c:9125
|
||||
msgid "Insert _Emoji"
|
||||
msgstr "הוספת _רגשון"
|
||||
|
||||
@@ -3710,22 +3700,22 @@ msgstr "_ביטול"
|
||||
msgid "_Redo"
|
||||
msgstr "ביצוע _שוב"
|
||||
|
||||
#: gtk/gtkwindow.c:6246
|
||||
#: gtk/gtkwindow.c:6245
|
||||
#, c-format
|
||||
msgid "Do you want to use GTK Inspector?"
|
||||
msgstr "להשתמש במפקח GTK?"
|
||||
|
||||
#: gtk/gtkwindow.c:6248
|
||||
#: gtk/gtkwindow.c:6247
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK Inspector is an interactive debugger that lets you explore and modify "
|
||||
"the internals of any GTK application. Using it may cause the application to "
|
||||
"break or crash."
|
||||
"GTK Inspector is an interactive debugger that lets you explore and modify the "
|
||||
"internals of any GTK application. Using it may cause the application to break "
|
||||
"or crash."
|
||||
msgstr ""
|
||||
"מפקח GTK הוא מנפה שגיאות הידודי המאפשר לך לחקור ולשנות את הפנים של כל יישום "
|
||||
"GTK+. שימוש בו יכול לגרום ליישום להישבר או לקרוס."
|
||||
|
||||
#: gtk/gtkwindow.c:6253
|
||||
#: gtk/gtkwindow.c:6252
|
||||
msgid "Don’t show this message again"
|
||||
msgstr "לא להציג הודעה זו שוב"
|
||||
|
||||
@@ -3868,8 +3858,8 @@ msgstr "ניתן להקליד כאן כל הוראת CSS המוכרת על יד
|
||||
|
||||
#: gtk/inspector/css-editor.c:129
|
||||
msgid ""
|
||||
"You can temporarily disable this custom CSS by clicking on the “Pause” "
|
||||
"button above."
|
||||
"You can temporarily disable this custom CSS by clicking on the “Pause” button "
|
||||
"above."
|
||||
msgstr "ניתן להשבית באופן זמני CSS מותאם על ידי לחיצה על הכפתור „השהיה” מעל."
|
||||
|
||||
#: gtk/inspector/css-editor.c:130
|
||||
@@ -3902,37 +3892,37 @@ msgstr "מחלקות סגנון"
|
||||
msgid "CSS Property"
|
||||
msgstr "מאפיין CSS"
|
||||
|
||||
#: gtk/inspector/general.c:371
|
||||
#: gtk/inspector/general.c:370
|
||||
msgctxt "GL version"
|
||||
msgid "None"
|
||||
msgstr "ללא"
|
||||
|
||||
#: gtk/inspector/general.c:462
|
||||
#: gtk/inspector/general.c:461
|
||||
msgctxt "GL version"
|
||||
msgid "Unknown"
|
||||
msgstr "לא ידוע"
|
||||
|
||||
#: gtk/inspector/general.c:524
|
||||
#: gtk/inspector/general.c:523
|
||||
msgctxt "Vulkan device"
|
||||
msgid "Disabled"
|
||||
msgstr "מושבת"
|
||||
|
||||
#: gtk/inspector/general.c:525 gtk/inspector/general.c:526
|
||||
#: gtk/inspector/general.c:524 gtk/inspector/general.c:525
|
||||
msgctxt "Vulkan version"
|
||||
msgid "Disabled"
|
||||
msgstr "מושבת"
|
||||
|
||||
#: gtk/inspector/general.c:577
|
||||
#: gtk/inspector/general.c:576
|
||||
msgctxt "Vulkan device"
|
||||
msgid "None"
|
||||
msgstr "ללא"
|
||||
|
||||
#: gtk/inspector/general.c:578 gtk/inspector/general.c:579
|
||||
#: gtk/inspector/general.c:577 gtk/inspector/general.c:578
|
||||
msgctxt "Vulkan version"
|
||||
msgid "None"
|
||||
msgstr "ללא"
|
||||
|
||||
#: gtk/inspector/general.c:930
|
||||
#: gtk/inspector/general.c:924
|
||||
msgid "IM Context is hardcoded by GTK_IM_MODULE"
|
||||
msgstr "IM Context קשיחה בקוד על ידי GTK_IM_MODULE"
|
||||
|
||||
@@ -4242,7 +4232,7 @@ msgstr "מקור:"
|
||||
msgid "Defined At"
|
||||
msgstr "הגדרה"
|
||||
|
||||
#: gtk/inspector/recorder.c:1950
|
||||
#: gtk/inspector/recorder.c:1941
|
||||
#, c-format
|
||||
msgid "Saving RenderNode failed"
|
||||
msgstr "שמירת RenderNode נכשלה"
|
||||
@@ -4380,7 +4370,7 @@ msgstr "היררכייה"
|
||||
msgid "Implements"
|
||||
msgstr "מיישם"
|
||||
|
||||
#: gtk/inspector/visual.c:690 gtk/inspector/visual.c:708
|
||||
#: gtk/inspector/visual.c:765 gtk/inspector/visual.c:784
|
||||
msgid "Theme is hardcoded by GTK_THEME"
|
||||
msgstr "ערכת נושא קשיחה בקוד על ידי GTK_THEME"
|
||||
|
||||
@@ -4425,75 +4415,92 @@ msgid "Slowdown"
|
||||
msgstr "האטה"
|
||||
|
||||
#: gtk/inspector/visual.ui:362
|
||||
msgid "Rendering"
|
||||
msgstr "עיבוד"
|
||||
msgid "Antialiasing"
|
||||
msgstr "החלקת קצוות"
|
||||
|
||||
#: gtk/inspector/visual.ui:377
|
||||
msgctxt "Font rendering"
|
||||
msgid "Automatic"
|
||||
msgstr "אוטומטי"
|
||||
#: gtk/inspector/visual.ui:387
|
||||
msgid "Hinting"
|
||||
msgstr "רימוז"
|
||||
|
||||
#: gtk/inspector/visual.ui:378
|
||||
msgctxt "Font rendering"
|
||||
msgid "Manual"
|
||||
msgstr "ידני"
|
||||
#: gtk/inspector/visual.ui:402
|
||||
msgctxt "Font hinting style"
|
||||
msgid "None"
|
||||
msgstr "ללא"
|
||||
|
||||
#: gtk/inspector/visual.ui:403
|
||||
msgctxt "Font hinting style"
|
||||
msgid "Slight"
|
||||
msgstr "קל"
|
||||
|
||||
#: gtk/inspector/visual.ui:404
|
||||
msgctxt "Font hinting style"
|
||||
msgid "Medium"
|
||||
msgstr "בינוני"
|
||||
|
||||
#: gtk/inspector/visual.ui:405
|
||||
msgctxt "Font hinting style"
|
||||
msgid "Full"
|
||||
msgstr "מלא"
|
||||
|
||||
#: gtk/inspector/visual.ui:422
|
||||
msgid "Metrics Hinting"
|
||||
msgstr "רימוז מדדים"
|
||||
|
||||
#: gtk/inspector/visual.ui:457
|
||||
msgid "Show Framerate"
|
||||
msgstr "הצגת קצב תמוניות"
|
||||
|
||||
#: gtk/inspector/visual.ui:430
|
||||
#: gtk/inspector/visual.ui:482
|
||||
msgid "Show Graphic Updates"
|
||||
msgstr "הצגת עדכונים גרפיים"
|
||||
|
||||
#: gtk/inspector/visual.ui:450
|
||||
#: gtk/inspector/visual.ui:502
|
||||
msgid ""
|
||||
"Tints all the places where the current renderer uses Cairo instead of the "
|
||||
"GPU."
|
||||
"Tints all the places where the current renderer uses Cairo instead of the GPU."
|
||||
msgstr ""
|
||||
"מכהה את כל המקומות שמעבד התצוגה הנוכחית משתמש ב־Cairo במקום במעבד הגרפי."
|
||||
|
||||
#: gtk/inspector/visual.ui:456
|
||||
#: gtk/inspector/visual.ui:508
|
||||
msgid "Show Cairo Rendering"
|
||||
msgstr "הצגת עיבוד Cairo"
|
||||
|
||||
#: gtk/inspector/visual.ui:481
|
||||
#: gtk/inspector/visual.ui:533
|
||||
msgid "Show Baselines"
|
||||
msgstr "הצגת קווי בסיס (Baselines)"
|
||||
|
||||
#: gtk/inspector/visual.ui:509
|
||||
#: gtk/inspector/visual.ui:561
|
||||
msgid "Show Layout Borders"
|
||||
msgstr "הצגת גבולות פריסה"
|
||||
|
||||
#: gtk/inspector/visual.ui:566
|
||||
#: gtk/inspector/visual.ui:618
|
||||
msgid "CSS Padding"
|
||||
msgstr "מרווח ב־CSS"
|
||||
|
||||
#: gtk/inspector/visual.ui:576
|
||||
#: gtk/inspector/visual.ui:628
|
||||
msgid "CSS Border"
|
||||
msgstr "מסגרת CSS"
|
||||
|
||||
#: gtk/inspector/visual.ui:586
|
||||
#: gtk/inspector/visual.ui:638
|
||||
msgid "CSS Margin"
|
||||
msgstr "שול CSS"
|
||||
|
||||
#: gtk/inspector/visual.ui:596
|
||||
#: gtk/inspector/visual.ui:648
|
||||
msgid "Widget Margin"
|
||||
msgstr "שול הווידג׳ט"
|
||||
|
||||
#: gtk/inspector/visual.ui:631
|
||||
#: gtk/inspector/visual.ui:683
|
||||
msgid "Show Focus"
|
||||
msgstr "הצגת מיקוד"
|
||||
|
||||
#: gtk/inspector/visual.ui:656
|
||||
#: gtk/inspector/visual.ui:708
|
||||
msgid "Show Accessibility warnings"
|
||||
msgstr "הצגת אזהרות נגישות"
|
||||
|
||||
#: gtk/inspector/visual.ui:681
|
||||
#: gtk/inspector/visual.ui:733
|
||||
msgid "Show Graphics Offload"
|
||||
msgstr "הצגת פריקת גרפיקה"
|
||||
|
||||
#: gtk/inspector/visual.ui:713
|
||||
#: gtk/inspector/visual.ui:765
|
||||
msgid "Inspect Inspector"
|
||||
msgstr "חקירת חוקר"
|
||||
|
||||
@@ -6320,32 +6327,32 @@ msgstr "_יצירה"
|
||||
msgid "Select Font"
|
||||
msgstr "בחירת גופן"
|
||||
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:66
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:64
|
||||
msgid "Search font name"
|
||||
msgstr "חיפוש שם הגופן"
|
||||
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:79
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:77
|
||||
msgid "Filters"
|
||||
msgstr "מסננים"
|
||||
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:91
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:89
|
||||
msgid "Filter by"
|
||||
msgstr "סינון לפי"
|
||||
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:101
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:99
|
||||
msgid "Monospace"
|
||||
msgstr "רוחב אחיד"
|
||||
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:106
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:105
|
||||
msgid "Language"
|
||||
msgstr "שפה"
|
||||
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:199 gtk/ui/gtkfontchooserwidget.ui:201
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:354 gtk/ui/gtkfontchooserwidget.ui:358
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:198 gtk/ui/gtkfontchooserwidget.ui:200
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:353 gtk/ui/gtkfontchooserwidget.ui:357
|
||||
msgid "Preview Font"
|
||||
msgstr "תצוגה מקדימה לגופן"
|
||||
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:297
|
||||
#: gtk/ui/gtkfontchooserwidget.ui:296
|
||||
msgid "No Fonts Found"
|
||||
msgstr "לא נמצאו גופנים"
|
||||
|
||||
@@ -6451,8 +6458,7 @@ msgstr "_בחירה"
|
||||
msgid "Pag_es:"
|
||||
msgstr "_דפים:"
|
||||
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:260
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:273
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:260 gtk/print/ui/gtkprintunixdialog.ui:273
|
||||
msgid ""
|
||||
"Specify one or more page ranges,\n"
|
||||
" e.g. 1–3, 7, 11"
|
||||
@@ -6559,10 +6565,8 @@ msgid "A_t:"
|
||||
msgstr "_ב:"
|
||||
|
||||
#. Ability to parse the am/pm format depends on actual locale. You can remove the am/pm values below for your locale if they are not supported.
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:903
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:905
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:921
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:923
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:903 gtk/print/ui/gtkprintunixdialog.ui:905
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:921 gtk/print/ui/gtkprintunixdialog.ui:923
|
||||
msgid ""
|
||||
"Specify the time of print,\n"
|
||||
" e.g. 15∶30, 2∶35 pm, 14∶15∶20, 11∶46∶30 am, 4 pm"
|
||||
@@ -6575,8 +6579,7 @@ msgstr ""
|
||||
msgid "On _hold"
|
||||
msgstr "בהמ_תנה"
|
||||
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:937
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:938
|
||||
#: gtk/print/ui/gtkprintunixdialog.ui:937 gtk/print/ui/gtkprintunixdialog.ui:938
|
||||
msgid "Hold the job until it is explicitly released"
|
||||
msgstr "החזקת המשימה עד שתשוחרר מפורשות"
|
||||
|
||||
@@ -7213,22 +7216,22 @@ msgstr "לשלוח פלט לתיקייה הזאת במקום אל cwd"
|
||||
msgid "Generate debug output"
|
||||
msgstr "יצירת פלט ניפוי שגיאות"
|
||||
|
||||
#: tools/encodesymbolic.c:95
|
||||
#: tools/encodesymbolic.c:92
|
||||
#, c-format
|
||||
msgid "Invalid size %s\n"
|
||||
msgstr "גודל %s שגוי\n"
|
||||
|
||||
#: tools/encodesymbolic.c:107 tools/encodesymbolic.c:116
|
||||
#: tools/encodesymbolic.c:104 tools/encodesymbolic.c:113
|
||||
#, c-format
|
||||
msgid "Can’t load file: %s\n"
|
||||
msgstr "לא ניתן לטעון קובץ: %s\n"
|
||||
|
||||
#: tools/encodesymbolic.c:144 tools/encodesymbolic.c:162
|
||||
#: tools/encodesymbolic.c:141 tools/encodesymbolic.c:147
|
||||
#, c-format
|
||||
msgid "Can’t save file %s: %s\n"
|
||||
msgstr "אי אפשר לשמור קובץ %s: %s\n"
|
||||
|
||||
#: tools/encodesymbolic.c:168
|
||||
#: tools/encodesymbolic.c:153
|
||||
#, c-format
|
||||
msgid "Can’t close stream"
|
||||
msgstr "אי אפשר לסגור תזרים"
|
||||
@@ -7302,7 +7305,7 @@ msgstr "להשתמש בסגנון מקובץ CSS"
|
||||
#: tools/gtk-builder-tool-preview.c:187 tools/gtk-builder-tool-screenshot.c:370
|
||||
#: tools/gtk-builder-tool-validate.c:268
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:106
|
||||
#: tools/gtk-rendernode-tool-render.c:262 tools/gtk-rendernode-tool-show.c:113
|
||||
#: tools/gtk-rendernode-tool-render.c:203 tools/gtk-rendernode-tool-show.c:113
|
||||
#, c-format
|
||||
msgid "Could not initialize windowing system\n"
|
||||
msgstr "לא ניתן להפעיל את מערכת החלונות\n"
|
||||
@@ -7347,13 +7350,13 @@ msgstr ""
|
||||
"Use --force to overwrite.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:332
|
||||
#: tools/gtk-rendernode-tool-render.c:230
|
||||
#: tools/gtk-rendernode-tool-render.c:171
|
||||
#, c-format
|
||||
msgid "Output written to %s.\n"
|
||||
msgstr "Output written to %s.\n"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:336
|
||||
#: tools/gtk-rendernode-tool-render.c:234
|
||||
#: tools/gtk-rendernode-tool-render.c:175
|
||||
#, c-format
|
||||
msgid "Failed to save %s: %s\n"
|
||||
msgstr "Failed to save %s: %s\n"
|
||||
@@ -7372,7 +7375,7 @@ msgstr "שכתוב קובץ קיים"
|
||||
|
||||
#: tools/gtk-builder-tool-screenshot.c:363
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:97
|
||||
#: tools/gtk-rendernode-tool-render.c:255
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
msgid "FILE…"
|
||||
msgstr "FILE…"
|
||||
|
||||
@@ -7422,8 +7425,7 @@ msgstr ""
|
||||
"לא ניתן לטעון את „%s”: %s\n"
|
||||
"\n"
|
||||
|
||||
#: tools/gtk-builder-tool-simplify.c:2466
|
||||
#: tools/gtk-builder-tool-simplify.c:2472
|
||||
#: tools/gtk-builder-tool-simplify.c:2466 tools/gtk-builder-tool-simplify.c:2472
|
||||
#: tools/gtk-builder-tool-simplify.c:2478
|
||||
#, c-format
|
||||
msgid "Can’t parse “%s”: %s\n"
|
||||
@@ -7874,8 +7876,7 @@ msgid "Add renderer to benchmark"
|
||||
msgstr "הוספת מנגנון עיבוד למדידת ביצועים"
|
||||
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:94
|
||||
#: tools/gtk-rendernode-tool-compare.c:65
|
||||
#: tools/gtk-rendernode-tool-render.c:254
|
||||
#: tools/gtk-rendernode-tool-compare.c:65 tools/gtk-rendernode-tool-render.c:195
|
||||
msgid "RENDERER"
|
||||
msgstr "מעבד תצוגה"
|
||||
|
||||
@@ -7896,7 +7897,7 @@ msgid "Benchmark rendering of a .node file."
|
||||
msgstr "מדידת ביצועים על עיבוד קובץ .node."
|
||||
|
||||
#: tools/gtk-rendernode-tool-benchmark.c:127
|
||||
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:283
|
||||
#: tools/gtk-rendernode-tool-info.c:236 tools/gtk-rendernode-tool-render.c:224
|
||||
#: tools/gtk-rendernode-tool-show.c:134
|
||||
#, c-format
|
||||
msgid "No .node file specified\n"
|
||||
@@ -7907,8 +7908,7 @@ msgstr "לא צוין קובץ .node\n"
|
||||
msgid "Can only benchmark a single .node file\n"
|
||||
msgstr "יכול למדוד ביצועים רק לקובץ .node בודד\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-compare.c:65
|
||||
#: tools/gtk-rendernode-tool-render.c:254
|
||||
#: tools/gtk-rendernode-tool-compare.c:65 tools/gtk-rendernode-tool-render.c:195
|
||||
msgid "Renderer to use"
|
||||
msgstr "עיבוד לשימוש"
|
||||
|
||||
@@ -7930,7 +7930,7 @@ msgid "Must specify two files\n"
|
||||
msgstr "חובה לציין שני קבצים.\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-compare.c:102
|
||||
#: tools/gtk-rendernode-tool-render.c:209
|
||||
#: tools/gtk-rendernode-tool-render.c:150
|
||||
#, c-format
|
||||
msgid "Failed to create renderer: %s\n"
|
||||
msgstr "יצירת מנגנון עיבוד נכשלה: %s\n"
|
||||
@@ -7989,7 +7989,7 @@ msgstr "אספקת מידע על נקודת העיבוד החזותי."
|
||||
msgid "Can only accept a single .node file\n"
|
||||
msgstr "יכול לקבל רק קובץ .node בודד\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:170
|
||||
#: tools/gtk-rendernode-tool-render.c:123
|
||||
#, c-format
|
||||
msgid ""
|
||||
"File %s exists.\n"
|
||||
@@ -7998,17 +7998,16 @@ msgstr ""
|
||||
"הקובץ %s קיים.\n"
|
||||
"כדי לשכתב יש לציין את שם הקובץ.\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:184
|
||||
#: tools/gtk-rendernode-tool-render.c:196
|
||||
#: tools/gtk-rendernode-tool-render.c:137
|
||||
#, c-format
|
||||
msgid "Failed to generate SVG: %s\n"
|
||||
msgstr "יצירת SVG נכשלה: %s\n"
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:270
|
||||
#: tools/gtk-rendernode-tool-render.c:211
|
||||
msgid "Render a .node file to an image."
|
||||
msgstr "עיבוד קובץ .node לתמונה."
|
||||
|
||||
#: tools/gtk-rendernode-tool-render.c:289
|
||||
#: tools/gtk-rendernode-tool-render.c:230
|
||||
#, c-format
|
||||
msgid "Can only render a single .node file to a single output file\n"
|
||||
msgstr "יכול לעבד קובץ ,node יחיד בלבד לקובץ פלט יחיד\n"
|
||||
@@ -8143,31 +8142,6 @@ msgstr ""
|
||||
"No theme index file in “%s”.\n"
|
||||
"If you really want to create an icon cache here, use --ignore-theme-index.\n"
|
||||
|
||||
#~ msgid "Antialiasing"
|
||||
#~ msgstr "החלקת קצוות"
|
||||
|
||||
#~ msgid "Hinting"
|
||||
#~ msgstr "רימוז"
|
||||
|
||||
#~ msgctxt "Font hinting style"
|
||||
#~ msgid "None"
|
||||
#~ msgstr "ללא"
|
||||
|
||||
#~ msgctxt "Font hinting style"
|
||||
#~ msgid "Slight"
|
||||
#~ msgstr "קל"
|
||||
|
||||
#~ msgctxt "Font hinting style"
|
||||
#~ msgid "Medium"
|
||||
#~ msgstr "בינוני"
|
||||
|
||||
#~ msgctxt "Font hinting style"
|
||||
#~ msgid "Full"
|
||||
#~ msgstr "מלא"
|
||||
|
||||
#~ msgid "Metrics Hinting"
|
||||
#~ msgstr "רימוז מדדים"
|
||||
|
||||
#~ msgid "Backend does not support window scaling"
|
||||
#~ msgstr "הממשק אינו תומך בקנה מידה לחלון"
|
||||
|
||||
@@ -9182,8 +9156,8 @@ msgstr ""
|
||||
#~ "צבע זה בעזרת המשולש הפנימי."
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Click the eyedropper, then click a color anywhere on your screen to "
|
||||
#~ "select that color."
|
||||
#~ "Click the eyedropper, then click a color anywhere on your screen to select "
|
||||
#~ "that color."
|
||||
#~ msgstr "יש ללחוץ על הטפטפת ואז ללחוץ על צבע כלשהו במסך לבחירת אותו הצבע."
|
||||
|
||||
#~ msgid "_Hue:"
|
||||
@@ -9235,8 +9209,8 @@ msgstr ""
|
||||
#~ "You can enter an HTML-style hexadecimal color value, or simply a color "
|
||||
#~ "name such as “orange” in this entry."
|
||||
#~ msgstr ""
|
||||
#~ "ניתן להזין ערך צבע הקסדצימלי בסגנון HTML, או פשוט לכתוב שם צבע באנגלית "
|
||||
#~ "כמו „orange” ברשומה זו."
|
||||
#~ "ניתן להזין ערך צבע הקסדצימלי בסגנון HTML, או פשוט לכתוב שם צבע באנגלית כמו "
|
||||
#~ "„orange” ברשומה זו."
|
||||
|
||||
#~ msgid "_Palette:"
|
||||
#~ msgstr "_פלטה:"
|
||||
@@ -10043,11 +10017,11 @@ msgstr ""
|
||||
#~ msgstr "smb://foo.example.com, ssh://192.168.0.1"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "The WGL_ARB_create_context extension needed to create core profiles is "
|
||||
#~ "not available"
|
||||
#~ "The WGL_ARB_create_context extension needed to create core profiles is not "
|
||||
#~ "available"
|
||||
#~ msgstr ""
|
||||
#~ "The WGL_ARB_create_context extension needed to create core profiles is "
|
||||
#~ "not available"
|
||||
#~ "The WGL_ARB_create_context extension needed to create core profiles is not "
|
||||
#~ "available"
|
||||
|
||||
#~ msgid "Changes are applied instantly, only for this selected widget."
|
||||
#~ msgstr "שינויים מוחלקים מיידית, רק ליישומון נבחר זה."
|
||||
@@ -10561,11 +10535,11 @@ msgstr ""
|
||||
#~ msgstr "Unable to load image-loading module: %s: %s"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Image-loading module %s does not export the proper interface; perhaps "
|
||||
#~ "it's from a different GTK version?"
|
||||
#~ "Image-loading module %s does not export the proper interface; perhaps it's "
|
||||
#~ "from a different GTK version?"
|
||||
#~ msgstr ""
|
||||
#~ "Image-loading module %s does not export the proper interface; perhaps "
|
||||
#~ "it's from a different GTK version?"
|
||||
#~ "Image-loading module %s does not export the proper interface; perhaps it's "
|
||||
#~ "from a different GTK version?"
|
||||
|
||||
#~ msgid "Couldn't recognize the image file format for file '%s'"
|
||||
#~ msgstr "לא ניתן לזהות את פורמט התמונה בקובץ '%s'"
|
||||
@@ -10576,8 +10550,7 @@ msgstr ""
|
||||
#~ msgid "Error writing to image file: %s"
|
||||
#~ msgstr "שגיאה בכתיבה לקובץ תמונה: %s"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "This build of gdk-pixbuf does not support saving the image format: %s"
|
||||
#~ msgid "This build of gdk-pixbuf does not support saving the image format: %s"
|
||||
#~ msgstr "בניה זו של gdk-pixbuf לא תומכת בשמירת התמונה בפורמט: %s"
|
||||
|
||||
#~ msgid "Insufficient memory to save image to callback"
|
||||
@@ -11155,8 +11128,8 @@ msgstr ""
|
||||
#~ "available to this program.\n"
|
||||
#~ "Are you sure that you want to select it?"
|
||||
#~ msgstr ""
|
||||
#~ "הקובץ \"%s\" תלוי במכונה אחרת (הנקראת %s) וייתכן כי לא תיהיה זמינה "
|
||||
#~ "לתוכנית זו. האם אתה בטוח שברצונך לבחור אותו?"
|
||||
#~ "הקובץ \"%s\" תלוי במכונה אחרת (הנקראת %s) וייתכן כי לא תיהיה זמינה לתוכנית "
|
||||
#~ "זו. האם אתה בטוח שברצונך לבחור אותו?"
|
||||
|
||||
#~ msgid "_New Folder"
|
||||
#~ msgstr "תיקייה _חדשה"
|
||||
|
@@ -1,3 +1 @@
|
||||
at-invalid-12.css:1:25-29: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
at-invalid-12.css:1:31-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
at-invalid-12.css:1:38-44: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
|
@@ -1,2 +1 @@
|
||||
at-invalid-13.css:1:25-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
at-invalid-13.css:1:32-35: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
|
@@ -1,3 +1 @@
|
||||
at-invalid-15.css:1:25-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
at-invalid-15.css:1:32-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
at-invalid-15.css:1:36-37: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
|
@@ -1,2 +1 @@
|
||||
at-invalid-16.css:1:25-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
at-invalid-16.css:1:30-31: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
|
@@ -1 +0,0 @@
|
||||
at-valid-07.css:1:21-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -1 +0,0 @@
|
||||
at-valid-11.css:1:29-34: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -1 +0,0 @@
|
||||
at-valid-12.css:1:27-32: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -1 +0,0 @@
|
||||
at-valid-13.css:1:27-32: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -1,2 +0,0 @@
|
||||
at-valid-14.css:1:25-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
at-valid-14.css:1:32-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -1 +0,0 @@
|
||||
at-valid-16.css:1:69-74: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -1 +0,0 @@
|
||||
at-valid-17.css:1:20-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -1,94 +0,0 @@
|
||||
background-shorthand.css:10:273-278: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:46:163-168: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:118:38-43: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:158:89-94: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:194:316-321: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:214:122-127: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:222:381-386: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:226:48-53: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:238:214-219: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:246:88-93: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:306:15-20: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:346:358-363: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:374:31-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:422:96-101: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:430:719-724: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:446:252-257: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:458:153-158: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:498:46-51: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:546:201-206: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:562:260-265: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:618:801-806: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:646:86-91: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:666:279-284: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:738:355-360: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:742:194-199: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:798:95-100: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:826:75-80: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:854:15-20: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:862:76-81: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:866:116-121: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:874:517-522: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:894:98-103: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:898:157-162: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:906:225-230: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:986:712-717: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:994:304-309: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1078:542-547: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1090:719-724: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1110:586-591: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1146:127-132: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1242:261-266: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1306:24-29: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1314:393-398: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1398:283-288: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1414:236-241: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1418:268-273: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1438:406-411: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1446:102-107: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1482:94-99: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1494:766-771: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1510:45-50: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1534:84-89: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1538:268-273: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1626:786-791: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1642:231-236: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1658:69-74: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1694:607-612: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1782:59-64: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1794:214-219: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1850:113-118: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1858:108-113: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1894:535-540: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1898:301-306: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1902:373-378: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1922:154-159: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1926:391-396: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1938:224-229: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1942:533-538: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1958:15-20: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1970:412-417: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:1994:202-207: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2110:547-552: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2138:356-361: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2174:204-209: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2266:59-64: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2278:305-310: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2286:71-76: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2290:106-111: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2334:133-138: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2374:489-494: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2386:197-202: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2414:15-20: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2454:173-178: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2470:527-532: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2506:49-54: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2522:181-186: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2562:369-374: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2586:583-588: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2598:574-579: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2602:247-252: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2622:109-114: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2646:34-39: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2662:63-68: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
background-shorthand.css:2674:24-29: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -71,27 +71,3 @@ q {
|
||||
r {
|
||||
color: @mygreen;
|
||||
}
|
||||
|
||||
s {
|
||||
color: rgb(255 0 0);
|
||||
}
|
||||
|
||||
t {
|
||||
color: rgb(255% 0 0);
|
||||
}
|
||||
|
||||
u {
|
||||
color: rgb(255 0 0 / 50%);
|
||||
}
|
||||
|
||||
v {
|
||||
color: rgb(calc(128 + 127) calc(10 - 10) calc(100 * 0) / calc(1 / 2));
|
||||
}
|
||||
|
||||
w {
|
||||
color: rgba(255 0 0);
|
||||
}
|
||||
|
||||
x {
|
||||
color: rgba(255 0 0 / 0.5);
|
||||
}
|
||||
|
@@ -1 +0,0 @@
|
||||
color.css:72:10-18: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -71,27 +71,3 @@ q {
|
||||
r {
|
||||
color: @mygreen;
|
||||
}
|
||||
|
||||
s {
|
||||
color: rgb(255,0,0);
|
||||
}
|
||||
|
||||
t {
|
||||
color: rgb(255,0,0);
|
||||
}
|
||||
|
||||
u {
|
||||
color: rgba(255,0,0,0.5);
|
||||
}
|
||||
|
||||
v {
|
||||
color: rgba(255,0,0,0.5);
|
||||
}
|
||||
|
||||
w {
|
||||
color: rgb(255,0,0);
|
||||
}
|
||||
|
||||
x {
|
||||
color: rgba(255,0,0,0.5);
|
||||
}
|
||||
|
@@ -30,38 +30,3 @@ h {
|
||||
color: rgb(100%,0,0);
|
||||
}
|
||||
|
||||
i {
|
||||
color: rgb(1 2 3 4);
|
||||
}
|
||||
|
||||
j {
|
||||
color: rgb(1 2 3 /);
|
||||
}
|
||||
|
||||
k {
|
||||
color: rgb(1 2 / 3 4);
|
||||
}
|
||||
|
||||
l {
|
||||
color: rgb(1, 2 3);
|
||||
}
|
||||
|
||||
m {
|
||||
color: rgb(1 2, 3 / 4);
|
||||
}
|
||||
|
||||
n {
|
||||
color: rgba(1 2 3 4);
|
||||
}
|
||||
|
||||
o {
|
||||
color: rgba(1 2 3 /);
|
||||
}
|
||||
|
||||
p {
|
||||
color: rgba(1 2 / 3 4);
|
||||
}
|
||||
|
||||
q {
|
||||
color: rgba(1, 2 3 / 4);
|
||||
}
|
||||
|
@@ -6,12 +6,3 @@ colors-errors.css:18:10-23: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:22:19-20: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:26:22-23: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:30:19-20: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:34:20-21: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:38:21-22: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:42:18-19: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:46:19-20: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:50:17-18: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:54:21-22: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:58:22-23: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:62:19-20: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
colors-errors.css:66:20-21: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
|
@@ -53,11 +53,3 @@ n {
|
||||
o {
|
||||
color: /*x*/ rgb( /*x*/ 255 /*x*/ , /*x*/ 0 /*x*/ , /*x*/ 0 /*x*/ ) /*x*/ ;
|
||||
}
|
||||
|
||||
p {
|
||||
color: /*x*/ rgb( /*x*/ 255 /*x*/ 0 /*x*/ 0 /*x*/ ) /*x*/ ;
|
||||
}
|
||||
|
||||
q {
|
||||
color: /*x*/ rgb( /*x*/ 255 /*x*/ 0 /*x*/ 0 /*x*/ / /*x*/ 100%) /*x*/ ;
|
||||
}
|
||||
|
@@ -53,11 +53,3 @@ n {
|
||||
o {
|
||||
color: rgb(255,0,0);
|
||||
}
|
||||
|
||||
p {
|
||||
color: rgb(255,0,0);
|
||||
}
|
||||
|
||||
q {
|
||||
color: rgb(255,0,0);
|
||||
}
|
||||
|
@@ -1,2 +0,0 @@
|
||||
currentcolor-everywhere.css:16:28-39: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
currentcolor-everywhere.css:20:14-25: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -1 +0,0 @@
|
||||
declarations-valid-09.css:1:41-50: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -21,47 +21,3 @@ e {
|
||||
f {
|
||||
color: hsl(1, 2, 3);
|
||||
}
|
||||
|
||||
g {
|
||||
color: hsl(120 100% 50);
|
||||
}
|
||||
|
||||
h {
|
||||
color: hsl(120 100% 50 / 50%);
|
||||
}
|
||||
|
||||
i {
|
||||
color: hsl(0.5turn 100 50);
|
||||
}
|
||||
|
||||
j {
|
||||
color: hsla(0.5turn 100 50);
|
||||
}
|
||||
|
||||
k {
|
||||
color: hsla(calc(0.5turn + 90deg) calc(50% + 50) calc(100 / 2) / calc(1 / 2));
|
||||
}
|
||||
|
||||
l {
|
||||
color: hsl(0.5turn, 100%, 50%);
|
||||
}
|
||||
|
||||
m {
|
||||
color: hsl(1, 2 3);
|
||||
}
|
||||
|
||||
n {
|
||||
color: hsl(1 2 3 4);
|
||||
}
|
||||
|
||||
o {
|
||||
color: hsl(1 2 3 /);
|
||||
}
|
||||
|
||||
p {
|
||||
color: hsla(1 2 / 3 4);
|
||||
}
|
||||
|
||||
q {
|
||||
color: hsla(1, 2 3 / 4);
|
||||
}
|
||||
|
@@ -1,6 +1 @@
|
||||
hsl.css:22:17-18: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
hsl.css:50:17-18: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
hsl.css:54:20-21: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
hsl.css:58:21-22: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
hsl.css:62:19-20: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
hsl.css:66:18-19: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
||||
|
@@ -17,27 +17,3 @@ d {
|
||||
e {
|
||||
color: rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
g {
|
||||
color: rgb(0,255,0);
|
||||
}
|
||||
|
||||
h {
|
||||
color: rgba(0,255,0,0.5);
|
||||
}
|
||||
|
||||
i {
|
||||
color: rgb(0,255,255);
|
||||
}
|
||||
|
||||
j {
|
||||
color: rgb(0,255,255);
|
||||
}
|
||||
|
||||
k {
|
||||
color: rgba(128,0,255,0.5);
|
||||
}
|
||||
|
||||
l {
|
||||
color: rgb(0,255,255);
|
||||
}
|
||||
|
@@ -1,12 +0,0 @@
|
||||
shadow.css:78:30-39: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:146:52-61: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:154:35-44: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:174:42-51: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:190:36-45: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:238:27-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:314:41-50: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:318:21-30: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:334:27-36: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:354:36-45: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:358:41-50: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
||||
shadow.css:382:30-39: error: GTK_CSS_PARSER_WARNING_DEPRECATED
|
@@ -1 +0,0 @@
|
||||
variables-invalid-06.css:2:10-14: error: GTK_CSS_PARSER_ERROR_SYNTAX
|
@@ -1319,7 +1319,7 @@ test_download_random (gconstpointer data)
|
||||
width = g_test_rand_int_range (1, 40) * g_test_rand_int_range (1, 40);
|
||||
height = g_test_rand_int_range (1, 40) * g_test_rand_int_range (1, 40);
|
||||
}
|
||||
while (width * height >= 32 * 1024);
|
||||
while (width * height >= 1024 * 1024);
|
||||
|
||||
test_download (data, width, height, 1);
|
||||
}
|
||||
|
@@ -14,36 +14,39 @@
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtk/gtkcolorutilsprivate.h>
|
||||
#include <gtk/gtkcolorutils.h>
|
||||
|
||||
struct {
|
||||
float r, g, b;
|
||||
float h, s, v;
|
||||
} tests[] = {
|
||||
{ 0, 0, 0, 0, 0, 0 },
|
||||
{ 1, 1, 1, 0, 0, 1 },
|
||||
{ 1, 0, 0, 0, 1, 1 },
|
||||
{ 1, 1, 0, 1.0 / 6.0, 1, 1 },
|
||||
{ 0, 1, 0, 2.0 / 6.0, 1, 1 },
|
||||
{ 0, 1, 1, 3.0 / 6.0, 1, 1 },
|
||||
{ 0, 0, 1, 4.0 / 6.0, 1, 1 },
|
||||
{ 1, 0, 1, 5.0 / 6.0, 1, 1 },
|
||||
};
|
||||
|
||||
/* Close enough for float precision to match, even with some
|
||||
* rounding errors */
|
||||
#define EPSILON 1e-6
|
||||
|
||||
static void
|
||||
test_roundtrips_rgb_hsv (void)
|
||||
test_roundtrips (void)
|
||||
{
|
||||
struct {
|
||||
float r, g, b;
|
||||
float h, s, v;
|
||||
} tests[] = {
|
||||
{ 0, 0, 0, 0, 0, 0 },
|
||||
{ 1, 1, 1, 0, 0, 1 },
|
||||
{ 1, 0, 0, 0, 1, 1 },
|
||||
{ 1, 1, 0, 1.0 / 6.0, 1, 1 },
|
||||
{ 0, 1, 0, 2.0 / 6.0, 1, 1 },
|
||||
{ 0, 1, 1, 3.0 / 6.0, 1, 1 },
|
||||
{ 0, 0, 1, 4.0 / 6.0, 1, 1 },
|
||||
{ 1, 0, 1, 5.0 / 6.0, 1, 1 },
|
||||
};
|
||||
const float EPSILON = 1e-6;
|
||||
|
||||
for (unsigned int i = 0; i < G_N_ELEMENTS (tests); i++)
|
||||
{
|
||||
float r, g, b;
|
||||
float h, s, v;
|
||||
|
||||
g_print ("color %u\n", i);
|
||||
gtk_hsv_to_rgb (tests[i].h, tests[i].s, tests[i].v, &r, &g, &b);
|
||||
g_assert_cmpfloat_with_epsilon (r, tests[i].r, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (g, tests[i].g, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (b, tests[i].b, EPSILON);
|
||||
|
||||
gtk_rgb_to_hsv (tests[i].r, tests[i].g, tests[i].b, &h, &s, &v);
|
||||
g_assert_cmpfloat_with_epsilon (h, tests[i].h, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (s, tests[i].s, EPSILON);
|
||||
@@ -51,87 +54,13 @@ test_roundtrips_rgb_hsv (void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
test_roundtrips_rgb_hwb (void)
|
||||
{
|
||||
struct {
|
||||
float r, g, b;
|
||||
float hue, white, black;
|
||||
} tests[] = {
|
||||
{ 0, 0, 0, 0, 0, 1 },
|
||||
{ 1, 1, 1, 0, 1, 0 },
|
||||
{ 1, 0, 0, 0, 0, 0 },
|
||||
{ 1, 1, 0, 60, 0, 0 },
|
||||
{ 0, 1, 0, 120, 0, 0 },
|
||||
{ 0, 1, 1, 180, 0, 0 },
|
||||
{ 0, 0, 1, 240, 0, 0 },
|
||||
{ 1, 0, 1, 300, 0, 0 },
|
||||
{ 0.5, 0.5, 0.5, 0, 0.5, 0.5 },
|
||||
};
|
||||
const float EPSILON = 1e-6;
|
||||
|
||||
for (unsigned int i = 0; i < G_N_ELEMENTS (tests); i++)
|
||||
{
|
||||
float r, g, b;
|
||||
float hue, white, black;
|
||||
|
||||
gtk_hwb_to_rgb (tests[i].hue, tests[i].white, tests[i].black, &r, &g, &b);
|
||||
g_assert_cmpfloat_with_epsilon (r, tests[i].r, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (g, tests[i].g, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (b, tests[i].b, EPSILON);
|
||||
|
||||
gtk_rgb_to_hwb (tests[i].r, tests[i].g, tests[i].b, &hue, &white, &black);
|
||||
g_assert_cmpfloat_with_epsilon (hue, tests[i].hue, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (white, tests[i].white, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (black, tests[i].black, EPSILON);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
test_roundtrips_rgb_oklab (void)
|
||||
{
|
||||
struct {
|
||||
float red, green, blue;
|
||||
float L, a, b;
|
||||
} tests[] = {
|
||||
{ 0, 0, 0, 0, 0, 0 },
|
||||
{ 1, 1, 1, 1, 0, 0 },
|
||||
{ 1, 0, 0, 0.62796, 0.22486, 0.12585 },
|
||||
{ 1, 1, 0, 0.96798, -0.07137, 0.19857 },
|
||||
{ 0, 1, 0, 0.86644, -0.23389, 0.17950 },
|
||||
{ 0, 1, 1, 0.90540, -0.14944, -0.03940 },
|
||||
{ 0, 0, 1, 0.45201, -0.03246, -0.31153 },
|
||||
{ 1, 0, 1, 0.70167, 0.27457, -0.16916 },
|
||||
{ 0.5, 0.5, 0.5, 0.598181, 0.00000, 0.00000 },
|
||||
};
|
||||
const float EPSILON = 1e-3;
|
||||
|
||||
for (unsigned int i = 0; i < G_N_ELEMENTS (tests); i++)
|
||||
{
|
||||
float red, green, blue;
|
||||
float L, a, b;
|
||||
|
||||
gtk_oklab_to_rgb (tests[i].L, tests[i].a, tests[i].b, &red, &green, &blue);
|
||||
g_assert_cmpfloat_with_epsilon (red, tests[i].red, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (green, tests[i].green, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (blue, tests[i].blue, EPSILON);
|
||||
|
||||
gtk_rgb_to_oklab (tests[i].red, tests[i].green, tests[i].blue, &L, &a, &b);
|
||||
g_assert_cmpfloat_with_epsilon (L, tests[i].L, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (a, tests[i].a, EPSILON);
|
||||
g_assert_cmpfloat_with_epsilon (b, tests[i].b, EPSILON);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char *argv[])
|
||||
{
|
||||
gtk_test_init (&argc, &argv);
|
||||
|
||||
g_test_add_func ("/color/roundtrips/rgb-hsv", test_roundtrips_rgb_hsv);
|
||||
g_test_add_func ("/color/roundtrips/rgb-hwb", test_roundtrips_rgb_hwb);
|
||||
g_test_add_func ("/color/roundtrips/rgb-oklab", test_roundtrips_rgb_oklab);
|
||||
g_test_add_func ("/color/roundtrips", test_roundtrips);
|
||||
|
||||
return g_test_run();
|
||||
}
|
||||
|
Reference in New Issue
Block a user