Compare commits

..

22 Commits

Author SHA1 Message Date
Matthias Clasen
e5d0f32d8c css: Improve error reporting for variables
Emit errors for all the variables that were being expanded
if an error occurs while parsing a property value at compute time.

Include the variables that are being expanded in the error message.
2024-05-09 23:13:53 -04:00
Matthias Clasen
e825fd901f css parser: Keep variables for tokenizers
Add a function that gets the names of the variables that the
parser is currently in the process of expanding. This will
be used for error reporting.
2024-05-09 23:13:53 -04:00
Matthias Clasen
e3543f37d3 css parser: Inline the tokenizer array
This is in preparation of associating more data with the token streams.
2024-05-09 23:13:53 -04:00
Matthias Clasen
e9bf0322ac css provider: Set bytes on sections
Pass the bytes we're parsing to the sections, and keep a pointer
to them around, so we can compare them in the has_section
implementation.

This commit also corrects some of the location information that
we add into the section for variables to be more accurate.
2024-05-09 23:13:53 -04:00
Matthias Clasen
6d5cb0a083 css parser: Add gtk_css_parser_get_bytes
Gets the bytes that the parser is operating on.
2024-05-09 23:13:53 -04:00
Matthias Clasen
8b5aab459a css provider: Set sections on all variable values
We were doing it in one case, but forgetting it in another.
These sections are necessary to report meaningful error locations
when parsing property values at compute time.
2024-05-09 23:13:53 -04:00
Matthias Clasen
8da3cc10fd style cascade: Propagate errors
When we compute values, the provider we use ends up being the
style cascade. If we hit a parser error when parsing variable-bearing
property values at compute time, we emit the error on that provider.

By making the cascade propagate the error back to the proper css
provider that contains the section in question, we get it reported
back to the css editor in the inspector.
2024-05-09 23:13:53 -04:00
Matthias Clasen
f48a4e84af style provider: Add a has_section api
Add gtk_style_provider_has_section and implement it for
GtkCssProvider. This will be used later to direct error
emissions to the right provider.
2024-05-09 23:13:53 -04:00
Matthias Clasen
09c76208a2 css parser: Add bytes to sections
We will use this later to link sections back to the providers
they come from.
2024-05-09 23:13:53 -04:00
Matthias Clasen
62b1d21556 css parser: Add gtk_css_parser_skip_whitespace
Does what it says.
2024-05-09 23:13:53 -04:00
Matthias Clasen
8fba58eaa9 css: Don't accept junk
Check that there is no junk at the end of the property value
when parsing variable-bearing properties at compute time.
2024-05-09 23:13:52 -04:00
Alice Mikhaylenko
b4890edd64 inspector: Sort GTK CSS properties between standard and custom ones 2024-05-08 19:03:45 +04:00
Alice Mikhaylenko
93b9388180 inspector: Show custom properties for css nodes 2024-05-08 19:03:45 +04:00
Alice Mikhaylenko
76b2609ad5 testsuite: Add css variables tests 2024-05-08 19:03:44 +04:00
Alice Mikhaylenko
a37a0711ad csskeyframes: Support variables 2024-05-08 19:03:44 +04:00
Alice Mikhaylenko
23dbb7122c cssanimation: Recompute values while playing
This will be necessary for supporting variables in animations.

For this we need to pass all the gtk_css_value_compute() parameters into
GtkCssAnimatedStyle: parent style and provider.
2024-05-08 19:03:44 +04:00
Alice Mikhaylenko
e04ab263f9 cssstaticstyle: Split property lists into a separate header
We'll need to use them in GtkCssAnimatedStyle too.
2024-05-08 19:03:44 +04:00
Alice Mikhaylenko
5e6e808a55 cssvalue: Pass an extra GtkCssVariableSet to compute()
We'll need this to support variables in @keyframes, since styles will
need to combine their own variables and the ones from the keyframes.

See the next commit, this one is split out to avoid a huge diff.
2024-05-08 19:03:44 +04:00
Alice Mikhaylenko
6eaf6e2f7d Implement basic support for CSS variables 2024-05-08 19:03:43 +04:00
Alice Mikhaylenko
e4a4a0f6dd cssvalue: Add contains_variables()
We'll need this to know which values to recompute for animations.

It will be used in the next commit, it's separate to avoid the diff
being too large.
2024-05-08 19:00:40 +04:00
Alice Mikhaylenko
f301ea7936 csstokenizer: Add save() and restore()
We'll need that to check if property values contain variables.
2024-05-08 19:00:40 +04:00
Alice Mikhaylenko
a3e9ecd199 cssprovider: Copy bytes when loading
We'll need to keep accessing them later to compute values with variables,
so we can't avoid this anymore.
2024-05-08 19:00:40 +04:00
65 changed files with 1953 additions and 1449 deletions

7
NEWS
View File

@@ -6,7 +6,6 @@ Overview of Changes in 4.15.1, xx-xx-xxxx
* CSS:
- Support the :root selector
- Support variables and custom properties
* Icontheme:
- Make symbolic svg loading more efficient
@@ -15,22 +14,19 @@ Overview of Changes in 4.15.1, xx-xx-xxxx
* Accessibility:
- Make the gtk-demo sidebar search more accessible
- Stop emitting focus events
- Realize child contexts when necessary
* GDK:
- Support XDG_ACTIVATION_TOKEN
- dmabuf: Be more defensive when importing unknown formats to GL
- dmabuf: Use narrow range for YUV
- vulkan: Recreate swapchains when necessary or beneficial
* GSK:
- Improve logging for GDK_DEBUG=offload
- Improve logging for GSK_DEBUG=renderer
- gpu: Warn about inefficient texture import
- gpu: Handle tiny offscreens correctly
- gpu: Handle tiny offscreens correctly
- vulkan: Add profiler marks in various places
- vulkan: Fix a problem with imported dmabufs showing up black
- cairo: Speed up mask nodes, since we use them for symbolic icons
* Wayland:
- Use wl_compositor version 6
@@ -50,7 +46,6 @@ Overview of Changes in 4.15.1, xx-xx-xxxx
* Translation updates:
Korean
Portuguese
Turkish

View File

@@ -41,10 +41,8 @@ G_BEGIN_DECLS
#ifdef GDK_ARRAY_NULL_TERMINATED
#define GDK_ARRAY_REAL_SIZE(_size) ((_size) + 1)
#define GDK_ARRAY_MAX_SIZE (G_MAXSIZE / sizeof (_T_) - 1)
#else
#define GDK_ARRAY_REAL_SIZE(_size) (_size)
#define GDK_ARRAY_MAX_SIZE (G_MAXSIZE / sizeof (_T_))
#endif
/* make this readable */
@@ -179,23 +177,18 @@ G_GNUC_UNUSED static inline void
gdk_array(reserve) (GdkArray *self,
gsize n)
{
gsize new_capacity, size, capacity;
gsize new_size, size;
if (G_UNLIKELY (n > GDK_ARRAY_MAX_SIZE))
g_error ("requesting array size of %zu, but maximum size is %zu", n, GDK_ARRAY_MAX_SIZE);
capacity = gdk_array(get_capacity) (self);
if (n <= capacity)
return;
if (n <= gdk_array(get_capacity) (self))
return;
size = gdk_array(get_size) (self);
/* capacity * 2 can overflow, that's why we MAX() */
new_capacity = MAX (GDK_ARRAY_REAL_SIZE (n), capacity * 2);
new_size = ((gsize) 1) << g_bit_storage (MAX (GDK_ARRAY_REAL_SIZE (n), 16) - 1);
#ifdef GDK_ARRAY_PREALLOC
if (self->start == self->preallocated)
{
self->start = g_new (_T_, new_capacity);
self->start = g_new (_T_, new_size);
memcpy (self->start, self->preallocated, sizeof (_T_) * GDK_ARRAY_REAL_SIZE (size));
}
else
@@ -203,15 +196,15 @@ gdk_array(reserve) (GdkArray *self,
#ifdef GDK_ARRAY_NULL_TERMINATED
if (self->start == NULL)
{
self->start = g_new (_T_, new_capacity);
self->start = g_new (_T_, new_size);
*self->start = *(_T_[1]) { 0 };
}
else
#endif
self->start = g_renew (_T_, self->start, new_capacity);
self->start = g_renew (_T_, self->start, new_size);
self->end = self->start + size;
self->end_allocation = self->start + new_capacity;
self->end_allocation = self->start + new_size;
#ifdef GDK_ARRAY_NULL_TERMINATED
self->end_allocation--;
#endif
@@ -319,7 +312,6 @@ gdk_array(get) (const GdkArray *self,
#undef gdk_array_paste
#undef gdk_array
#undef GDK_ARRAY_REAL_SIZE
#undef GDK_ARRAY_MAX_SIZE
#undef GDK_ARRAY_BY_VALUE
#undef GDK_ARRAY_ELEMENT_TYPE

View File

@@ -165,29 +165,25 @@ _gdk_wayland_cursor_get_buffer (GdkWaylandDisplay *display,
double *scale)
{
GdkTexture *texture;
int desired_scale_factor;
desired_scale_factor = (int) ceil (desired_scale);
if (gdk_cursor_get_name (cursor))
{
struct wl_cursor *c;
int scale_factor;
if (g_str_equal (gdk_cursor_get_name (cursor), "none"))
{
*hotspot_x = *hotspot_y = 0;
*width = *height = 0;
*scale = 1;
return NULL;
}
scale_factor = (int) ceil (desired_scale);
goto none;
c = gdk_wayland_cursor_load_for_name (display,
display->cursor_theme,
scale_factor,
_gdk_wayland_display_get_cursor_theme (display),
desired_scale_factor,
gdk_cursor_get_name (cursor));
if (c && c->image_count > 0)
{
struct wl_cursor_image *image;
int cursor_scale;
if (image_index >= c->image_count)
{
@@ -199,23 +195,23 @@ _gdk_wayland_cursor_get_buffer (GdkWaylandDisplay *display,
image = c->images[image_index];
*width = display->cursor_theme_size;
*height = display->cursor_theme_size;
*scale = image->width / (double) *width;
*hotspot_x = image->hotspot_x / scale_factor;
*hotspot_y = image->hotspot_y / scale_factor;
if (*scale != scale_factor && !use_viewporter)
cursor_scale = desired_scale_factor;
if ((image->width % cursor_scale != 0) ||
(image->height % cursor_scale != 0))
{
g_warning (G_STRLOC " cursor image size (%d) not an integer "
"multiple of theme size (%d)", image->width, *width);
*width = image->width;
*height = image->height;
*hotspot_x = image->hotspot_x;
*hotspot_y = image->hotspot_y;
*scale = 1;
g_warning (G_STRLOC " cursor image size (%dx%d) not an integer "
"multiple of scale (%d)", image->width, image->height,
cursor_scale);
cursor_scale = 1;
}
*hotspot_x = image->hotspot_x / cursor_scale;
*hotspot_y = image->hotspot_y / cursor_scale;
*width = image->width / cursor_scale;
*height = image->height / cursor_scale;
*scale = cursor_scale;
return wl_cursor_image_get_buffer (image);
}
}
@@ -261,7 +257,7 @@ from_texture:
else
{
if (!use_viewporter)
*scale = ceil (desired_scale);
*scale = desired_scale_factor;
else
*scale = desired_scale;
@@ -298,23 +294,28 @@ from_texture:
}
if (gdk_cursor_get_fallback (cursor))
{
return _gdk_wayland_cursor_get_buffer (display,
gdk_cursor_get_fallback (cursor),
desired_scale,
use_viewporter,
image_index,
hotspot_x, hotspot_y,
width, height,
scale);
}
return _gdk_wayland_cursor_get_buffer (display,
gdk_cursor_get_fallback (cursor),
desired_scale,
use_viewporter,
image_index,
hotspot_x, hotspot_y,
width, height,
scale);
else
{
texture = gdk_texture_new_from_resource ("/org/gtk/libgdk/cursor/default");
goto from_texture;
}
g_assert_not_reached ();
none:
*hotspot_x = 0;
*hotspot_y = 0;
*width = 0;
*height = 0;
*scale = 1;
return NULL;
}
guint

View File

@@ -1776,6 +1776,11 @@ _gdk_x11_display_is_root_window (GdkDisplay *display,
return GDK_SCREEN_XROOTWIN (display_x11->screen) == xroot_window;
}
struct XPointerUngrabInfo {
GdkDisplay *display;
guint32 time;
};
static void
device_grab_update_callback (GdkDisplay *display,
gpointer data,

View File

@@ -6397,10 +6397,6 @@ gsk_mask_node_draw (GskRenderNode *node,
graphene_matrix_t color_matrix;
graphene_vec4_t color_offset;
/* clip so the push_group() creates a smaller surface */
gsk_cairo_rectangle (cr, &node->bounds);
cairo_clip (cr);
if (has_empty_clip (cr))
return;

View File

@@ -530,15 +530,6 @@ handle_accessible_method (GDBusConnection *connection,
g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{ss}"));
g_variant_builder_add (&builder, "{ss}", "toolkit", "GTK");
if (gtk_at_context_has_accessible_property (GTK_AT_CONTEXT (self), GTK_ACCESSIBLE_PROPERTY_LEVEL))
{
GtkAccessibleValue *value = gtk_at_context_get_accessible_property (GTK_AT_CONTEXT (self),
GTK_ACCESSIBLE_PROPERTY_LEVEL);
char *level = g_strdup_printf ("%d", gtk_int_accessible_value_get (value));
g_variant_builder_add (&builder, "{ss}", "level", level);
g_free (level);
}
if (gtk_at_context_has_accessible_property (GTK_AT_CONTEXT (self), GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER))
{
GtkAccessibleValue *value;
@@ -1266,13 +1257,10 @@ gtk_at_spi_context_child_change (GtkATContext *ctx,
}
if (change & GTK_ACCESSIBLE_CHILD_CHANGE_ADDED)
{
gtk_at_context_realize (child_context);
emit_children_changed (self,
GTK_AT_SPI_CONTEXT (child_context),
idx,
GTK_ACCESSIBLE_CHILD_STATE_ADDED);
}
else if (change & GTK_ACCESSIBLE_CHILD_CHANGE_REMOVED)
emit_children_changed (self,
GTK_AT_SPI_CONTEXT (child_context),

View File

@@ -49,7 +49,7 @@ struct _GtkCssParserBlock
#define GDK_ARRAY_NAME gtk_css_parser_blocks
#define GDK_ARRAY_TYPE_NAME GtkCssParserBlocks
#define GDK_ARRAY_ELEMENT_TYPE GtkCssParserBlock
#define GDK_ARRAY_PREALLOC 12
#define GDK_ARRAY_PREALLOC 32
#define GDK_ARRAY_NO_MEMSET 1
#include "gdk/gdkarrayimpl.c"

View File

@@ -2188,8 +2188,7 @@ gtk_column_view_set_header_factory (GtkColumnView *self,
/**
* gtk_column_view_scroll_to:
* @self: The columnview to scroll in
* @pos: position of the item. Must be less than the number of
* items in the view.
* @pos: position of the item
* @column: (nullable) (transfer none): The column to scroll to
* or %NULL to not scroll columns.
* @flags: actions to perform
@@ -2212,7 +2211,6 @@ gtk_column_view_scroll_to (GtkColumnView *self,
GtkScrollInfo *scroll)
{
g_return_if_fail (GTK_IS_COLUMN_VIEW (self));
g_return_if_fail (pos < gtk_list_base_get_n_items (GTK_LIST_BASE (self)));
g_return_if_fail (column == NULL || GTK_IS_COLUMN_VIEW_COLUMN (column));
if (column)
{

View File

@@ -44,8 +44,7 @@ G_DEFINE_TYPE (GtkCssAnimatedStyle, gtk_css_animated_style, GTK_TYPE_CSS_STYLE)
#define DEFINE_VALUES(ENUM, TYPE, NAME) \
static inline void \
gtk_css_ ## NAME ## _values_recompute (GtkCssAnimatedStyle *animated, \
GtkCssComputeContext *context) \
gtk_css_ ## NAME ## _values_recompute (GtkCssAnimatedStyle *animated) \
{ \
GtkCssStyle *style = (GtkCssStyle *)animated; \
GtkCssValue **values = (GtkCssValue **)((guint8*)(animated->style->NAME) + sizeof (GtkCssValues)); \
@@ -65,7 +64,10 @@ gtk_css_ ## NAME ## _values_recompute (GtkCssAnimatedStyle *animated, \
\
computed = _gtk_css_value_compute (original, \
id, \
context); \
animated->provider, \
style, \
animated->parent_style, \
NULL); \
if (computed == NULL) \
continue; \
\
@@ -609,7 +611,6 @@ gtk_css_animated_style_set_animated_custom_value (GtkCssAnimatedStyle *animated,
GtkCssVariableValue *value)
{
GtkCssStyle *style = (GtkCssStyle *)animated;
GtkCssComputeContext context = { NULL, };
gtk_internal_return_if_fail (GTK_IS_CSS_ANIMATED_STYLE (style));
gtk_internal_return_if_fail (value != NULL);
@@ -629,22 +630,17 @@ gtk_css_animated_style_set_animated_custom_value (GtkCssAnimatedStyle *animated,
gtk_css_variable_set_add (style->variables, id, value);
context.provider = animated->provider;
context.style = animated->style;
context.parent_style = animated->parent_style;
context.provider = animated->provider;
gtk_css_core_values_recompute (animated, &context);
gtk_css_background_values_recompute (animated, &context);
gtk_css_border_values_recompute (animated, &context);
gtk_css_icon_values_recompute (animated, &context);
gtk_css_outline_values_recompute (animated, &context);
gtk_css_font_values_recompute (animated, &context);
gtk_css_font_variant_values_recompute (animated, &context);
gtk_css_animation_values_recompute (animated, &context);
gtk_css_transition_values_recompute (animated, &context);
gtk_css_size_values_recompute (animated, &context);
gtk_css_other_values_recompute (animated, &context);
gtk_css_core_values_recompute (animated);
gtk_css_background_values_recompute (animated);
gtk_css_border_values_recompute (animated);
gtk_css_icon_values_recompute (animated);
gtk_css_outline_values_recompute (animated);
gtk_css_font_values_recompute (animated);
gtk_css_font_variant_values_recompute (animated);
gtk_css_animation_values_recompute (animated);
gtk_css_transition_values_recompute (animated);
gtk_css_size_values_recompute (animated);
gtk_css_other_values_recompute (animated);
}
GtkCssVariableValue *

View File

@@ -41,9 +41,12 @@ gtk_css_value_array_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_array_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_array_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *result;
GtkCssValue *i_value;
@@ -52,7 +55,7 @@ gtk_css_value_array_compute (GtkCssValue *value,
result = NULL;
for (i = 0; i < value->n_values; i++)
{
i_value = _gtk_css_value_compute (value->values[i], property_id, context);
i_value = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style, variables);
if (result == NULL &&
i_value != value->values[i])

View File

@@ -41,9 +41,12 @@ gtk_css_value_bg_size_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_bg_size_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_bg_size_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *x, *y;
@@ -53,10 +56,10 @@ gtk_css_value_bg_size_compute (GtkCssValue *value,
x = y = NULL;
if (value->x)
x = _gtk_css_value_compute (value->x, property_id, context);
x = _gtk_css_value_compute (value->x, property_id, provider, style, parent_style, variables);
if (value->y)
y = _gtk_css_value_compute (value->y, property_id, context);
y = _gtk_css_value_compute (value->y, property_id, provider, style, parent_style, variables);
if (x == value->x && y == value->y)
{

View File

@@ -42,9 +42,12 @@ gtk_css_value_border_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_border_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_border_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *values[4];
GtkCssValue *computed;
@@ -55,7 +58,7 @@ gtk_css_value_border_compute (GtkCssValue *value,
{
if (value->values[i])
{
values[i] = _gtk_css_value_compute (value->values[i], property_id, context);
values[i] = _gtk_css_value_compute (value->values[i], property_id, provider, style, parent_style, variables);
changed |= (values[i] != value->values[i]);
}
else

View File

@@ -94,8 +94,11 @@ gtk_css_value_color_free (GtkCssValue *color)
}
static GtkCssValue *
gtk_css_value_color_get_fallback (guint property_id,
GtkCssComputeContext *context)
gtk_css_value_color_get_fallback (guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
switch (property_id)
{
@@ -116,9 +119,12 @@ gtk_css_value_color_get_fallback (guint property_id,
case GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR:
return _gtk_css_value_compute (_gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (property_id)),
property_id,
context);
provider,
style,
parent_style,
variables);
case GTK_CSS_PROPERTY_ICON_PALETTE:
return _gtk_css_value_ref (context->style->core->color);
return _gtk_css_value_ref (style->core->color);
default:
if (property_id < GTK_CSS_PROPERTY_N_PROPERTIES)
g_warning ("No fallback color defined for property '%s'",
@@ -128,9 +134,12 @@ gtk_css_value_color_get_fallback (guint property_id,
}
static GtkCssValue *
gtk_css_value_color_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_color_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *resolved;
@@ -142,13 +151,13 @@ gtk_css_value_color_compute (GtkCssValue *value,
{
GtkCssValue *current;
if (context->parent_style)
current = context->parent_style->core->color;
if (parent_style)
current = parent_style->core->color;
else
current = NULL;
resolved = _gtk_css_color_value_resolve (value,
context->provider,
provider,
current,
NULL);
}
@@ -158,16 +167,16 @@ gtk_css_value_color_compute (GtkCssValue *value,
}
else
{
GtkCssValue *current = context->style->core->color;
GtkCssValue *current = style->core->color;
resolved = _gtk_css_color_value_resolve (value,
context->provider,
provider,
current,
NULL);
}
if (resolved == NULL)
return gtk_css_value_color_get_fallback (property_id, context);
return gtk_css_value_color_get_fallback (property_id, provider, style, parent_style, variables);
return resolved;
}

View File

@@ -37,14 +37,17 @@ gtk_css_value_corner_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_corner_compute (GtkCssValue *corner,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_corner_compute (GtkCssValue *corner,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *x, *y;
x = _gtk_css_value_compute (corner->x, property_id, context);
y = _gtk_css_value_compute (corner->y, property_id, context);
x = _gtk_css_value_compute (corner->x, property_id, provider, style, parent_style, variables);
y = _gtk_css_value_compute (corner->y, property_id, provider, style, parent_style, variables);
if (x == corner->x && y == corner->y)
{
_gtk_css_value_unref (x);

View File

@@ -50,9 +50,12 @@ gtk_css_value_ease_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_ease_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_ease_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
return _gtk_css_value_ref (value);
}

View File

@@ -41,9 +41,12 @@ gtk_css_value_enum_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_enum_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_enum_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
return _gtk_css_value_ref (value);
}
@@ -227,14 +230,13 @@ gtk_css_font_size_get_default_px (GtkStyleProvider *provider,
}
static GtkCssValue *
gtk_css_value_font_size_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_font_size_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkStyleProvider *provider = context->provider;
GtkCssStyle *style = context->style;
GtkCssStyle *parent_style = context->parent_style;
double font_size;
switch (value->value)
@@ -396,9 +398,12 @@ _gtk_css_font_style_value_get (const GtkCssValue *value)
#define LIGHTER -2
static GtkCssValue *
gtk_css_value_font_weight_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_font_weight_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
PangoWeight new_weight;
int parent_value;
@@ -406,8 +411,8 @@ gtk_css_value_font_weight_compute (GtkCssValue *value,
if (value->value >= 0)
return _gtk_css_value_ref (value);
if (context->parent_style)
parent_value = _gtk_css_number_value_get (context->parent_style->font->font_weight, 100);
if (parent_style)
parent_value = _gtk_css_number_value_get (parent_style->font->font_weight, 100);
else
parent_value = 400;

View File

@@ -307,53 +307,56 @@ gtk_css_value_filter_free (GtkCssValue *value)
/* returns TRUE if dest == src */
static gboolean
gtk_css_filter_compute (GtkCssFilter *dest,
GtkCssFilter *src,
guint property_id,
GtkCssComputeContext *context)
gtk_css_filter_compute (GtkCssFilter *dest,
GtkCssFilter *src,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
dest->type = src->type;
switch (src->type)
{
case GTK_CSS_FILTER_BRIGHTNESS:
dest->brightness.value = _gtk_css_value_compute (src->brightness.value, property_id, context);
dest->brightness.value = _gtk_css_value_compute (src->brightness.value, property_id, provider, style, parent_style, variables);
return dest->brightness.value == src->brightness.value;
case GTK_CSS_FILTER_CONTRAST:
dest->contrast.value = _gtk_css_value_compute (src->contrast.value, property_id, context);
dest->contrast.value = _gtk_css_value_compute (src->contrast.value, property_id, provider, style, parent_style, variables);
return dest->contrast.value == src->contrast.value;
case GTK_CSS_FILTER_GRAYSCALE:
dest->grayscale.value = _gtk_css_value_compute (src->grayscale.value, property_id, context);
dest->grayscale.value = _gtk_css_value_compute (src->grayscale.value, property_id, provider, style, parent_style, variables);
return dest->grayscale.value == src->grayscale.value;
case GTK_CSS_FILTER_HUE_ROTATE:
dest->hue_rotate.value = _gtk_css_value_compute (src->hue_rotate.value, property_id, context);
dest->hue_rotate.value = _gtk_css_value_compute (src->hue_rotate.value, property_id, provider, style, parent_style, variables);
return dest->hue_rotate.value == src->hue_rotate.value;
case GTK_CSS_FILTER_INVERT:
dest->invert.value = _gtk_css_value_compute (src->invert.value, property_id, context);
dest->invert.value = _gtk_css_value_compute (src->invert.value, property_id, provider, style, parent_style, variables);
return dest->invert.value == src->invert.value;
case GTK_CSS_FILTER_OPACITY:
dest->opacity.value = _gtk_css_value_compute (src->opacity.value, property_id, context);
dest->opacity.value = _gtk_css_value_compute (src->opacity.value, property_id, provider, style, parent_style, variables);
return dest->opacity.value == src->opacity.value;
case GTK_CSS_FILTER_SATURATE:
dest->saturate.value = _gtk_css_value_compute (src->saturate.value, property_id, context);
dest->saturate.value = _gtk_css_value_compute (src->saturate.value, property_id, provider, style, parent_style, variables);
return dest->saturate.value == src->saturate.value;
case GTK_CSS_FILTER_SEPIA:
dest->sepia.value = _gtk_css_value_compute (src->sepia.value, property_id, context);
dest->sepia.value = _gtk_css_value_compute (src->sepia.value, property_id, provider, style, parent_style, variables);
return dest->sepia.value == src->sepia.value;
case GTK_CSS_FILTER_BLUR:
dest->blur.value = _gtk_css_value_compute (src->blur.value, property_id, context);
dest->blur.value = _gtk_css_value_compute (src->blur.value, property_id, provider, style, parent_style, variables);
return dest->blur.value == src->blur.value;
case GTK_CSS_FILTER_DROP_SHADOW:
dest->drop_shadow.value = _gtk_css_value_compute (src->drop_shadow.value, property_id, context);
dest->drop_shadow.value = _gtk_css_value_compute (src->drop_shadow.value, property_id, provider, style, parent_style, variables);
return dest->drop_shadow.value == src->drop_shadow.value;
case GTK_CSS_FILTER_NONE:
@@ -364,9 +367,12 @@ gtk_css_filter_compute (GtkCssFilter *dest,
}
static GtkCssValue *
gtk_css_value_filter_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_filter_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *result;
gboolean changes;
@@ -384,7 +390,10 @@ gtk_css_value_filter_compute (GtkCssValue *value,
changes |= !gtk_css_filter_compute (&result->filters[i],
&value->filters[i],
property_id,
context);
provider,
style,
parent_style,
variables);
}
if (!changes)

View File

@@ -53,9 +53,12 @@ gtk_css_value_font_features_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_font_features_compute (GtkCssValue *specified,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_font_features_compute (GtkCssValue *specified,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
return _gtk_css_value_ref (specified);
}

View File

@@ -52,9 +52,12 @@ gtk_css_value_font_variations_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_font_variations_compute (GtkCssValue *specified,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_font_variations_compute (GtkCssValue *specified,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
return _gtk_css_value_ref (specified);
}

View File

@@ -65,9 +65,12 @@ gtk_css_image_real_get_aspect_ratio (GtkCssImage *image)
}
static GtkCssImage *
gtk_css_image_real_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_real_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
return g_object_ref (image);
}
@@ -171,19 +174,22 @@ _gtk_css_image_get_aspect_ratio (GtkCssImage *image)
}
GtkCssImage *
_gtk_css_image_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
_gtk_css_image_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImageClass *klass;
gtk_internal_return_val_if_fail (GTK_IS_CSS_IMAGE (image), NULL);
gtk_internal_return_val_if_fail (GTK_IS_CSS_STYLE (context->style), NULL);
gtk_internal_return_val_if_fail (context->parent_style == NULL || GTK_IS_CSS_STYLE (context->parent_style), NULL);
gtk_internal_return_val_if_fail (GTK_IS_CSS_STYLE (style), NULL);
gtk_internal_return_val_if_fail (parent_style == NULL || GTK_IS_CSS_STYLE (parent_style), NULL);
klass = GTK_CSS_IMAGE_GET_CLASS (image);
return klass->compute (image, property_id, context);
return klass->compute (image, property_id, provider, style, parent_style, variables);
}
GtkCssImage *

View File

@@ -313,9 +313,12 @@ gtk_css_image_conic_print (GtkCssImage *image,
}
static GtkCssImage *
gtk_css_image_conic_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_conic_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImageConic *self = GTK_CSS_IMAGE_CONIC (image);
GtkCssImageConic *copy;
@@ -323,8 +326,8 @@ gtk_css_image_conic_compute (GtkCssImage *image,
copy = g_object_new (GTK_TYPE_CSS_IMAGE_CONIC, NULL);
copy->center = _gtk_css_value_compute (self->center, property_id, context);
copy->rotation = _gtk_css_value_compute (self->rotation, property_id, context);
copy->center = _gtk_css_value_compute (self->center, property_id, provider, style, parent_style, variables);
copy->rotation = _gtk_css_value_compute (self->rotation, property_id, provider, style, parent_style, variables);
copy->n_stops = self->n_stops;
copy->color_stops = g_malloc (sizeof (GtkCssImageConicColorStop) * copy->n_stops);
@@ -333,11 +336,11 @@ gtk_css_image_conic_compute (GtkCssImage *image,
const GtkCssImageConicColorStop *stop = &self->color_stops[i];
GtkCssImageConicColorStop *scopy = &copy->color_stops[i];
scopy->color = _gtk_css_value_compute (stop->color, property_id, context);
scopy->color = _gtk_css_value_compute (stop->color, property_id, provider, style, parent_style, variables);
if (stop->offset)
{
scopy->offset = _gtk_css_value_compute (stop->offset, property_id, context);
scopy->offset = _gtk_css_value_compute (stop->offset, property_id, provider, style, parent_style, variables);
}
else
{

View File

@@ -399,9 +399,12 @@ gtk_css_image_cross_fade_print (GtkCssImage *image,
}
static GtkCssImage *
gtk_css_image_cross_fade_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_cross_fade_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImageCrossFade *self = GTK_CSS_IMAGE_CROSS_FADE (image);
GtkCssImageCrossFade *result;
@@ -416,7 +419,7 @@ gtk_css_image_cross_fade_compute (GtkCssImage *image,
gtk_css_image_cross_fade_add (result,
entry->has_progress,
entry->progress,
_gtk_css_image_compute (entry->image, property_id, context));
_gtk_css_image_compute (entry->image, property_id, provider, style, parent_style, variables));
}
return GTK_CSS_IMAGE (result);

View File

@@ -133,9 +133,12 @@ gtk_css_image_fallback_dispose (GObject *object)
static GtkCssImage *
gtk_css_image_fallback_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_fallback_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImageFallback *fallback = GTK_CSS_IMAGE_FALLBACK (image);
GtkCssImageFallback *copy;
@@ -148,7 +151,10 @@ gtk_css_image_fallback_compute (GtkCssImage *image,
if (fallback->color)
computed_color = _gtk_css_value_compute (fallback->color,
property_id,
context);
provider,
style,
parent_style,
variables);
/* image($color) that didn't change */
if (computed_color && !fallback->images &&
@@ -162,7 +168,10 @@ gtk_css_image_fallback_compute (GtkCssImage *image,
{
copy->images[i] = _gtk_css_image_compute (fallback->images[i],
property_id,
context);
provider,
style,
parent_style,
variables);
if (gtk_css_image_is_invalid (copy->images[i]))
continue;

View File

@@ -138,9 +138,12 @@ gtk_css_image_icon_theme_print (GtkCssImage *image,
}
static GtkCssImage *
gtk_css_image_icon_theme_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_icon_theme_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImageIconTheme *icon_theme = GTK_CSS_IMAGE_ICON_THEME (image);
GtkCssImageIconTheme *copy;
@@ -149,12 +152,12 @@ gtk_css_image_icon_theme_compute (GtkCssImage *image,
copy = g_object_new (GTK_TYPE_CSS_IMAGE_ICON_THEME, NULL);
copy->name = g_strdup (icon_theme->name);
settings = gtk_style_provider_get_settings (context->provider);
settings = gtk_style_provider_get_settings (provider);
display = _gtk_settings_get_display (settings);
copy->icon_theme = gtk_icon_theme_get_for_display (display);
copy->serial = gtk_icon_theme_get_serial (copy->icon_theme);
copy->scale = gtk_style_provider_get_scale (context->provider);
gtk_css_style_lookup_symbolic_colors (context->style, copy->colors);
copy->scale = gtk_style_provider_get_scale (provider);
gtk_css_style_lookup_symbolic_colors (style, copy->colors);
return GTK_CSS_IMAGE (copy);
}

View File

@@ -488,9 +488,12 @@ gtk_css_image_linear_print (GtkCssImage *image,
}
static GtkCssImage *
gtk_css_image_linear_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_linear_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImageLinear *linear = GTK_CSS_IMAGE_LINEAR (image);
GtkCssImageLinear *copy;
@@ -501,7 +504,7 @@ gtk_css_image_linear_compute (GtkCssImage *image,
copy->side = linear->side;
if (linear->angle)
copy->angle = _gtk_css_value_compute (linear->angle, property_id, context);
copy->angle = _gtk_css_value_compute (linear->angle, property_id, provider, style, parent_style, variables);
copy->n_stops = linear->n_stops;
copy->color_stops = g_malloc (sizeof (GtkCssImageLinearColorStop) * copy->n_stops);
@@ -510,11 +513,11 @@ gtk_css_image_linear_compute (GtkCssImage *image,
const GtkCssImageLinearColorStop *stop = &linear->color_stops[i];
GtkCssImageLinearColorStop *scopy = &copy->color_stops[i];
scopy->color = _gtk_css_value_compute (stop->color, property_id, context);
scopy->color = _gtk_css_value_compute (stop->color, property_id, provider, style, parent_style, variables);
if (stop->offset)
{
scopy->offset = _gtk_css_value_compute (stop->offset, property_id, context);
scopy->offset = _gtk_css_value_compute (stop->offset, property_id, provider, style, parent_style, variables);
}
else
{

View File

@@ -20,7 +20,6 @@
#include "config.h"
#include "gtkcssimagepaintableprivate.h"
#include "gtkcssvalueprivate.h"
#include "gtkprivate.h"
@@ -97,9 +96,12 @@ gtk_css_image_paintable_get_static_image (GtkCssImage *image)
}
static GtkCssImage *
gtk_css_image_paintable_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_paintable_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
return gtk_css_image_paintable_get_static_image (image);
}

View File

@@ -27,7 +27,6 @@
#include "gtk/css/gtkcssparserprivate.h"
#include "gtk/gtkcsstypesprivate.h"
#include "gtk/gtkcssvariablesetprivate.h"
#include "gtk/gtkcssvalueprivate.h"
#include "gtk/gtksnapshot.h"
#include "gtk/gtkstyleprovider.h"
@@ -62,7 +61,10 @@ struct _GtkCssImageClass
/* create "computed value" in CSS terms, returns a new reference */
GtkCssImage *(* compute) (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context);
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables);
/* compare two images for equality */
gboolean (* equal) (GtkCssImage *image1,
GtkCssImage *image2);
@@ -104,7 +106,10 @@ double _gtk_css_image_get_aspect_ratio (GtkCssImage *
GtkCssImage * _gtk_css_image_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context);
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables);
gboolean _gtk_css_image_equal (GtkCssImage *image1,
GtkCssImage *image2) G_GNUC_PURE;
GtkCssImage * _gtk_css_image_transition (GtkCssImage *start,

View File

@@ -489,9 +489,12 @@ gtk_css_image_radial_print (GtkCssImage *image,
}
static GtkCssImage *
gtk_css_image_radial_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_radial_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImageRadial *radial = GTK_CSS_IMAGE_RADIAL (image);
GtkCssImageRadial *copy;
@@ -502,13 +505,13 @@ gtk_css_image_radial_compute (GtkCssImage *image,
copy->circle = radial->circle;
copy->size = radial->size;
copy->position = _gtk_css_value_compute (radial->position, property_id, context);
copy->position = _gtk_css_value_compute (radial->position, property_id, provider, style, parent_style, variables);
if (radial->sizes[0])
copy->sizes[0] = _gtk_css_value_compute (radial->sizes[0], property_id, context);
copy->sizes[0] = _gtk_css_value_compute (radial->sizes[0], property_id, provider, style, parent_style, variables);
if (radial->sizes[1])
copy->sizes[1] = _gtk_css_value_compute (radial->sizes[1], property_id, context);
copy->sizes[1] = _gtk_css_value_compute (radial->sizes[1], property_id, provider, style, parent_style, variables);
copy->n_stops = radial->n_stops;
copy->color_stops = g_malloc (sizeof (GtkCssImageRadialColorStop) * copy->n_stops);
@@ -517,11 +520,11 @@ gtk_css_image_radial_compute (GtkCssImage *image,
const GtkCssImageRadialColorStop *stop = &radial->color_stops[i];
GtkCssImageRadialColorStop *scopy = &copy->color_stops[i];
scopy->color = _gtk_css_value_compute (stop->color, property_id, context);
scopy->color = _gtk_css_value_compute (stop->color, property_id, provider, style, parent_style, variables);
if (stop->offset)
{
scopy->offset = _gtk_css_value_compute (stop->offset, property_id, context);
scopy->offset = _gtk_css_value_compute (stop->offset, property_id, provider, style, parent_style, variables);
}
else
{

View File

@@ -201,9 +201,12 @@ gtk_css_image_recolor_snapshot (GtkCssImage *image,
}
static GtkCssImage *
gtk_css_image_recolor_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_recolor_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImageRecolor *recolor = GTK_CSS_IMAGE_RECOLOR (image);
GtkCssValue *palette;
@@ -211,19 +214,19 @@ gtk_css_image_recolor_compute (GtkCssImage *image,
int scale;
GError *error = NULL;
scale = gtk_style_provider_get_scale (context->provider);
scale = gtk_style_provider_get_scale (provider);
if (recolor->palette)
palette = _gtk_css_value_compute (recolor->palette, property_id, context);
palette = _gtk_css_value_compute (recolor->palette, property_id, provider, style, parent_style, variables);
else
palette = _gtk_css_value_ref (context->style->core->icon_palette);
palette = _gtk_css_value_ref (style->core->icon_palette);
img = gtk_css_image_recolor_load (recolor, context->style, palette, scale, &error);
img = gtk_css_image_recolor_load (recolor, style, palette, scale, &error);
if (error)
{
GtkCssSection *section = gtk_css_style_get_section (context->style, property_id);
gtk_style_provider_emit_error (context->provider, section, error);
GtkCssSection *section = gtk_css_style_get_section (style, property_id);
gtk_style_provider_emit_error (provider, section, error);
g_error_free (error);
}

View File

@@ -97,9 +97,12 @@ gtk_css_image_scaled_dispose (GObject *object)
static GtkCssImage *
gtk_css_image_scaled_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_scaled_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImageScaled *scaled = GTK_CSS_IMAGE_SCALED (image);
int scale;
@@ -107,7 +110,7 @@ gtk_css_image_scaled_compute (GtkCssImage *image,
int i;
int best;
scale = gtk_style_provider_get_scale (context->provider);
scale = gtk_style_provider_get_scale (provider);
scale = MAX(scale, 1);
best = 0;
@@ -133,7 +136,10 @@ gtk_css_image_scaled_compute (GtkCssImage *image,
res->images[0] = _gtk_css_image_compute (scaled->images[best],
property_id,
context);
provider,
style,
parent_style,
variables);
res->scales[0] = scaled->scales[best];
return GTK_CSS_IMAGE (res);

View File

@@ -112,9 +112,12 @@ gtk_css_image_url_snapshot (GtkCssImage *image,
}
static GtkCssImage *
gtk_css_image_url_compute (GtkCssImage *image,
guint property_id,
GtkCssComputeContext *context)
gtk_css_image_url_compute (GtkCssImage *image,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImageUrl *url = GTK_CSS_IMAGE_URL (image);
GtkCssImage *copy;
@@ -123,8 +126,8 @@ gtk_css_image_url_compute (GtkCssImage *image,
copy = gtk_css_image_url_load_image (url, &error);
if (error)
{
GtkCssSection *section = gtk_css_style_get_section (context->style, property_id);
gtk_style_provider_emit_error (context->provider, section, error);
GtkCssSection *section = gtk_css_style_get_section (style, property_id);
gtk_style_provider_emit_error (provider, section, error);
g_error_free (error);
}

View File

@@ -34,9 +34,12 @@ gtk_css_value_image_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_image_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_image_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssImage *image, *computed;
@@ -45,7 +48,7 @@ gtk_css_value_image_compute (GtkCssValue *value,
if (image == NULL)
return _gtk_css_value_ref (value);
computed = _gtk_css_image_compute (image, property_id, context);
computed = _gtk_css_image_compute (image, property_id, provider, style, parent_style, variables);
if (computed == image)
{

View File

@@ -34,19 +34,25 @@ gtk_css_value_inherit_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_inherit_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_inherit_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
if (context->parent_style)
if (parent_style)
{
return _gtk_css_value_ref (gtk_css_style_get_value (context->parent_style, property_id));
return _gtk_css_value_ref (gtk_css_style_get_value (parent_style, property_id));
}
else
{
return _gtk_css_value_compute (_gtk_css_initial_value_get (),
property_id,
context);
provider,
style,
parent_style,
variables);
}
}

View File

@@ -38,16 +38,19 @@ gtk_css_value_initial_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_initial_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_initial_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkSettings *settings;
switch (property_id)
{
case GTK_CSS_PROPERTY_DPI:
settings = gtk_style_provider_get_settings (context->provider);
settings = gtk_style_provider_get_settings (provider);
if (settings)
{
int dpi_int;
@@ -60,7 +63,7 @@ gtk_css_value_initial_compute (GtkCssValue *value,
break;
case GTK_CSS_PROPERTY_FONT_FAMILY:
settings = gtk_style_provider_get_settings (context->provider);
settings = gtk_style_provider_get_settings (provider);
if (settings && gtk_settings_get_font_family (settings) != NULL)
return _gtk_css_array_value_new (_gtk_css_string_value_new (gtk_settings_get_font_family (settings)));
break;
@@ -71,7 +74,10 @@ gtk_css_value_initial_compute (GtkCssValue *value,
return _gtk_css_value_compute (_gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (property_id)),
property_id,
context);
provider,
style,
parent_style,
variables);
}
static gboolean
@@ -122,10 +128,15 @@ _gtk_css_initial_value_get (void)
return &initial;
}
GtkCssValue *
_gtk_css_initial_value_new_compute (guint property_id,
GtkCssComputeContext *context)
_gtk_css_initial_value_new_compute (guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style)
{
return gtk_css_value_initial_compute (NULL,
property_id,
context);
provider,
style,
parent_style,
NULL);
}

View File

@@ -25,8 +25,10 @@ G_BEGIN_DECLS
GtkCssValue * _gtk_css_initial_value_new (void);
GtkCssValue * _gtk_css_initial_value_get (void);
GtkCssValue * _gtk_css_initial_value_new_compute (guint property_id,
GtkCssComputeContext *context);
GtkCssValue * _gtk_css_initial_value_new_compute (guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style);
G_END_DECLS

View File

@@ -615,7 +615,6 @@ _gtk_css_keyframes_compute (GtkCssKeyframes *keyframes,
GtkCssStyle *style,
GtkCssStyle *parent_style)
{
GtkCssComputeContext context = { NULL, };
GtkCssKeyframes *resolved;
guint k, p;
@@ -631,10 +630,6 @@ _gtk_css_keyframes_compute (GtkCssKeyframes *keyframes,
resolved->property_ids = g_memdup2 (keyframes->property_ids, keyframes->n_properties * sizeof (guint));
resolved->values = g_new0 (GtkCssValue *, resolved->n_keyframes * resolved->n_properties);
context.provider = provider;
context.style = style;
context.parent_style = parent_style;
for (p = 0; p < resolved->n_properties; p++)
{
for (k = 0; k < resolved->n_keyframes; k++)
@@ -642,11 +637,12 @@ _gtk_css_keyframes_compute (GtkCssKeyframes *keyframes,
if (KEYFRAMES_VALUE (keyframes, k, p) == NULL)
continue;
context.variables = keyframes->variables ? keyframes->variables[k] : NULL;
KEYFRAMES_VALUE (resolved, k, p) = _gtk_css_value_compute (KEYFRAMES_VALUE (keyframes, k, p),
resolved->property_ids[p],
&context);
provider,
style,
parent_style,
keyframes->variables ? keyframes->variables[k] : NULL);
}
}

View File

@@ -39,13 +39,16 @@ gtk_css_value_line_height_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_line_height_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_line_height_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *height;
height = _gtk_css_value_compute (value->height, property_id, context);
height = _gtk_css_value_compute (value->height, property_id, provider, style, parent_style, variables);
if (gtk_css_number_value_get_dimension (height) == GTK_CSS_DIMENSION_PERCENTAGE)
{
@@ -53,7 +56,7 @@ gtk_css_value_line_height_compute (GtkCssValue *value,
GtkCssValue *computed;
factor = _gtk_css_number_value_get (height, 1);
computed = gtk_css_number_value_multiply (context->style->core->font_size, factor);
computed = gtk_css_number_value_multiply (style->core->font_size, factor);
_gtk_css_value_unref (height);

View File

@@ -108,13 +108,13 @@ get_base_font_size_px (guint property_id,
}
static GtkCssValue *
gtk_css_value_number_compute (GtkCssValue *number,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_number_compute (GtkCssValue *number,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkStyleProvider *provider = context->provider;
GtkCssStyle *style = context->style;
GtkCssStyle *parent_style = context->parent_style;
double value;
if (G_UNLIKELY (number->type == TYPE_CALC))
@@ -130,8 +130,9 @@ gtk_css_value_number_compute (GtkCssValue *number,
for (i = 0; i < n_terms; i++)
{
GtkCssValue *computed = _gtk_css_value_compute (number->calc.terms[i],
property_id,
context);
property_id, provider, style,
parent_style,
variables);
changed |= computed != number->calc.terms[i];
new_values[i] = computed;
}

View File

@@ -103,9 +103,12 @@ gtk_css_value_palette_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_palette_compute (GtkCssValue *specified,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_palette_compute (GtkCssValue *specified,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *computed_color;
GtkCssValue *result;
@@ -118,7 +121,7 @@ gtk_css_value_palette_compute (GtkCssValue *specified,
{
GtkCssValue *value = specified->color_values[i];
computed_color = _gtk_css_value_compute (value, property_id, context);
computed_color = _gtk_css_value_compute (value, property_id, provider, style, parent_style, variables);
result->color_names[i] = g_strdup (specified->color_names[i]);
result->color_values[i] = computed_color;

View File

@@ -36,14 +36,17 @@ gtk_css_value_position_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_position_compute (GtkCssValue *position,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_position_compute (GtkCssValue *position,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *x, *y;
x = _gtk_css_value_compute (position->x, property_id, context);
y = _gtk_css_value_compute (position->y, property_id, context);
x = _gtk_css_value_compute (position->x, property_id, provider, style, parent_style, variables);
y = _gtk_css_value_compute (position->y, property_id, provider, style, parent_style, variables);
if (x == position->x && y == position->y)
{
_gtk_css_value_unref (x);

View File

@@ -245,27 +245,19 @@ parser_error (GtkCssParser *parser,
}
static GtkCssValue *
gtk_css_value_reference_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_reference_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *result = NULL, *computed;
GtkCssRefs refs;
guint shorthand_id = G_MAXUINT;
if (GTK_IS_CSS_SHORTHAND_PROPERTY (value->property))
{
shorthand_id = _gtk_css_shorthand_property_get_id (GTK_CSS_SHORTHAND_PROPERTY (value->property));
if (context->shorthands && context->shorthands[shorthand_id])
{
result = gtk_css_value_ref (context->shorthands[shorthand_id]);
goto pick_subproperty;
}
}
gtk_css_refs_init (&refs);
resolve_references (value->value, property_id, context->style, context->variables, &refs);
resolve_references (value->value, property_id, style, variables, &refs);
if (gtk_css_refs_get_size (&refs) > 0)
{
@@ -276,8 +268,7 @@ gtk_css_value_reference_compute (GtkCssValue *value,
value->file,
(GtkCssVariableValue **) refs.start,
gtk_css_refs_get_size (&refs),
parser_error, context->provider,
NULL);
parser_error, provider, NULL);
result = _gtk_style_property_parse_value (value->property, value_parser);
token = gtk_css_parser_peek_token (value_parser);
@@ -301,23 +292,19 @@ gtk_css_value_reference_compute (GtkCssValue *value,
if (result == NULL)
result = _gtk_css_unset_value_new ();
if (shorthand_id != G_MAXUINT)
if (GTK_IS_CSS_SHORTHAND_PROPERTY (value->property))
{
GtkCssValue *sub;
if (context->shorthands)
{
g_assert (context->shorthands[shorthand_id] == NULL);
context->shorthands[shorthand_id] = gtk_css_value_ref (result);
}
pick_subproperty:
sub = gtk_css_value_ref (_gtk_css_array_value_get_nth (result, value->subproperty));
GtkCssValue *sub = gtk_css_value_ref (_gtk_css_array_value_get_nth (result, value->subproperty));
gtk_css_value_unref (result);
result = sub;
}
computed = _gtk_css_value_compute (result, property_id, context);
computed = _gtk_css_value_compute (result,
property_id,
provider,
style,
parent_style,
variables);
computed->is_computed = TRUE;
gtk_css_value_unref (result);

View File

@@ -34,9 +34,12 @@ gtk_css_value_repeat_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_repeat_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_repeat_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
return _gtk_css_value_ref (value);
}

View File

@@ -113,9 +113,12 @@ gtk_css_value_shadow_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_shadow_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_shadow_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
guint i;
ShadowValue *shadows;
@@ -126,11 +129,11 @@ gtk_css_value_shadow_compute (GtkCssValue *value,
{
const ShadowValue *shadow = &value->shadows[i];
shadows[i].hoffset = _gtk_css_value_compute (shadow->hoffset, property_id, context);
shadows[i].voffset = _gtk_css_value_compute (shadow->voffset, property_id, context);
shadows[i].radius = _gtk_css_value_compute (shadow->radius, property_id, context);
shadows[i].spread = _gtk_css_value_compute (shadow->spread, property_id, context),
shadows[i].color = _gtk_css_value_compute (shadow->color, property_id, context);
shadows[i].hoffset = _gtk_css_value_compute (shadow->hoffset, property_id, provider, style, parent_style, variables);
shadows[i].voffset = _gtk_css_value_compute (shadow->voffset, property_id, provider, style, parent_style, variables);
shadows[i].radius = _gtk_css_value_compute (shadow->radius, property_id, provider, style, parent_style, variables);
shadows[i].spread = _gtk_css_value_compute (shadow->spread, property_id, provider, style, parent_style, variables),
shadows[i].color = _gtk_css_value_compute (shadow->color, property_id, provider, style, parent_style, variables);
shadows[i].inset = shadow->inset;
}

View File

@@ -160,14 +160,7 @@ guint
_gtk_css_shorthand_property_get_n_subproperties (GtkCssShorthandProperty *shorthand)
{
g_return_val_if_fail (GTK_IS_CSS_SHORTHAND_PROPERTY (shorthand), 0);
return shorthand->subproperties->len;
}
guint
_gtk_css_shorthand_property_get_id (GtkCssShorthandProperty *shorthand)
{
g_return_val_if_fail (GTK_IS_CSS_SHORTHAND_PROPERTY (shorthand), 0);
return shorthand->id;
}

View File

@@ -1093,7 +1093,6 @@ parse_all (GtkCssShorthandProperty *shorthand,
static void
gtk_css_shorthand_property_register (const char *name,
unsigned int id,
const char **subproperties,
GtkCssShorthandPropertyParseFunc parse_func)
{
@@ -1104,8 +1103,6 @@ gtk_css_shorthand_property_register (const char *name,
"subproperties", subproperties,
NULL);
node->id = id;
node->parse = parse_func;
}
@@ -1161,85 +1158,65 @@ _gtk_css_shorthand_property_init_properties (void)
const char **all_subproperties;
gtk_css_shorthand_property_register ("font",
GTK_CSS_SHORTHAND_PROPERTY_FONT,
font_subproperties,
parse_font);
gtk_css_shorthand_property_register ("margin",
GTK_CSS_SHORTHAND_PROPERTY_MARGIN,
margin_subproperties,
parse_margin);
gtk_css_shorthand_property_register ("padding",
GTK_CSS_SHORTHAND_PROPERTY_PADDING,
padding_subproperties,
parse_padding);
gtk_css_shorthand_property_register ("border-width",
GTK_CSS_SHORTHAND_PROPERTY_BORDER_WIDTH,
border_width_subproperties,
parse_border_width);
gtk_css_shorthand_property_register ("border-radius",
GTK_CSS_SHORTHAND_PROPERTY_BORDER_RADIUS,
border_radius_subproperties,
parse_border_radius);
gtk_css_shorthand_property_register ("border-color",
GTK_CSS_SHORTHAND_PROPERTY_BORDER_COLOR,
border_color_subproperties,
parse_border_color);
gtk_css_shorthand_property_register ("border-style",
GTK_CSS_SHORTHAND_PROPERTY_BORDER_STYLE,
border_style_subproperties,
parse_border_style);
gtk_css_shorthand_property_register ("border-image",
GTK_CSS_SHORTHAND_PROPERTY_BORDER_IMAGE,
border_image_subproperties,
parse_border_image);
gtk_css_shorthand_property_register ("border-top",
GTK_CSS_SHORTHAND_PROPERTY_BORDER_TOP,
border_top_subproperties,
parse_border_side);
gtk_css_shorthand_property_register ("border-right",
GTK_CSS_SHORTHAND_PROPERTY_BORDER_RIGHT,
border_right_subproperties,
parse_border_side);
gtk_css_shorthand_property_register ("border-bottom",
GTK_CSS_SHORTHAND_PROPERTY_BORDER_BOTTOM,
border_bottom_subproperties,
parse_border_side);
gtk_css_shorthand_property_register ("border-left",
GTK_CSS_SHORTHAND_PROPERTY_BORDER_LEFT,
border_left_subproperties,
parse_border_side);
gtk_css_shorthand_property_register ("border",
GTK_CSS_SHORTHAND_PROPERTY_BORDER,
border_subproperties,
parse_border);
gtk_css_shorthand_property_register ("outline",
GTK_CSS_SHORTHAND_PROPERTY_OUTLINE,
outline_subproperties,
parse_border_side);
gtk_css_shorthand_property_register ("background",
GTK_CSS_SHORTHAND_PROPERTY_BACKGROUND,
background_subproperties,
parse_background);
gtk_css_shorthand_property_register ("transition",
GTK_CSS_SHORTHAND_PROPERTY_TRANSITION,
transition_subproperties,
parse_transition);
gtk_css_shorthand_property_register ("animation",
GTK_CSS_SHORTHAND_PROPERTY_ANIMATION,
animation_subproperties,
parse_animation);
gtk_css_shorthand_property_register ("text-decoration",
GTK_CSS_SHORTHAND_PROPERTY_TEXT_DECORATION,
text_decoration_subproperties,
parse_text_decoration);
gtk_css_shorthand_property_register ("font-variant",
GTK_CSS_SHORTHAND_PROPERTY_FONT_VARIANT,
font_variant_subproperties,
parse_font_variant);
all_subproperties = get_all_subproperties ();
gtk_css_shorthand_property_register ("all",
GTK_CSS_SHORTHAND_PROPERTY_ALL,
all_subproperties,
parse_all);
g_free (all_subproperties);

View File

@@ -49,8 +49,6 @@ struct _GtkCssShorthandProperty
GPtrArray *subproperties;
guint id;
GtkCssShorthandPropertyParseFunc parse;
};
@@ -67,8 +65,6 @@ GtkCssStyleProperty * _gtk_css_shorthand_property_get_subproperty (GtkCssS
guint property);
guint _gtk_css_shorthand_property_get_n_subproperties (GtkCssShorthandProperty *shorthand) G_GNUC_CONST;
guint _gtk_css_shorthand_property_get_id (GtkCssShorthandProperty *shorthand) G_GNUC_CONST;
G_END_DECLS

View File

@@ -39,11 +39,12 @@
#include "gtkstyleproviderprivate.h"
#include "gtkcssdimensionvalueprivate.h"
static void gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
guint id,
GtkCssValue *specified,
GtkCssSection *section,
GtkCssComputeContext *context);
static void gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
GtkStyleProvider *provider,
GtkCssStyle *parent_style,
guint id,
GtkCssValue *specified,
GtkCssSection *section);
#define GET_VALUES(v) (GtkCssValue **)((guint8*)(v) + sizeof (GtkCssValues))
@@ -71,9 +72,10 @@ gtk_css_## NAME ## _values_compute_changes_and_affects (GtkCssStyle *style1, \
} \
\
static inline void \
gtk_css_ ## NAME ## _values_new_compute (GtkCssStaticStyle *sstyle, \
GtkCssLookup *lookup, \
GtkCssComputeContext *context) \
gtk_css_ ## NAME ## _values_new_compute (GtkCssStaticStyle *sstyle, \
GtkStyleProvider *provider, \
GtkCssStyle *parent_style, \
GtkCssLookup *lookup) \
{ \
GtkCssStyle *style = (GtkCssStyle *)sstyle; \
int i; \
@@ -84,10 +86,11 @@ gtk_css_ ## NAME ## _values_new_compute (GtkCssStaticStyle *sstyle, \
{ \
guint id = NAME ## _props[i]; \
gtk_css_static_style_compute_value (sstyle, \
provider, \
parent_style, \
id, \
lookup->values[id].value, \
lookup->values[id].section, \
context); \
lookup->values[id].section); \
} \
} \
static GtkBitmask * gtk_css_ ## NAME ## _values_mask; \
@@ -647,19 +650,18 @@ static GtkCssValues *
gtk_css_background_create_initial_values (void)
{
GtkCssBackgroundValues *values;
GtkCssComputeContext context = { NULL, };
values = (GtkCssBackgroundValues *)gtk_css_values_new (GTK_CSS_BACKGROUND_INITIAL_VALUES);
values->background_color = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_COLOR, &context);
values->box_shadow = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BOX_SHADOW, &context);
values->background_clip = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_CLIP, &context);
values->background_origin = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_ORIGIN, &context);
values->background_size = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_SIZE, &context);
values->background_position = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_POSITION, &context);
values->background_repeat = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_REPEAT, &context);
values->background_image = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_IMAGE, &context);
values->background_blend_mode = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_BLEND_MODE, &context);
values->background_color = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_COLOR, NULL, NULL, NULL);
values->box_shadow = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BOX_SHADOW, NULL, NULL, NULL);
values->background_clip = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_CLIP, NULL, NULL, NULL);
values->background_origin = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_ORIGIN, NULL, NULL, NULL);
values->background_size = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_SIZE, NULL, NULL, NULL);
values->background_position = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_POSITION, NULL, NULL, NULL);
values->background_repeat = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_REPEAT, NULL, NULL, NULL);
values->background_image = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_IMAGE, NULL, NULL, NULL);
values->background_blend_mode = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BACKGROUND_BLEND_MODE, NULL, NULL, NULL);
return (GtkCssValues *)values;
}
@@ -668,30 +670,29 @@ static GtkCssValues *
gtk_css_border_create_initial_values (void)
{
GtkCssBorderValues *values;
GtkCssComputeContext context = { NULL, };
values = (GtkCssBorderValues *)gtk_css_values_new (GTK_CSS_BORDER_INITIAL_VALUES);
values->border_top_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_TOP_STYLE, &context);
values->border_top_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_TOP_WIDTH, &context);
values->border_left_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_LEFT_STYLE, &context);
values->border_left_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH, &context);
values->border_bottom_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_BOTTOM_STYLE, &context);
values->border_bottom_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH, &context);
values->border_right_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_RIGHT_STYLE, &context);
values->border_right_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH, &context);
values->border_top_left_radius = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_TOP_LEFT_RADIUS, &context);
values->border_top_right_radius = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_TOP_RIGHT_RADIUS, &context);
values->border_bottom_left_radius = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_BOTTOM_LEFT_RADIUS, &context);
values->border_bottom_right_radius = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_BOTTOM_RIGHT_RADIUS, &context);
values->border_top_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_TOP_STYLE, NULL, NULL, NULL);
values->border_top_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_TOP_WIDTH, NULL, NULL, NULL);
values->border_left_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_LEFT_STYLE, NULL, NULL, NULL);
values->border_left_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH, NULL, NULL, NULL);
values->border_bottom_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_BOTTOM_STYLE, NULL, NULL, NULL);
values->border_bottom_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH, NULL, NULL, NULL);
values->border_right_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_RIGHT_STYLE, NULL, NULL, NULL);
values->border_right_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH, NULL, NULL, NULL);
values->border_top_left_radius = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_TOP_LEFT_RADIUS, NULL, NULL, NULL);
values->border_top_right_radius = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_TOP_RIGHT_RADIUS, NULL, NULL, NULL);
values->border_bottom_left_radius = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_BOTTOM_LEFT_RADIUS, NULL, NULL, NULL);
values->border_bottom_right_radius = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_BOTTOM_RIGHT_RADIUS, NULL, NULL, NULL);
values->border_top_color = NULL;
values->border_right_color = NULL;
values->border_bottom_color = NULL;
values->border_left_color = NULL;
values->border_image_source = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE, &context);
values->border_image_repeat = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT, &context);
values->border_image_slice = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE, &context);
values->border_image_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH, &context);
values->border_image_source = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE, NULL, NULL, NULL);
values->border_image_repeat = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT, NULL, NULL, NULL);
values->border_image_slice = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE, NULL, NULL, NULL);
values->border_image_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH, NULL, NULL, NULL);
return (GtkCssValues *)values;
}
@@ -700,13 +701,12 @@ static GtkCssValues *
gtk_css_outline_create_initial_values (void)
{
GtkCssOutlineValues *values;
GtkCssComputeContext context = { NULL, };
values = (GtkCssOutlineValues *)gtk_css_values_new (GTK_CSS_OUTLINE_INITIAL_VALUES);
values->outline_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_OUTLINE_STYLE, &context);
values->outline_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_OUTLINE_WIDTH, &context);
values->outline_offset = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_OUTLINE_OFFSET, &context);
values->outline_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_OUTLINE_STYLE, NULL, NULL, NULL);
values->outline_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_OUTLINE_WIDTH, NULL, NULL, NULL);
values->outline_offset = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_OUTLINE_OFFSET, NULL, NULL, NULL);
values->outline_color = NULL;
return (GtkCssValues *)values;
@@ -728,21 +728,20 @@ static GtkCssValues *
gtk_css_font_variant_create_initial_values (void)
{
GtkCssFontVariantValues *values;
GtkCssComputeContext context = { NULL, };
values = (GtkCssFontVariantValues *)gtk_css_values_new (GTK_CSS_FONT_VARIANT_INITIAL_VALUES);
values->text_decoration_line = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TEXT_DECORATION_LINE, &context);
values->text_decoration_line = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TEXT_DECORATION_LINE, NULL, NULL, NULL);
values->text_decoration_color = NULL;
values->text_decoration_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TEXT_DECORATION_STYLE, &context);
values->text_transform = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TEXT_TRANSFORM, &context);
values->font_kerning = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_KERNING, &context);
values->font_variant_ligatures = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_LIGATURES, &context);
values->font_variant_position = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_POSITION, &context);
values->font_variant_caps = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_CAPS, &context);
values->font_variant_numeric = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_NUMERIC, &context);
values->font_variant_alternates = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_ALTERNATES, &context);
values->font_variant_east_asian = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_EAST_ASIAN, &context);
values->text_decoration_style = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TEXT_DECORATION_STYLE, NULL, NULL, NULL);
values->text_transform = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TEXT_TRANSFORM, NULL, NULL, NULL);
values->font_kerning = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_KERNING, NULL, NULL, NULL);
values->font_variant_ligatures = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_LIGATURES, NULL, NULL, NULL);
values->font_variant_position = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_POSITION, NULL, NULL, NULL);
values->font_variant_caps = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_CAPS, NULL, NULL, NULL);
values->font_variant_numeric = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_NUMERIC, NULL, NULL, NULL);
values->font_variant_alternates = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_ALTERNATES, NULL, NULL, NULL);
values->font_variant_east_asian = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FONT_VARIANT_EAST_ASIAN, NULL, NULL, NULL);
return (GtkCssValues *)values;
}
@@ -751,18 +750,17 @@ static GtkCssValues *
gtk_css_animation_create_initial_values (void)
{
GtkCssAnimationValues *values;
GtkCssComputeContext context = { NULL, };
values = (GtkCssAnimationValues *)gtk_css_values_new (GTK_CSS_ANIMATION_INITIAL_VALUES);
values->animation_name = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_NAME, &context);
values->animation_duration = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_DURATION, &context);
values->animation_timing_function = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_TIMING_FUNCTION, &context);
values->animation_iteration_count = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_ITERATION_COUNT, &context);
values->animation_direction = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_DIRECTION, &context);
values->animation_play_state = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_PLAY_STATE, &context);
values->animation_delay = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_DELAY, &context);
values->animation_fill_mode = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_FILL_MODE, &context);
values->animation_name = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_NAME, NULL, NULL, NULL);
values->animation_duration = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_DURATION, NULL, NULL, NULL);
values->animation_timing_function = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_TIMING_FUNCTION, NULL, NULL, NULL);
values->animation_iteration_count = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_ITERATION_COUNT, NULL, NULL, NULL);
values->animation_direction = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_DIRECTION, NULL, NULL, NULL);
values->animation_play_state = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_PLAY_STATE, NULL, NULL, NULL);
values->animation_delay = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_DELAY, NULL, NULL, NULL);
values->animation_fill_mode = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ANIMATION_FILL_MODE, NULL, NULL, NULL);
return (GtkCssValues *)values;
}
@@ -771,14 +769,13 @@ static GtkCssValues *
gtk_css_transition_create_initial_values (void)
{
GtkCssTransitionValues *values;
GtkCssComputeContext context = { NULL, };
values = (GtkCssTransitionValues *)gtk_css_values_new (GTK_CSS_TRANSITION_INITIAL_VALUES);
values->transition_property = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSITION_PROPERTY, &context);
values->transition_duration = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSITION_DURATION, &context);
values->transition_timing_function = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSITION_TIMING_FUNCTION, &context);
values->transition_delay = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSITION_DELAY, &context);
values->transition_property = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSITION_PROPERTY, NULL, NULL, NULL);
values->transition_duration = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSITION_DURATION, NULL, NULL, NULL);
values->transition_timing_function = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSITION_TIMING_FUNCTION, NULL, NULL, NULL);
values->transition_delay = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSITION_DELAY, NULL, NULL, NULL);
return (GtkCssValues *)values;
}
@@ -787,21 +784,20 @@ static GtkCssValues *
gtk_css_size_create_initial_values (void)
{
GtkCssSizeValues *values;
GtkCssComputeContext context = { NULL, };
values = (GtkCssSizeValues *)gtk_css_values_new (GTK_CSS_SIZE_INITIAL_VALUES);
values->margin_top = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MARGIN_TOP, &context);
values->margin_left = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MARGIN_LEFT, &context);
values->margin_bottom = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MARGIN_BOTTOM, &context);
values->margin_right = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MARGIN_RIGHT, &context);
values->padding_top = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_PADDING_TOP, &context);
values->padding_left = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_PADDING_LEFT, &context);
values->padding_bottom = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_PADDING_BOTTOM, &context);
values->padding_right = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_PADDING_RIGHT, &context);
values->border_spacing = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_SPACING, &context);
values->min_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MIN_WIDTH, &context);
values->min_height = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MIN_HEIGHT, &context);
values->margin_top = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MARGIN_TOP, NULL, NULL, NULL);
values->margin_left = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MARGIN_LEFT, NULL, NULL, NULL);
values->margin_bottom = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MARGIN_BOTTOM, NULL, NULL, NULL);
values->margin_right = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MARGIN_RIGHT, NULL, NULL, NULL);
values->padding_top = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_PADDING_TOP, NULL, NULL, NULL);
values->padding_left = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_PADDING_LEFT, NULL, NULL, NULL);
values->padding_bottom = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_PADDING_BOTTOM, NULL, NULL, NULL);
values->padding_right = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_PADDING_RIGHT, NULL, NULL, NULL);
values->border_spacing = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_BORDER_SPACING, NULL, NULL, NULL);
values->min_width = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MIN_WIDTH, NULL, NULL, NULL);
values->min_height = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_MIN_HEIGHT, NULL, NULL, NULL);
return (GtkCssValues *)values;
}
@@ -810,17 +806,16 @@ static GtkCssValues *
gtk_css_other_create_initial_values (void)
{
GtkCssOtherValues *values;
GtkCssComputeContext context = { NULL, };
values = (GtkCssOtherValues *)gtk_css_values_new (GTK_CSS_OTHER_INITIAL_VALUES);
values->icon_source = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ICON_SOURCE, &context);
values->icon_transform = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ICON_TRANSFORM, &context);
values->icon_filter = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ICON_FILTER, &context);
values->transform = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSFORM, &context);
values->transform_origin = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSFORM_ORIGIN, &context);
values->opacity = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_OPACITY, &context);
values->filter = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FILTER, &context);
values->icon_source = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ICON_SOURCE, NULL, NULL, NULL);
values->icon_transform = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ICON_TRANSFORM, NULL, NULL, NULL);
values->icon_filter = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_ICON_FILTER, NULL, NULL, NULL);
values->transform = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSFORM, NULL, NULL, NULL);
values->transform_origin = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_TRANSFORM_ORIGIN, NULL, NULL, NULL);
values->opacity = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_OPACITY, NULL, NULL, NULL);
values->filter = _gtk_css_initial_value_new_compute (GTK_CSS_PROPERTY_FILTER, NULL, NULL, NULL);
return (GtkCssValues *)values;
}
@@ -832,8 +827,6 @@ gtk_css_lookup_resolve (GtkCssLookup *lookup,
GtkCssStyle *parent_style)
{
GtkCssStyle *style = (GtkCssStyle *)sstyle;
GtkCssValue *shorthands[GTK_CSS_SHORTHAND_PROPERTY_N_PROPERTIES] = { NULL, };
GtkCssComputeContext context = { NULL, };
gtk_internal_return_if_fail (lookup != NULL);
gtk_internal_return_if_fail (GTK_IS_STYLE_PROVIDER (provider));
@@ -846,7 +839,6 @@ gtk_css_lookup_resolve (GtkCssLookup *lookup,
gpointer id;
GtkCssVariableValue *value;
g_clear_pointer (&style->variables, gtk_css_variable_set_unref);
style->variables = gtk_css_variable_set_new ();
g_hash_table_iter_init (&iter, lookup->custom_values);
@@ -867,11 +859,6 @@ gtk_css_lookup_resolve (GtkCssLookup *lookup,
style->variables = gtk_css_variable_set_ref (parent_style->variables);
}
context.provider = provider;
context.style = (GtkCssStyle *) sstyle;
context.parent_style = parent_style;
context.shorthands = shorthands;
if (_gtk_bitmask_is_empty (_gtk_css_lookup_get_set_values (lookup)))
{
style->background = (GtkCssBackgroundValues *)gtk_css_values_ref (gtk_css_background_initial_values);
@@ -891,9 +878,9 @@ gtk_css_lookup_resolve (GtkCssLookup *lookup,
}
else
{
gtk_css_core_values_new_compute (sstyle, lookup, &context);
gtk_css_icon_values_new_compute (sstyle, lookup, &context);
gtk_css_font_values_new_compute (sstyle, lookup, &context);
gtk_css_core_values_new_compute (sstyle, provider, parent_style, lookup);
gtk_css_icon_values_new_compute (sstyle, provider, parent_style, lookup);
gtk_css_font_values_new_compute (sstyle, provider, parent_style, lookup);
}
return;
@@ -902,63 +889,57 @@ gtk_css_lookup_resolve (GtkCssLookup *lookup,
if (parent_style && gtk_css_core_values_unset (lookup))
style->core = (GtkCssCoreValues *)gtk_css_values_ref ((GtkCssValues *)parent_style->core);
else
gtk_css_core_values_new_compute (sstyle, lookup, &context);
gtk_css_core_values_new_compute (sstyle, provider, parent_style, lookup);
if (gtk_css_background_values_unset (lookup))
style->background = (GtkCssBackgroundValues *)gtk_css_values_ref (gtk_css_background_initial_values);
else
gtk_css_background_values_new_compute (sstyle, lookup, &context);
gtk_css_background_values_new_compute (sstyle, provider, parent_style, lookup);
if (gtk_css_border_values_unset (lookup))
style->border = (GtkCssBorderValues *)gtk_css_values_ref (gtk_css_border_initial_values);
else
gtk_css_border_values_new_compute (sstyle, lookup, &context);
gtk_css_border_values_new_compute (sstyle, provider, parent_style, lookup);
if (parent_style && gtk_css_icon_values_unset (lookup))
style->icon = (GtkCssIconValues *)gtk_css_values_ref ((GtkCssValues *)parent_style->icon);
else
gtk_css_icon_values_new_compute (sstyle, lookup, &context);
gtk_css_icon_values_new_compute (sstyle, provider, parent_style, lookup);
if (gtk_css_outline_values_unset (lookup))
style->outline = (GtkCssOutlineValues *)gtk_css_values_ref (gtk_css_outline_initial_values);
else
gtk_css_outline_values_new_compute (sstyle, lookup, &context);
gtk_css_outline_values_new_compute (sstyle, provider, parent_style, lookup);
if (parent_style && gtk_css_font_values_unset (lookup))
style->font = (GtkCssFontValues *)gtk_css_values_ref ((GtkCssValues *)parent_style->font);
else
gtk_css_font_values_new_compute (sstyle, lookup, &context);
gtk_css_font_values_new_compute (sstyle, provider, parent_style, lookup);
if (gtk_css_font_variant_values_unset (lookup))
style->font_variant = (GtkCssFontVariantValues *)gtk_css_values_ref (gtk_css_font_variant_initial_values);
else
gtk_css_font_variant_values_new_compute (sstyle, lookup, &context);
gtk_css_font_variant_values_new_compute (sstyle, provider, parent_style, lookup);
if (gtk_css_animation_values_unset (lookup))
style->animation = (GtkCssAnimationValues *)gtk_css_values_ref (gtk_css_animation_initial_values);
else
gtk_css_animation_values_new_compute (sstyle, lookup, &context);
gtk_css_animation_values_new_compute (sstyle, provider, parent_style, lookup);
if (gtk_css_transition_values_unset (lookup))
style->transition = (GtkCssTransitionValues *)gtk_css_values_ref (gtk_css_transition_initial_values);
else
gtk_css_transition_values_new_compute (sstyle, lookup, &context);
gtk_css_transition_values_new_compute (sstyle, provider, parent_style, lookup);
if (gtk_css_size_values_unset (lookup))
style->size = (GtkCssSizeValues *)gtk_css_values_ref (gtk_css_size_initial_values);
else
gtk_css_size_values_new_compute (sstyle, lookup, &context);
gtk_css_size_values_new_compute (sstyle, provider, parent_style, lookup);
if (gtk_css_other_values_unset (lookup))
style->other = (GtkCssOtherValues *)gtk_css_values_ref (gtk_css_other_initial_values);
else
gtk_css_other_values_new_compute (sstyle, lookup, &context);
for (unsigned int i = 0; i < GTK_CSS_SHORTHAND_PROPERTY_N_PROPERTIES; i++)
{
if (shorthands[i])
gtk_css_value_unref (shorthands[i]);
}
gtk_css_other_values_new_compute (sstyle, provider, parent_style, lookup);
}
GtkCssStyle *
@@ -1006,11 +987,12 @@ G_STATIC_ASSERT (GTK_CSS_PROPERTY_BORDER_LEFT_STYLE == GTK_CSS_PROPERTY_BORDER_L
G_STATIC_ASSERT (GTK_CSS_PROPERTY_OUTLINE_STYLE == GTK_CSS_PROPERTY_OUTLINE_WIDTH - 1);
static void
gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
guint id,
GtkCssValue *specified,
GtkCssSection *section,
GtkCssComputeContext *context)
gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
GtkStyleProvider *provider,
GtkCssStyle *parent_style,
guint id,
GtkCssValue *specified,
GtkCssSection *section)
{
GtkCssValue *value, *original_value;
GtkBorderStyle border_style;
@@ -1050,21 +1032,21 @@ gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
*/
if (specified)
{
value = _gtk_css_value_compute (specified, id, context);
value = _gtk_css_value_compute (specified, id, provider, (GtkCssStyle *)style, parent_style, NULL);
if (gtk_css_value_contains_variables (specified))
original_value = specified;
else
original_value = NULL;
}
else if (context->parent_style && _gtk_css_style_property_is_inherit (_gtk_css_style_property_lookup_by_id (id)))
else if (parent_style && _gtk_css_style_property_is_inherit (_gtk_css_style_property_lookup_by_id (id)))
{
GtkCssValue *parent_original_value;
/* Just take the style from the parent */
value = _gtk_css_value_ref (gtk_css_style_get_value (context->parent_style, id));
value = _gtk_css_value_ref (gtk_css_style_get_value (parent_style, id));
parent_original_value = gtk_css_style_get_original_value (context->parent_style, id);
parent_original_value = gtk_css_style_get_original_value (parent_style, id);
if (parent_original_value)
original_value = parent_original_value;
@@ -1073,7 +1055,7 @@ gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
}
else
{
value = _gtk_css_initial_value_new_compute (id, context);
value = _gtk_css_initial_value_new_compute (id, provider, (GtkCssStyle *)style, parent_style);
original_value = NULL;
}

View File

@@ -35,9 +35,12 @@ gtk_css_value_string_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_string_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_string_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
return _gtk_css_value_ref (value);
}

View File

@@ -273,10 +273,13 @@ gtk_css_value_transform_free (GtkCssValue *value)
/* returns TRUE if dest == src */
static gboolean
gtk_css_transform_compute (GtkCssTransform *dest,
GtkCssTransform *src,
guint property_id,
GtkCssComputeContext *context)
gtk_css_transform_compute (GtkCssTransform *dest,
GtkCssTransform *src,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
dest->type = src->type;
@@ -286,41 +289,41 @@ gtk_css_transform_compute (GtkCssTransform *dest,
memcpy (dest, src, sizeof (GtkCssTransform));
return TRUE;
case GTK_CSS_TRANSFORM_TRANSLATE:
dest->translate.x = _gtk_css_value_compute (src->translate.x, property_id, context);
dest->translate.y = _gtk_css_value_compute (src->translate.y, property_id, context);
dest->translate.z = _gtk_css_value_compute (src->translate.z, property_id, context);
dest->translate.x = _gtk_css_value_compute (src->translate.x, property_id, provider, style, parent_style, variables);
dest->translate.y = _gtk_css_value_compute (src->translate.y, property_id, provider, style, parent_style, variables);
dest->translate.z = _gtk_css_value_compute (src->translate.z, property_id, provider, style, parent_style, variables);
return dest->translate.x == src->translate.x
&& dest->translate.y == src->translate.y
&& dest->translate.z == src->translate.z;
case GTK_CSS_TRANSFORM_ROTATE:
dest->rotate.x = _gtk_css_value_compute (src->rotate.x, property_id, context);
dest->rotate.y = _gtk_css_value_compute (src->rotate.y, property_id, context);
dest->rotate.z = _gtk_css_value_compute (src->rotate.z, property_id, context);
dest->rotate.angle = _gtk_css_value_compute (src->rotate.angle, property_id, context);
dest->rotate.x = _gtk_css_value_compute (src->rotate.x, property_id, provider, style, parent_style, variables);
dest->rotate.y = _gtk_css_value_compute (src->rotate.y, property_id, provider, style, parent_style, variables);
dest->rotate.z = _gtk_css_value_compute (src->rotate.z, property_id, provider, style, parent_style, variables);
dest->rotate.angle = _gtk_css_value_compute (src->rotate.angle, property_id, provider, style, parent_style, variables);
return dest->rotate.x == src->rotate.x
&& dest->rotate.y == src->rotate.y
&& dest->rotate.z == src->rotate.z
&& dest->rotate.angle == src->rotate.angle;
case GTK_CSS_TRANSFORM_SCALE:
dest->scale.x = _gtk_css_value_compute (src->scale.x, property_id, context);
dest->scale.y = _gtk_css_value_compute (src->scale.y, property_id, context);
dest->scale.z = _gtk_css_value_compute (src->scale.z, property_id, context);
dest->scale.x = _gtk_css_value_compute (src->scale.x, property_id, provider, style, parent_style, variables);
dest->scale.y = _gtk_css_value_compute (src->scale.y, property_id, provider, style, parent_style, variables);
dest->scale.z = _gtk_css_value_compute (src->scale.z, property_id, provider, style, parent_style, variables);
return dest->scale.x == src->scale.x
&& dest->scale.y == src->scale.y
&& dest->scale.z == src->scale.z;
case GTK_CSS_TRANSFORM_SKEW:
dest->skew.x = _gtk_css_value_compute (src->skew.x, property_id, context);
dest->skew.y = _gtk_css_value_compute (src->skew.y, property_id, context);
dest->skew.x = _gtk_css_value_compute (src->skew.x, property_id, provider, style, parent_style, variables);
dest->skew.y = _gtk_css_value_compute (src->skew.y, property_id, provider, style, parent_style, variables);
return dest->skew.x == src->skew.x
&& dest->skew.y == src->skew.y;
case GTK_CSS_TRANSFORM_SKEW_X:
dest->skew_x.skew = _gtk_css_value_compute (src->skew_x.skew, property_id, context);
dest->skew_x.skew = _gtk_css_value_compute (src->skew_x.skew, property_id, provider, style, parent_style, variables);
return dest->skew_x.skew == src->skew_x.skew;
case GTK_CSS_TRANSFORM_SKEW_Y:
dest->skew_y.skew = _gtk_css_value_compute (src->skew_y.skew, property_id, context);
dest->skew_y.skew = _gtk_css_value_compute (src->skew_y.skew, property_id, provider, style, parent_style, variables);
return dest->skew_y.skew == src->skew_y.skew;
case GTK_CSS_TRANSFORM_PERSPECTIVE:
dest->perspective.depth = _gtk_css_value_compute (src->perspective.depth, property_id, context);
dest->perspective.depth = _gtk_css_value_compute (src->perspective.depth, property_id, provider, style, parent_style, variables);
return dest->perspective.depth == src->perspective.depth;
case GTK_CSS_TRANSFORM_NONE:
default:
@@ -330,9 +333,12 @@ gtk_css_transform_compute (GtkCssTransform *dest,
}
static GtkCssValue *
gtk_css_value_transform_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_transform_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssValue *result;
gboolean changes;
@@ -350,7 +356,10 @@ gtk_css_value_transform_compute (GtkCssValue *value,
changes |= !gtk_css_transform_compute (&result->transforms[i],
&value->transforms[i],
property_id,
context);
provider,
style,
parent_style,
variables);
}
if (!changes)

View File

@@ -281,31 +281,6 @@ enum { /*< skip >*/
GTK_CSS_PROPERTY_CUSTOM,
};
enum {
GTK_CSS_SHORTHAND_PROPERTY_FONT,
GTK_CSS_SHORTHAND_PROPERTY_MARGIN,
GTK_CSS_SHORTHAND_PROPERTY_PADDING,
GTK_CSS_SHORTHAND_PROPERTY_BORDER_WIDTH,
GTK_CSS_SHORTHAND_PROPERTY_BORDER_RADIUS,
GTK_CSS_SHORTHAND_PROPERTY_BORDER_COLOR,
GTK_CSS_SHORTHAND_PROPERTY_BORDER_STYLE,
GTK_CSS_SHORTHAND_PROPERTY_BORDER_IMAGE,
GTK_CSS_SHORTHAND_PROPERTY_BORDER_TOP,
GTK_CSS_SHORTHAND_PROPERTY_BORDER_RIGHT,
GTK_CSS_SHORTHAND_PROPERTY_BORDER_BOTTOM,
GTK_CSS_SHORTHAND_PROPERTY_BORDER_LEFT,
GTK_CSS_SHORTHAND_PROPERTY_BORDER,
GTK_CSS_SHORTHAND_PROPERTY_OUTLINE,
GTK_CSS_SHORTHAND_PROPERTY_BACKGROUND,
GTK_CSS_SHORTHAND_PROPERTY_TRANSITION,
GTK_CSS_SHORTHAND_PROPERTY_ANIMATION,
GTK_CSS_SHORTHAND_PROPERTY_TEXT_DECORATION,
GTK_CSS_SHORTHAND_PROPERTY_FONT_VARIANT,
GTK_CSS_SHORTHAND_PROPERTY_ALL,
/* add more */
GTK_CSS_SHORTHAND_PROPERTY_N_PROPERTIES,
};
typedef enum /*< skip >*/ {
GTK_CSS_AREA_BORDER_BOX,
GTK_CSS_AREA_PADDING_BOX,

View File

@@ -35,9 +35,12 @@ gtk_css_value_unset_free (GtkCssValue *value)
}
static GtkCssValue *
gtk_css_value_unset_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
gtk_css_value_unset_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
GtkCssStyleProperty *property;
GtkCssValue *unset_value;
@@ -49,7 +52,12 @@ gtk_css_value_unset_compute (GtkCssValue *value,
else
unset_value = _gtk_css_initial_value_get ();
return _gtk_css_value_compute (unset_value, property_id, context);
return _gtk_css_value_compute (unset_value,
property_id,
provider,
style,
parent_style,
variables);
}
static gboolean

View File

@@ -200,7 +200,6 @@ gtk_css_value_unref (GtkCssValue *value)
* @style: Style to compute for
* @parent_style: parent style to use for inherited values
* @variables: an additional set of variables to use along with @style
* @shorthands: (nullable): Already computed values for shorthands
*
* Converts the specified @value into the computed value for the CSS
* property given by @property_id using the information in @context.
@@ -210,9 +209,12 @@ gtk_css_value_unref (GtkCssValue *value)
* Returns: the computed value
**/
GtkCssValue *
_gtk_css_value_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context)
_gtk_css_value_compute (GtkCssValue *value,
guint property_id,
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables)
{
if (gtk_css_value_is_computed (value))
return _gtk_css_value_ref (value);
@@ -221,7 +223,7 @@ _gtk_css_value_compute (GtkCssValue *value,
get_accounting_data (value->class->type_name)->computed++;
#endif
return value->class->compute (value, property_id, context);
return value->class->compute (value, property_id, provider, style, parent_style, variables);
}
gboolean

View File

@@ -41,21 +41,16 @@ typedef struct _GtkCssValueClass GtkCssValueClass;
guint is_computed: 1; \
guint contains_variables: 1;
typedef struct {
GtkStyleProvider *provider;
GtkCssStyle *style;
GtkCssStyle *parent_style;
GtkCssVariableSet *variables;
GtkCssValue **shorthands;
} GtkCssComputeContext;
struct _GtkCssValueClass {
const char *type_name;
void (* free) (GtkCssValue *value);
GtkCssValue * (* compute) (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context);
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables);
gboolean (* equal) (const GtkCssValue *value1,
const GtkCssValue *value2);
GtkCssValue * (* transition) (GtkCssValue *start,
@@ -82,7 +77,10 @@ void gtk_css_value_unref (GtkCssValue
GtkCssValue *_gtk_css_value_compute (GtkCssValue *value,
guint property_id,
GtkCssComputeContext *context) G_GNUC_PURE;
GtkStyleProvider *provider,
GtkCssStyle *style,
GtkCssStyle *parent_style,
GtkCssVariableSet *variables) G_GNUC_PURE;
gboolean _gtk_css_value_equal (const GtkCssValue *value1,
const GtkCssValue *value2) G_GNUC_PURE;
gboolean _gtk_css_value_equal0 (const GtkCssValue *value1,

View File

@@ -1576,8 +1576,7 @@ gtk_grid_view_get_tab_behavior (GtkGridView *self)
/**
* gtk_grid_view_scroll_to:
* @self: The gridview to scroll in
* @pos: position of the item. Must be less than the number of
* items in the view.
* @pos: position of the item
* @flags: actions to perform
* @scroll: (nullable) (transfer full): details of how to perform
* the scroll operation or %NULL to scroll into view
@@ -1597,7 +1596,6 @@ gtk_grid_view_scroll_to (GtkGridView *self,
GtkScrollInfo *scroll)
{
g_return_if_fail (GTK_IS_GRID_VIEW (self));
g_return_if_fail (pos < gtk_list_base_get_n_items (GTK_LIST_BASE (self)));
gtk_list_base_scroll_to (GTK_LIST_BASE (self), pos, flags, scroll);
}

View File

@@ -1356,8 +1356,7 @@ gtk_list_view_get_tab_behavior (GtkListView *self)
/**
* gtk_list_view_scroll_to:
* @self: The listview to scroll in
* @pos: position of the item. Must be less than the number of
* items in the view.
* @pos: position of the item
* @flags: actions to perform
* @scroll: (nullable) (transfer full): details of how to perform
* the scroll operation or %NULL to scroll into view
@@ -1377,7 +1376,6 @@ gtk_list_view_scroll_to (GtkListView *self,
GtkScrollInfo *scroll)
{
g_return_if_fail (GTK_IS_LIST_VIEW (self));
g_return_if_fail (pos < gtk_list_base_get_n_items (GTK_LIST_BASE (self)));
gtk_list_base_scroll_to (GTK_LIST_BASE (self), pos, flags, scroll);
}

View File

@@ -142,7 +142,7 @@ gtk_print_setup_unref (GtkPrintSetup *setup)
* They may be different from the `GtkPrintDialog`'s settings
* if the user changed them during the setup process.
*
* Returns: (transfer none): the print settings, or `NULL`
* Returns: (nullable) (transfer none): the print settings, or `NULL`
*
* Since: 4.14
*/
@@ -168,7 +168,7 @@ gtk_print_setup_set_print_settings (GtkPrintSetup *setup,
* It may be different from the `GtkPrintDialog`'s page setup
* if the user changed it during the setup process.
*
* Returns: (transfer none): the page setup, or `NULL`
* Returns: (nullable) (transfer none): the page setup, or `NULL`
*
* Since: 4.14
*/
@@ -585,7 +585,7 @@ gtk_print_dialog_set_modal (GtkPrintDialog *self,
*
* Returns the page setup.
*
* Returns: (nullable) (transfer none): the page setup
* Returns: (transfer none): the page setup
*
* Since: 4.14
*/
@@ -623,7 +623,7 @@ gtk_print_dialog_set_page_setup (GtkPrintDialog *self,
*
* Returns the print settings for the print dialog.
*
* Returns: (nullable) (transfer none): the settings
* Returns: (transfer none): the settings
*
* Since: 4.14
*/
@@ -1502,7 +1502,7 @@ gtk_print_dialog_setup (GtkPrintDialog *self,
* which contains the print settings and page setup information that
* will be used to print.
*
* Returns: The `GtkPrintSetup` object that resulted from the call,
* Returns: (nullable): The `GtkPrintSetup` object that resulted from the call,
* or `NULL` if the call was not successful
*
* Since: 4.14
@@ -1628,7 +1628,7 @@ gtk_print_dialog_print (GtkPrintDialog *self,
* call may not be instant as it operation will for the printer to finish
* printing.
*
* Returns: (transfer full): a [class@Gio.OutputStream]
* Returns: (nullable) (transfer full): a [class@Gio.OutputStream]
*
* Since: 4.14
*/

View File

@@ -366,10 +366,9 @@ gtk_tooltip_trigger_tooltip_query (GtkWidget *widget)
GdkSeat *seat;
GdkDevice *device;
GdkSurface *surface;
double px, py;
int x, y;
double x, y;
graphene_point_t p;
GtkWidget *toplevel;
GtkWidget *target_widget;
g_return_if_fail (GTK_IS_WIDGET (widget));
@@ -382,7 +381,7 @@ gtk_tooltip_trigger_tooltip_query (GtkWidget *widget)
else
device = NULL;
if (device)
surface = gdk_device_get_surface_at_position (device, &px, &py);
surface = gdk_device_get_surface_at_position (device, &x, &y);
else
surface = NULL;
if (!surface)
@@ -396,12 +395,10 @@ gtk_tooltip_trigger_tooltip_query (GtkWidget *widget)
if (gtk_native_get_surface (GTK_NATIVE (toplevel)) != surface)
return;
x = round (px);
y = round (py);
if (!gtk_widget_compute_point (toplevel, widget, &GRAPHENE_POINT_INIT (x, y), &p))
graphene_point_init (&p, x, y);
target_widget = _gtk_widget_find_at_coords (surface, x, y, &x, &y);
gtk_tooltip_handle_event_internal (GDK_MOTION_NOTIFY, surface, target_widget, x, y);
gtk_tooltip_handle_event_internal (GDK_MOTION_NOTIFY, surface, widget, p.x, p.y);
}
static void

View File

@@ -1555,21 +1555,21 @@ headerbar {
}
&.default-decoration {
min-height: 0px;
padding: 0px 2px;
min-height: 28px;
padding: 4px;
windowcontrols {
button,
menubutton {
min-height: 18px;
min-width: 18px;
min-height: 26px;
min-width: 26px;
margin: 0;
padding: 0;
}
menubutton button {
min-height: 18px;
min-width: 18px;
min-height: 20px;
min-width: 20px;
margin: 0;
padding: 4px;
}

268
po/ka.po
View File

@@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gtk/-/issues/\n"
"POT-Creation-Date: 2024-05-11 03:40+0000\n"
"PO-Revision-Date: 2024-05-13 02:43+0200\n"
"POT-Creation-Date: 2024-03-30 09:15+0000\n"
"PO-Revision-Date: 2024-03-30 19:22+0100\n"
"Last-Translator: Ekaterine Papava <papava.e@gtu.ge>\n"
"Language-Team: Georgian <http://mail.gnome.org/mailman/listinfo/gnome-ge-"
"list>\n"
@@ -55,7 +55,7 @@ msgstr "შემცველობის %s-ად გამოტანა შ
msgid "The current backend does not support OpenGL"
msgstr "მიმდინარე უკანაბოლოს OpenGL-ის მხარდაჭერა არ გააჩნია"
#: gdk/gdkdisplay.c:1315 gdk/gdkvulkancontext.c:1636
#: gdk/gdkdisplay.c:1315 gdk/gdkvulkancontext.c:1600
msgid "Vulkan support disabled via GDK_DEBUG"
msgstr "Vulkan-ის მხარდაჭერა გამორთულია GDK_DEBUG-ით"
@@ -139,7 +139,7 @@ msgstr "აპლიკაციას %s-ის API-ის მხარდა
#. 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 უკვე გამოიყენება"
@@ -535,7 +535,7 @@ msgstr "JPEG გამოსახულების ფაილის კი
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 "არასაკმარისი მეხსიერება გამოსახულების ჩასატვირთად %ux%u"
@@ -545,17 +545,17 @@ msgstr "არასაკმარისი მეხსიერება გ
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 "PNG გამოსახულების მხარდაუჭერელი ფერთა სიღრმე %u"
#: gdk/loaders/gdkpng.c:265
#: gdk/loaders/gdkpng.c:262
#, c-format
msgid "Unsupported color type %u in png image"
msgstr "PNG გამოსახულების ფერების მხარდაუჭერელი ტიპი %u"
#: 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"
@@ -2274,7 +2274,7 @@ msgstr "ფაილი ამ სახელით უკვე არსე
#: 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/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"
@@ -2362,7 +2362,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:6194 gtk/gtktextview.c:9099
#: gtk/gtklabel.c:5712 gtk/gtktext.c:6194 gtk/gtktextview.c:9099
msgid "_Delete"
msgstr "წაშლა"
@@ -2688,7 +2688,7 @@ msgstr "სტილის ვარიაციები"
msgid "Character Variations"
msgstr "სიმბოლოების ვარიანტები"
#: gtk/gtkglarea.c:316
#: gtk/gtkglarea.c:309
msgid "OpenGL context creation failed"
msgstr "OpenGL-ის კონტექსტის შექმნის შეცდომა"
@@ -2701,31 +2701,31 @@ msgstr "დახურვა"
msgid "Close the infobar"
msgstr "საინფორმაციო ზოლის დახურვა"
#: gtk/gtklabel.c:5742 gtk/gtktext.c:6182 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:6186 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:6190 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:6203 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 "დაა_კოპირე ბმულის მისამართი"
#: 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 "კონტექსტური მენიუ"
@@ -2733,7 +2733,7 @@ msgstr "კონტექსტური მენიუ"
msgid "_Copy URL"
msgstr "URL-ის _კოპირება"
#: gtk/gtklinkbutton.c:589
#: gtk/gtklinkbutton.c:567
msgid "Invalid URI"
msgstr "მცდარი URI"
@@ -2796,7 +2796,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 "_დიახ"
@@ -3414,7 +3414,7 @@ msgstr "არ არის ქაღალდი"
#. Translators: this is a printer status.
#: gtk/print/gtkprintoperation-win32.c:640
#: modules/printbackends/gtkprintbackendcpdb.c:1533
#: modules/printbackends/gtkprintbackendcpdb.c:1528
#: modules/printbackends/gtkprintbackendcups.c:2639
msgid "Paused"
msgstr "შეჩერებულია"
@@ -3485,42 +3485,42 @@ msgstr "პრინტერის ინფორმაციის მიღ
#. * multiple pages on a sheet when printing
#.
#: gtk/print/gtkprintunixdialog.c:2753
#: modules/printbackends/gtkprintbackendcups.c:5677
#: modules/printbackends/gtkprintbackendcups.c:5672
msgid "Left to right, top to bottom"
msgstr "მარცხნიდან მარჯვნივ, ქვევიდან ზემოთ"
#: gtk/print/gtkprintunixdialog.c:2753
#: modules/printbackends/gtkprintbackendcups.c:5677
#: modules/printbackends/gtkprintbackendcups.c:5672
msgid "Left to right, bottom to top"
msgstr "მარცხნიდან მარჯვნივ, ქვემოდან ზემოთ"
#: gtk/print/gtkprintunixdialog.c:2754
#: modules/printbackends/gtkprintbackendcups.c:5678
#: modules/printbackends/gtkprintbackendcups.c:5673
msgid "Right to left, top to bottom"
msgstr "მარჯვნიდან მარცხნივ, ზევიდან ქვემოთ"
#: gtk/print/gtkprintunixdialog.c:2754
#: modules/printbackends/gtkprintbackendcups.c:5678
#: modules/printbackends/gtkprintbackendcups.c:5673
msgid "Right to left, bottom to top"
msgstr "მარჯვნიდან მარცხნივ, ქვემოდან ზემოთ"
#: gtk/print/gtkprintunixdialog.c:2755
#: modules/printbackends/gtkprintbackendcups.c:5679
#: modules/printbackends/gtkprintbackendcups.c:5674
msgid "Top to bottom, left to right"
msgstr "ზემოდან ქვემოთ, მარცხნიდან მარჯვნივ"
#: gtk/print/gtkprintunixdialog.c:2755
#: modules/printbackends/gtkprintbackendcups.c:5679
#: modules/printbackends/gtkprintbackendcups.c:5674
msgid "Top to bottom, right to left"
msgstr "ზემოდან ქვემოთ, მარჯვნიდან მარცხნივ"
#: gtk/print/gtkprintunixdialog.c:2756
#: modules/printbackends/gtkprintbackendcups.c:5680
#: modules/printbackends/gtkprintbackendcups.c:5675
msgid "Bottom to top, left to right"
msgstr "ქვემოდან ზემოთ, მარცხნიდან მარჯვნივ"
#: gtk/print/gtkprintunixdialog.c:2756
#: modules/printbackends/gtkprintbackendcups.c:5680
#: modules/printbackends/gtkprintbackendcups.c:5675
msgid "Bottom to top, right to left"
msgstr "ქვემოდან ზემოთ, მარჯვნიდან მარცხნივ"
@@ -3672,12 +3672,12 @@ 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 "
@@ -3688,7 +3688,7 @@ msgstr ""
"ნებისმიერი GTK აპლიკაციის შიდა პარამეტრები დაათვალიეროთ და შეცვალოთ. მისი "
"გამოყენებით ასევე შეიძლება პროგრამა ავარიულად დასრულდეს."
#: gtk/gtkwindow.c:6253
#: gtk/gtkwindow.c:6252
msgid "Dont show this message again"
msgstr "მეტჯერ აღარ მაჩვენო ეს გაფრთხილება"
@@ -3866,37 +3866,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-ის კონტექსტი GTK_IM_MODULE-ში ხელითაა ჩაწერილი"
@@ -4206,7 +4206,7 @@ msgstr "წყარო:"
msgid "Defined At"
msgstr "აღწერის წერტილი"
#: gtk/inspector/recorder.c:1950
#: gtk/inspector/recorder.c:1941
#, c-format
msgid "Saving RenderNode failed"
msgstr "RenderNode-ის შენახვის შეცდომა"
@@ -4344,7 +4344,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-ის მიერ"
@@ -4389,28 +4389,43 @@ 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
msgid "None"
msgstr "არცერთი"
#: gtk/inspector/visual.ui:403
msgid "Slight"
msgstr "ოდნავ"
#: gtk/inspector/visual.ui:404 modules/printbackends/gtkprintbackendcpdb.c:541
#: modules/printbackends/gtkprintbackendcups.c:5667
msgid "Medium"
msgstr "საშუალო"
#: gtk/inspector/visual.ui:405
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."
@@ -4418,47 +4433,47 @@ msgstr ""
"შეღებავს ყველა ადგილს, სადაც მიმდინარე რენდერერი GPU-ის მაგიერ 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 "საბაზისო ხაზების ჩვენება"
#: 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 "კონტროლის ინსპექტორი"
@@ -6584,35 +6599,29 @@ msgstr "დამატებითი"
msgid "Some of the settings in the dialog conflict"
msgstr "კონფლიქტი ფანჯრის რამდენიმე პარამეტრს შორის"
#: modules/printbackends/gtkprintbackendcpdb.c:542
#: modules/printbackends/gtkprintbackendcups.c:5668
msgctxt "Print job priority"
#. Translators: These strings name the possible values of the
#. * job priority option in the print dialog
#.
#: modules/printbackends/gtkprintbackendcpdb.c:541
#: modules/printbackends/gtkprintbackendcups.c:5667
msgid "Urgent"
msgstr "გადაუდებელი"
#: modules/printbackends/gtkprintbackendcpdb.c:543
#: modules/printbackends/gtkprintbackendcups.c:5669
msgctxt "Print job priority"
#: modules/printbackends/gtkprintbackendcpdb.c:541
#: modules/printbackends/gtkprintbackendcups.c:5667
msgid "High"
msgstr "მაღალი"
#: modules/printbackends/gtkprintbackendcpdb.c:544
#: modules/printbackends/gtkprintbackendcups.c:5670
msgctxt "Print job priority"
msgid "Medium"
msgstr "საშუალო"
#: modules/printbackends/gtkprintbackendcpdb.c:545
#: modules/printbackends/gtkprintbackendcups.c:5671
msgctxt "Print job priority"
#: modules/printbackends/gtkprintbackendcpdb.c:541
#: modules/printbackends/gtkprintbackendcups.c:5667
msgid "Low"
msgstr "დაბალი"
#. Translators, this is the label used for the option in the print
#. * dialog that controls the front cover page.
#.
#: modules/printbackends/gtkprintbackendcpdb.c:567
#: modules/printbackends/gtkprintbackendcups.c:5814
#: modules/printbackends/gtkprintbackendcpdb.c:562
#: modules/printbackends/gtkprintbackendcups.c:5809
msgctxt "printer option"
msgid "Before"
msgstr "ჯერ"
@@ -6620,33 +6629,33 @@ msgstr "ჯერ"
#. Translators, this is the label used for the option in the print
#. * dialog that controls the back cover page.
#.
#: modules/printbackends/gtkprintbackendcpdb.c:574
#: modules/printbackends/gtkprintbackendcups.c:5829
#: modules/printbackends/gtkprintbackendcpdb.c:569
#: modules/printbackends/gtkprintbackendcups.c:5824
msgctxt "printer option"
msgid "After"
msgstr "შემდეგ"
#: modules/printbackends/gtkprintbackendcpdb.c:597
#: modules/printbackends/gtkprintbackendcpdb.c:592
msgid "Print at"
msgstr "დაბეჭდვის დრო"
#: modules/printbackends/gtkprintbackendcpdb.c:607
#: modules/printbackends/gtkprintbackendcpdb.c:602
msgid "Print at time"
msgstr "დაბეჭდვის დრო"
#: modules/printbackends/gtkprintbackendcpdb.c:670
#: modules/printbackends/gtkprintbackendcpdb.c:665
msgctxt "print option"
msgid "Borderless"
msgstr "საზღვრების გარეშე"
#. Translators: this is a printer status.
#: modules/printbackends/gtkprintbackendcpdb.c:1530
#: modules/printbackends/gtkprintbackendcpdb.c:1525
#: modules/printbackends/gtkprintbackendcups.c:2636
msgid "Paused; Rejecting Jobs"
msgstr "შეყოვნებულია; დავალებების უარყოფა"
#. Translators: this is a printer status.
#: modules/printbackends/gtkprintbackendcpdb.c:1536
#: modules/printbackends/gtkprintbackendcpdb.c:1531
#: modules/printbackends/gtkprintbackendcups.c:2642
msgid "Rejecting Jobs"
msgstr "დავალებების უარყოფა"
@@ -7012,51 +7021,51 @@ msgstr "ნაგულისხმევი პრინტერი"
#. Translators, this string is used to label the job priority option
#. * in the print dialog
#.
#: modules/printbackends/gtkprintbackendcups.c:5702
#: modules/printbackends/gtkprintbackendcups.c:5697
msgid "Job Priority"
msgstr "ამოცანის პრიორიტეტი"
#. Translators, this string is used to label the billing info entry
#. * in the print dialog
#.
#: modules/printbackends/gtkprintbackendcups.c:5713
#: modules/printbackends/gtkprintbackendcups.c:5708
msgid "Billing Info"
msgstr "ანგარიშთა ინფორმაცია"
#. Translators, these strings are names for various 'standard' cover
#. * pages that the printing system may support.
#.
#: modules/printbackends/gtkprintbackendcups.c:5737
#: modules/printbackends/gtkprintbackendcups.c:5732
msgctxt "cover page"
msgid "None"
msgstr "არცერთი"
#: modules/printbackends/gtkprintbackendcups.c:5738
#: modules/printbackends/gtkprintbackendcups.c:5733
msgctxt "cover page"
msgid "Classified"
msgstr "საიდუმლო"
#: modules/printbackends/gtkprintbackendcups.c:5739
#: modules/printbackends/gtkprintbackendcups.c:5734
msgctxt "cover page"
msgid "Confidential"
msgstr "კონფიდენციალური"
#: modules/printbackends/gtkprintbackendcups.c:5740
#: modules/printbackends/gtkprintbackendcups.c:5735
msgctxt "cover page"
msgid "Secret"
msgstr "სამხედრო საიდუმლო"
#: modules/printbackends/gtkprintbackendcups.c:5741
#: modules/printbackends/gtkprintbackendcups.c:5736
msgctxt "cover page"
msgid "Standard"
msgstr "სტანდარტული"
#: modules/printbackends/gtkprintbackendcups.c:5742
#: modules/printbackends/gtkprintbackendcups.c:5737
msgctxt "cover page"
msgid "Top Secret"
msgstr "უმაღლესი დონის საიდუმლო"
#: modules/printbackends/gtkprintbackendcups.c:5743
#: modules/printbackends/gtkprintbackendcups.c:5738
msgctxt "cover page"
msgid "Unclassified"
msgstr "არასაიდუმლო"
@@ -7064,7 +7073,7 @@ msgstr "არასაიდუმლო"
#. Translators, this string is used to label the pages-per-sheet option
#. * in the print dialog
#.
#: modules/printbackends/gtkprintbackendcups.c:5755
#: modules/printbackends/gtkprintbackendcups.c:5750
msgctxt "printer option"
msgid "Pages per Sheet"
msgstr "გვერდები ფურცელზე"
@@ -7072,7 +7081,7 @@ msgstr "გვერდები ფურცელზე"
#. Translators, this string is used to label the option in the print
#. * dialog that controls in what order multiple pages are arranged
#.
#: modules/printbackends/gtkprintbackendcups.c:5772
#: modules/printbackends/gtkprintbackendcups.c:5767
msgctxt "printer option"
msgid "Page Ordering"
msgstr "გვერდის დალაგება"
@@ -7081,7 +7090,7 @@ msgstr "გვერდის დალაგება"
#. * a print job is printed. Possible values are 'now', a specified time,
#. * or 'on hold'
#.
#: modules/printbackends/gtkprintbackendcups.c:5849
#: modules/printbackends/gtkprintbackendcups.c:5844
msgctxt "printer option"
msgid "Print at"
msgstr "დაბეჭდვის დრო"
@@ -7089,7 +7098,7 @@ msgstr "დაბეჭდვის დრო"
#. Translators: this is the name of the option that allows the user
#. * to specify a time when a print job will be printed.
#.
#: modules/printbackends/gtkprintbackendcups.c:5860
#: modules/printbackends/gtkprintbackendcups.c:5855
msgctxt "printer option"
msgid "Print at time"
msgstr "დაბეჭდვის დრო"
@@ -7099,19 +7108,19 @@ msgstr "დაბეჭდვის დრო"
#. * the width and height in points. E.g: "Custom
#. * 230.4x142.9"
#.
#: modules/printbackends/gtkprintbackendcups.c:5907
#: modules/printbackends/gtkprintbackendcups.c:5902
#, c-format
msgid "Custom %s×%s"
msgstr "ხელით %s×%s"
#. TRANSLATORS: this is the ICC color profile to use for this job
#: modules/printbackends/gtkprintbackendcups.c:6018
#: modules/printbackends/gtkprintbackendcups.c:6013
msgctxt "printer option"
msgid "Printer Profile"
msgstr "პრინტერის პროფილი"
#. TRANSLATORS: this is when color profile information is unavailable
#: modules/printbackends/gtkprintbackendcups.c:6025
#: modules/printbackends/gtkprintbackendcups.c:6020
msgctxt "printer option value"
msgid "Unavailable"
msgstr "მიუწვდომელია"
@@ -7172,22 +7181,22 @@ msgstr "მიმდინარის მაგიერ ამ საქაღ
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 "Cant 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 "Cant save file %s: %s\n"
msgstr "ფაილის შენახვა შეუძლებელია: \"%s\": %s\n"
#: tools/encodesymbolic.c:168
#: tools/encodesymbolic.c:153
#, c-format
msgid "Cant close stream"
msgstr "ნაკადის დახურვა შეუძლებელია"
@@ -7260,7 +7269,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"
@@ -7305,13 +7314,13 @@ msgstr ""
"თავზე გადასაწერად გამოიყენეთ --force.\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 "გამოტანილი ინფორმაცია ჩაწერილია %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 "\"%s'-ის შენახვის შეცდომა: %s\n"
@@ -7330,7 +7339,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…"
@@ -7826,7 +7835,7 @@ 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-render.c:195
msgid "RENDERER"
msgstr "რენდერერი"
@@ -7847,7 +7856,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"
@@ -7859,7 +7868,7 @@ 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-render.c:195
msgid "Renderer to use"
msgstr "გამოყენებული რენდერერი"
@@ -7881,7 +7890,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"
@@ -7942,7 +7951,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"
@@ -7952,17 +7961,16 @@ msgstr ""
"თუ გნებავთ, თავზე გადააწეროთ, ფაილის სახელი მიუთითეთ.\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 ".ui ფაილის რენდერი გამოსახულებაში."
#: 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"
@@ -8098,24 +8106,6 @@ msgstr ""
"თუ მართლა გნებავთ, ხატულების კეში აქ შექმნათ, --ignore-theme-index "
"გამოიყენეთ.\n"
#~ msgid "Antialiasing"
#~ msgstr "მომრგვალება"
#~ msgid "Hinting"
#~ msgstr "მომრგვალება"
#~ msgid "None"
#~ msgstr "არცერთი"
#~ msgid "Slight"
#~ msgstr "ოდნავ"
#~ msgid "Full"
#~ msgstr "სრული"
#~ msgid "Metrics Hinting"
#~ msgstr "მეტრიკის მომრგვალება"
#~ msgid "Backend does not support window scaling"
#~ msgstr "უკანაბოლოს ფანჯრის მასშტაბირების მხარდაჭერა არ გააჩნია"

1542
po/pt.po

File diff suppressed because it is too large Load Diff

View File

@@ -269,17 +269,6 @@ add_tests_for_files_in_directory (GFile *dir)
int
main (int argc, char **argv)
{
if (argc >= 2 && strcmp (argv[1], "--generate") == 0)
{
GFile *file;
file = g_file_new_for_commandline_arg (argv[2]);
parse_css_file (file, TRUE);
g_object_unref (file);
return 0;
}
gtk_test_init (&argc, &argv);
if (argc < 2)
@@ -293,14 +282,27 @@ main (int argc, char **argv)
g_object_unref (dir);
}
else if (strcmp (argv[1], "--generate") == 0)
{
if (argc >= 3)
{
GFile *file = g_file_new_for_commandline_arg (argv[2]);
parse_css_file (file, TRUE);
g_object_unref (file);
}
}
else
{
for (guint i = 1; i < argc; i++)
{
GFile *file;
guint i;
for (i = 1; i < argc; i++)
{
GFile *file = g_file_new_for_commandline_arg (argv[i]);
file = g_file_new_for_commandline_arg (argv[i]);
add_test_for_file (file);
g_object_unref (file);
}
}

View File

@@ -1,5 +1,6 @@
:root {
--color1: red;
--not-a-color: 20px;
/* A dependency cycle */
--test1: var(--test2);
@@ -95,6 +96,11 @@
background-color: red;
}
.label-7 {
/* Invalid variable, but this declaration still wins over the one above */
background-color: var(--not-a-color);
}
@keyframes test {
from {
--test1: red;
@@ -139,4 +145,3 @@
--duration2: var(--duration, 4s);
transition-duration: var(--duration2, 5s);
}

View File

@@ -1,184 +1,189 @@
window.background:dir(ltr)
--color1: red; /* variables.css:2:13-16 */
--color1: red; /* variables.css:2:3-17 */
--not-a-color: 20px; /* variables.css:3:3-23 */
box.horizontal:dir(ltr)
--color1: red; /* variables.css:2:13-16 */
--color1: red; /* variables.css:2:3-17 */
--not-a-color: 20px; /* variables.css:3:3-23 */
label.label-1:dir(ltr)
color: rgb(255,0,0); /* variables.css:10:3-24 */
background-color: rgb(255,0,0); /* variables.css:13:3-42 */
box-shadow: 0 0 3px rgb(0,128,0) inset; /* variables.css:16:3-65 */
--color1: red; /* variables.css:2:13-16 */
color: rgb(255,0,0); /* variables.css:11:3-24 */
background-color: rgb(255,0,0); /* variables.css:14:3-42 */
box-shadow: 0 0 3px rgb(0,128,0) inset; /* variables.css:17:3-65 */
--color1: red; /* variables.css:2:3-17 */
--not-a-color: 20px; /* variables.css:3:3-23 */
label.label-2:dir(ltr)
color: rgb(255,255,0); /* variables.css:22:3-24 */
background-color: rgb(0,128,0); /* variables.css:25:3-42 */
box-shadow: 0 0 3px rgb(0,128,0) inset; /* variables.css:28:3-50 */
--color1: yellow; /* variables.css:21:13-19 */
color: rgb(255,255,0); /* variables.css:23:3-24 */
background-color: rgb(0,128,0); /* variables.css:26:3-42 */
box-shadow: 0 0 3px rgb(0,128,0) inset; /* variables.css:29:3-50 */
--color1: yellow; /* variables.css:22:3-20 */
label.label-3:dir(ltr)
color: rgb(0,128,0); /* variables.css:34:3-31 */
border-top-style: solid; /* variables.css:39:3-46 */
border-top-width: 3px; /* variables.css:39:3-46 */
border-left-style: solid; /* variables.css:39:3-46 */
border-left-width: 3px; /* variables.css:39:3-46 */
border-bottom-style: solid; /* variables.css:39:3-46 */
border-bottom-width: 3px; /* variables.css:39:3-46 */
border-right-style: solid; /* variables.css:39:3-46 */
border-right-width: 3px; /* variables.css:39:3-46 */
border-top-color: rgb(255,0,0); /* variables.css:39:3-46 */
border-right-color: rgb(255,0,0); /* variables.css:39:3-46 */
border-bottom-color: rgb(255,0,0); /* variables.css:39:3-46 */
border-left-color: rgb(255,0,0); /* variables.css:39:3-46 */
border-image-source: none; /* variables.css:39:3-46 */
border-image-repeat: stretch; /* variables.css:39:3-46 */
border-image-slice: 100%; /* variables.css:39:3-46 */
border-image-width: 1; /* variables.css:39:3-46 */
--border1: 3px; /* variables.css:37:14-17 */
--border2: solid red; /* variables.css:38:14-23 */
--color1: initial; /* variables.css:33:13-20 */
color: rgb(0,128,0); /* variables.css:35:3-31 */
border-top-style: solid; /* variables.css:40:3-46 */
border-top-width: 3px; /* variables.css:40:3-46 */
border-left-style: solid; /* variables.css:40:3-46 */
border-left-width: 3px; /* variables.css:40:3-46 */
border-bottom-style: solid; /* variables.css:40:3-46 */
border-bottom-width: 3px; /* variables.css:40:3-46 */
border-right-style: solid; /* variables.css:40:3-46 */
border-right-width: 3px; /* variables.css:40:3-46 */
border-top-color: rgb(255,0,0); /* variables.css:40:3-46 */
border-right-color: rgb(255,0,0); /* variables.css:40:3-46 */
border-bottom-color: rgb(255,0,0); /* variables.css:40:3-46 */
border-left-color: rgb(255,0,0); /* variables.css:40:3-46 */
border-image-source: none; /* variables.css:40:3-46 */
border-image-repeat: stretch; /* variables.css:40:3-46 */
border-image-slice: 100%; /* variables.css:40:3-46 */
border-image-width: 1; /* variables.css:40:3-46 */
--border1: 3px; /* variables.css:38:3-18 */
--border2: solid red; /* variables.css:39:3-24 */
--color1: initial; /* variables.css:34:3-21 */
label.label-4:dir(ltr)
color: rgb(0,128,0); /* variables.css:45:3-30 */
background-color: rgb(128,0,128); /* variables.css:49:3-42 */
color: rgb(0,128,0); /* variables.css:46:3-30 */
background-color: rgb(128,0,128); /* variables.css:50:3-42 */
label.label-5:dir(ltr)
color: rgb(255,0,0); /* variables.css:55:3-30 */
background-color: rgb(0,128,0); /* variables.css:56:3-41 */
box-shadow: 0 0 3px rgb(0,128,0) inset; /* variables.css:81:3-50 */
--prop1: lol; /* variables.css:58:12-15 */
--prop10: var(--prop9) var(--prop9); /* variables.css:67:13-38 */
--prop11: var(--prop10) var(--prop10); /* variables.css:68:13-40 */
--prop12: var(--prop11) var(--prop11); /* variables.css:69:13-40 */
--prop13: var(--prop12) var(--prop12); /* variables.css:70:13-40 */
--prop14: var(--prop13) var(--prop13); /* variables.css:71:13-40 */
--prop15: var(--prop14) var(--prop14); /* variables.css:72:13-40 */
--prop16: var(--prop15) var(--prop15); /* variables.css:73:13-40 */
--prop17: var(--prop16) var(--prop16); /* variables.css:74:13-40 */
--prop18: var(--prop17) var(--prop17); /* variables.css:75:13-40 */
--prop19: var(--prop18) var(--prop18); /* variables.css:76:13-40 */
--prop2: var(--prop1) var(--prop1); /* variables.css:59:12-37 */
--prop20: var(--prop19) var(--prop19); /* variables.css:77:13-40 */
--prop3: var(--prop2) var(--prop2); /* variables.css:60:12-37 */
--prop4: var(--prop3) var(--prop3); /* variables.css:61:12-37 */
--prop5: var(--prop4) var(--prop4); /* variables.css:62:12-37 */
--prop6: var(--prop5) var(--prop5); /* variables.css:63:12-37 */
--prop7: var(--prop6) var(--prop6); /* variables.css:64:12-37 */
--prop8: var(--prop7) var(--prop7); /* variables.css:65:12-37 */
--prop9: var(--prop8) var(--prop8); /* variables.css:66:12-37 */
--test1: red; /* variables.css:54:12-15 */
color: rgb(255,0,0); /* variables.css:56:3-30 */
background-color: rgb(0,128,0); /* variables.css:57:3-41 */
box-shadow: 0 0 3px rgb(0,128,0) inset; /* variables.css:82:3-50 */
--prop1: lol; /* variables.css:59:3-16 */
--prop10: var(--prop9) var(--prop9); /* variables.css:68:3-39 */
--prop11: var(--prop10) var(--prop10); /* variables.css:69:3-41 */
--prop12: var(--prop11) var(--prop11); /* variables.css:70:3-41 */
--prop13: var(--prop12) var(--prop12); /* variables.css:71:3-41 */
--prop14: var(--prop13) var(--prop13); /* variables.css:72:3-41 */
--prop15: var(--prop14) var(--prop14); /* variables.css:73:3-41 */
--prop16: var(--prop15) var(--prop15); /* variables.css:74:3-41 */
--prop17: var(--prop16) var(--prop16); /* variables.css:75:3-41 */
--prop18: var(--prop17) var(--prop17); /* variables.css:76:3-41 */
--prop19: var(--prop18) var(--prop18); /* variables.css:77:3-41 */
--prop2: var(--prop1) var(--prop1); /* variables.css:60:3-38 */
--prop20: var(--prop19) var(--prop19); /* variables.css:78:3-41 */
--prop3: var(--prop2) var(--prop2); /* variables.css:61:3-38 */
--prop4: var(--prop3) var(--prop3); /* variables.css:62:3-38 */
--prop5: var(--prop4) var(--prop4); /* variables.css:63:3-38 */
--prop6: var(--prop5) var(--prop5); /* variables.css:64:3-38 */
--prop7: var(--prop6) var(--prop6); /* variables.css:65:3-38 */
--prop8: var(--prop7) var(--prop7); /* variables.css:66:3-38 */
--prop9: var(--prop8) var(--prop8); /* variables.css:67:3-38 */
--test1: red; /* variables.css:55:3-16 */
label.label-6:dir(ltr)
color: rgb(255,0,0); /* variables.css:88:3-31 */
-gtk-dpi: 96; /* variables.css:85:3-14 */
font-size: 13.333333333333334px; /* variables.css:85:3-14 */
-gtk-icon-palette: error rgb(255,255,255), success rgb(255,255,255), warning rgb(255,255,255); /* variables.css:85:3-14 */
background-color: rgba(0,0,0,0); /* variables.css:85:3-14 */
font-family: "Sans"; /* variables.css:85:3-14 */
font-style: normal; /* variables.css:85:3-14 */
font-weight: 400; /* variables.css:85:3-14 */
font-stretch: normal; /* variables.css:85:3-14 */
letter-spacing: 0; /* variables.css:85:3-14 */
text-decoration-line: none; /* variables.css:85:3-14 */
text-decoration-color: rgb(255,0,0); /* variables.css:85:3-14 */
text-decoration-style: solid; /* variables.css:85:3-14 */
text-transform: none; /* variables.css:85:3-14 */
font-kerning: auto; /* variables.css:85:3-14 */
font-variant-ligatures: normal; /* variables.css:85:3-14 */
font-variant-position: normal; /* variables.css:85:3-14 */
font-variant-caps: normal; /* variables.css:85:3-14 */
font-variant-numeric: normal; /* variables.css:85:3-14 */
font-variant-alternates: normal; /* variables.css:85:3-14 */
font-variant-east-asian: normal; /* variables.css:85:3-14 */
text-shadow: none; /* variables.css:85:3-14 */
box-shadow: none; /* variables.css:85:3-14 */
margin-top: 0; /* variables.css:85:3-14 */
margin-left: 0; /* variables.css:85:3-14 */
margin-bottom: 0; /* variables.css:85:3-14 */
margin-right: 0; /* variables.css:85:3-14 */
padding-top: 0; /* variables.css:85:3-14 */
padding-left: 0; /* variables.css:85:3-14 */
padding-bottom: 0; /* variables.css:85:3-14 */
padding-right: 0; /* variables.css:85:3-14 */
border-top-style: none; /* variables.css:85:3-14 */
border-top-width: 0; /* variables.css:85:3-14 */
border-left-style: none; /* variables.css:85:3-14 */
border-left-width: 0; /* variables.css:85:3-14 */
border-bottom-style: none; /* variables.css:85:3-14 */
border-bottom-width: 0; /* variables.css:85:3-14 */
border-right-style: none; /* variables.css:85:3-14 */
border-right-width: 0; /* variables.css:85:3-14 */
border-top-left-radius: 0; /* variables.css:85:3-14 */
border-top-right-radius: 0; /* variables.css:85:3-14 */
border-bottom-right-radius: 0; /* variables.css:85:3-14 */
border-bottom-left-radius: 0; /* variables.css:85:3-14 */
outline-style: none; /* variables.css:85:3-14 */
outline-width: 0; /* variables.css:85:3-14 */
outline-offset: 0; /* variables.css:85:3-14 */
background-clip: border-box; /* variables.css:85:3-14 */
background-origin: padding-box; /* variables.css:85:3-14 */
background-size: auto; /* variables.css:85:3-14 */
background-position: left top; /* variables.css:85:3-14 */
border-top-color: rgb(255,0,0); /* variables.css:85:3-14 */
border-right-color: rgb(255,0,0); /* variables.css:85:3-14 */
border-bottom-color: rgb(255,0,0); /* variables.css:85:3-14 */
border-left-color: rgb(255,0,0); /* variables.css:85:3-14 */
outline-color: rgb(255,0,0); /* variables.css:85:3-14 */
background-repeat: repeat; /* variables.css:85:3-14 */
background-image: none; /* variables.css:85:3-14 */
background-blend-mode: normal; /* variables.css:85:3-14 */
border-image-source: none; /* variables.css:85:3-14 */
border-image-repeat: stretch; /* variables.css:85:3-14 */
border-image-slice: 100%; /* variables.css:85:3-14 */
border-image-width: 1; /* variables.css:85:3-14 */
-gtk-icon-source: none; /* variables.css:85:3-14 */
-gtk-icon-size: 16px; /* variables.css:85:3-14 */
-gtk-icon-shadow: none; /* variables.css:85:3-14 */
-gtk-icon-style: requested; /* variables.css:85:3-14 */
-gtk-icon-transform: none; /* variables.css:85:3-14 */
-gtk-icon-filter: none; /* variables.css:85:3-14 */
border-spacing: 0 0; /* variables.css:85:3-14 */
transform: none; /* variables.css:85:3-14 */
transform-origin: center; /* variables.css:85:3-14 */
min-width: 0; /* variables.css:85:3-14 */
min-height: 0; /* variables.css:85:3-14 */
transition-property: all; /* variables.css:85:3-14 */
transition-duration: 0; /* variables.css:85:3-14 */
transition-timing-function: ease; /* variables.css:85:3-14 */
transition-delay: 0; /* variables.css:85:3-14 */
animation-name: none; /* variables.css:85:3-14 */
animation-duration: 0; /* variables.css:85:3-14 */
animation-timing-function: ease; /* variables.css:85:3-14 */
animation-iteration-count: 1; /* variables.css:85:3-14 */
animation-direction: normal; /* variables.css:85:3-14 */
animation-play-state: running; /* variables.css:85:3-14 */
animation-delay: 0; /* variables.css:85:3-14 */
animation-fill-mode: none; /* variables.css:85:3-14 */
opacity: 1; /* variables.css:85:3-14 */
filter: none; /* variables.css:85:3-14 */
caret-color: rgb(255,255,255); /* variables.css:85:3-14 */
-gtk-secondary-caret-color: rgb(255,255,255); /* variables.css:85:3-14 */
font-feature-settings: normal; /* variables.css:85:3-14 */
font-variation-settings: normal; /* variables.css:85:3-14 */
line-height: normal; /* variables.css:85:3-14 */
--color1: red; /* variables.css:2:13-16 */
color: rgb(255,0,0); /* variables.css:89:3-31 */
-gtk-dpi: 96; /* variables.css:86:3-14 */
font-size: 13.333333333333334px; /* variables.css:86:3-14 */
-gtk-icon-palette: error rgb(255,255,255), success rgb(255,255,255), warning rgb(255,255,255); /* variables.css:86:3-14 */
background-color: rgba(0,0,0,0); /* variables.css:86:3-14 */
font-family: "Sans"; /* variables.css:86:3-14 */
font-style: normal; /* variables.css:86:3-14 */
font-weight: 400; /* variables.css:86:3-14 */
font-stretch: normal; /* variables.css:86:3-14 */
letter-spacing: 0; /* variables.css:86:3-14 */
text-decoration-line: none; /* variables.css:86:3-14 */
text-decoration-color: rgb(255,0,0); /* variables.css:86:3-14 */
text-decoration-style: solid; /* variables.css:86:3-14 */
text-transform: none; /* variables.css:86:3-14 */
font-kerning: auto; /* variables.css:86:3-14 */
font-variant-ligatures: normal; /* variables.css:86:3-14 */
font-variant-position: normal; /* variables.css:86:3-14 */
font-variant-caps: normal; /* variables.css:86:3-14 */
font-variant-numeric: normal; /* variables.css:86:3-14 */
font-variant-alternates: normal; /* variables.css:86:3-14 */
font-variant-east-asian: normal; /* variables.css:86:3-14 */
text-shadow: none; /* variables.css:86:3-14 */
box-shadow: none; /* variables.css:86:3-14 */
margin-top: 0; /* variables.css:86:3-14 */
margin-left: 0; /* variables.css:86:3-14 */
margin-bottom: 0; /* variables.css:86:3-14 */
margin-right: 0; /* variables.css:86:3-14 */
padding-top: 0; /* variables.css:86:3-14 */
padding-left: 0; /* variables.css:86:3-14 */
padding-bottom: 0; /* variables.css:86:3-14 */
padding-right: 0; /* variables.css:86:3-14 */
border-top-style: none; /* variables.css:86:3-14 */
border-top-width: 0; /* variables.css:86:3-14 */
border-left-style: none; /* variables.css:86:3-14 */
border-left-width: 0; /* variables.css:86:3-14 */
border-bottom-style: none; /* variables.css:86:3-14 */
border-bottom-width: 0; /* variables.css:86:3-14 */
border-right-style: none; /* variables.css:86:3-14 */
border-right-width: 0; /* variables.css:86:3-14 */
border-top-left-radius: 0; /* variables.css:86:3-14 */
border-top-right-radius: 0; /* variables.css:86:3-14 */
border-bottom-right-radius: 0; /* variables.css:86:3-14 */
border-bottom-left-radius: 0; /* variables.css:86:3-14 */
outline-style: none; /* variables.css:86:3-14 */
outline-width: 0; /* variables.css:86:3-14 */
outline-offset: 0; /* variables.css:86:3-14 */
background-clip: border-box; /* variables.css:86:3-14 */
background-origin: padding-box; /* variables.css:86:3-14 */
background-size: auto; /* variables.css:86:3-14 */
background-position: left top; /* variables.css:86:3-14 */
border-top-color: rgb(255,0,0); /* variables.css:86:3-14 */
border-right-color: rgb(255,0,0); /* variables.css:86:3-14 */
border-bottom-color: rgb(255,0,0); /* variables.css:86:3-14 */
border-left-color: rgb(255,0,0); /* variables.css:86:3-14 */
outline-color: rgb(255,0,0); /* variables.css:86:3-14 */
background-repeat: repeat; /* variables.css:86:3-14 */
background-image: none; /* variables.css:86:3-14 */
background-blend-mode: normal; /* variables.css:86:3-14 */
border-image-source: none; /* variables.css:86:3-14 */
border-image-repeat: stretch; /* variables.css:86:3-14 */
border-image-slice: 100%; /* variables.css:86:3-14 */
border-image-width: 1; /* variables.css:86:3-14 */
-gtk-icon-source: none; /* variables.css:86:3-14 */
-gtk-icon-size: 16px; /* variables.css:86:3-14 */
-gtk-icon-shadow: none; /* variables.css:86:3-14 */
-gtk-icon-style: requested; /* variables.css:86:3-14 */
-gtk-icon-transform: none; /* variables.css:86:3-14 */
-gtk-icon-filter: none; /* variables.css:86:3-14 */
border-spacing: 0 0; /* variables.css:86:3-14 */
transform: none; /* variables.css:86:3-14 */
transform-origin: center; /* variables.css:86:3-14 */
min-width: 0; /* variables.css:86:3-14 */
min-height: 0; /* variables.css:86:3-14 */
transition-property: all; /* variables.css:86:3-14 */
transition-duration: 0; /* variables.css:86:3-14 */
transition-timing-function: ease; /* variables.css:86:3-14 */
transition-delay: 0; /* variables.css:86:3-14 */
animation-name: none; /* variables.css:86:3-14 */
animation-duration: 0; /* variables.css:86:3-14 */
animation-timing-function: ease; /* variables.css:86:3-14 */
animation-iteration-count: 1; /* variables.css:86:3-14 */
animation-direction: normal; /* variables.css:86:3-14 */
animation-play-state: running; /* variables.css:86:3-14 */
animation-delay: 0; /* variables.css:86:3-14 */
animation-fill-mode: none; /* variables.css:86:3-14 */
opacity: 1; /* variables.css:86:3-14 */
filter: none; /* variables.css:86:3-14 */
caret-color: rgb(255,255,255); /* variables.css:86:3-14 */
-gtk-secondary-caret-color: rgb(255,255,255); /* variables.css:86:3-14 */
font-feature-settings: normal; /* variables.css:86:3-14 */
font-variation-settings: normal; /* variables.css:86:3-14 */
line-height: normal; /* variables.css:86:3-14 */
--color1: red; /* variables.css:2:3-17 */
--not-a-color: 20px; /* variables.css:3:3-23 */
label.label-7:dir(ltr)
color: rgb(255,0,0); /* variables.css:93:3-39 */
background-color: rgb(255,0,0); /* variables.css:95:3-25 */
--color1: red; /* variables.css:2:13-16 */
color: rgb(255,0,0); /* variables.css:94:3-39 */
background-color: rgba(0,0,0,0); /* variables.css:101:3-40 */
--color1: red; /* variables.css:2:3-17 */
--not-a-color: 20px; /* variables.css:3:3-23 */
label.label-8:dir(ltr)
color: rgb(255,192,203); /* variables.css:130:3-31 */
background-color: rgb(255,255,0); /* variables.css:133:3-42 */
box-shadow: 0 0 3px rgb(255,255,0) inset; /* variables.css:136:3-50 */
padding-left: 1px; /* variables.css:118:3-19 */
padding-right: 10px; /* variables.css:119:3-20 */
transition-duration: 4s; /* variables.css:140:3-45 */
animation-name: test; /* variables.css:125:3-39 */
animation-duration: 10s; /* variables.css:125:3-39 */
animation-timing-function: linear; /* variables.css:125:3-39 */
animation-iteration-count: infinite; /* variables.css:125:3-39 */
animation-direction: normal; /* variables.css:125:3-39 */
animation-delay: 0; /* variables.css:125:3-39 */
animation-fill-mode: none; /* variables.css:125:3-39 */
color: rgb(255,0,0); /* variables.css:136:3-31 */
background-color: rgb(0,0,255); /* variables.css:139:3-42 */
box-shadow: 0 0 3px rgb(255,255,0) inset; /* variables.css:142:3-50 */
padding-left: 1px; /* variables.css:124:3-19 */
padding-right: 10px; /* variables.css:125:3-20 */
transition-duration: 5s; /* variables.css:146:3-45 */
animation-name: test; /* variables.css:131:3-39 */
animation-duration: 10s; /* variables.css:131:3-39 */
animation-timing-function: linear; /* variables.css:131:3-39 */
animation-iteration-count: infinite; /* variables.css:131:3-39 */
animation-direction: normal; /* variables.css:131:3-39 */
animation-delay: 0; /* variables.css:131:3-39 */
animation-fill-mode: none; /* variables.css:131:3-39 */
--duration: 2s;
--duration2: var(--duration, 4s); /* variables.css:139:16-35 */
--duration2: var(--duration, 4s); /* variables.css:145:3-36 */
--padding-right: 10px;
--padding1: 1px; /* variables.css:121:15-18 */
--padding2: 2px; /* variables.css:122:15-18 */
--padding1: 1px; /* variables.css:127:3-19 */
--padding2: 2px; /* variables.css:128:3-19 */
--test1: red;
--test2: blue;

View File

@@ -215,28 +215,24 @@ test_transition (gconstpointer data)
GtkCssValue *result;
GtkStyleProvider *provider;
GtkCssStyle *style;
GtkCssComputeContext context = { NULL, };
provider = GTK_STYLE_PROVIDER (gtk_settings_get_default ());
style = gtk_css_static_style_get_default ();
context.provider = provider;
context.style = style;
prop = (GtkStyleProperty *)_gtk_css_style_property_lookup_by_id (test->prop);
value1 = value_from_string (prop, test->value1);
g_assert_nonnull (value1);
computed1 = _gtk_css_value_compute (value1, test->prop, &context);
computed1 = _gtk_css_value_compute (value1, test->prop, provider, style, NULL, NULL);
value2 = value_from_string (prop, test->value2);
g_assert_nonnull (value2);
computed2 = _gtk_css_value_compute (value2, test->prop, &context);
computed2 = _gtk_css_value_compute (value2, test->prop, provider, style, NULL, NULL);
if (test->value3)
{
value3 = value_from_string (prop, test->value3);
computed3 = _gtk_css_value_compute (value3, test->prop, &context);
computed3 = _gtk_css_value_compute (value3, test->prop, provider, style, NULL, NULL);
}
else
{

View File

@@ -110,7 +110,6 @@ gdk_array(test_splice) (void)
#undef gdk_array_paste
#undef gdk_array
#undef GDK_ARRAY_REAL_SIZE
#undef GDK_ARRAY_MAX_SIZE
#undef GDK_ARRAY_ELEMENT_TYPE
#undef GDK_ARRAY_NAME