Now that we are not allocating treeview column buttons anymore
with invisible headers, we can't rely on their allocations for
other things like cell area computations anymore. Use x-offset
and width of the column directly, instead.
GtkDialog changes its size depending on style properties. If
we only do this in response to ::style-updated, it happens during
the initial realization of the dialog and leads to the dialog
'growing' between when we determine the initial window size and
when we allocate it that size. So, do this beforehand.
It's useful to set a slice size != border-width, as backgrounds are
clipped to border-width too.
As slices can be half-transparent and overlap the background,
this would not fill the border box properly if we only use a single
property for specifying the width.
Also, this brings us even closer to CSS3.
It's a custom property with the same semantics of text-shadow, which
works on icons and icon-like UI elements, such as spinners, arrows and
separators.
It's an entry, so it already has a background below, even when the entry
doesn't have a frame. Also, gtk_spin_button_draw_arrow() will render a
background and a frame in the arrow space anyway.
NULL is a valid value for border-image, so if it's NULL when unpacking,
don't try to access the struct fields, but just init the GValues for the
unpacked parameters.
This functionality adds a new 'Printer Profile' entry to the 'Color' page in the
UNIX print dialog if colord support is enabled.
This shows the user what color profile will be used for the settings they have
selected, and if no profile or the default profile is going to be used.
We are deliberately not allowing the user to _change_ the selected profile, as
the ICC profile is an implementation detail, and we should not change the other
print settings based on the characterization state.
The OpenICC group broadly recommend showing the profile that is used, so that
power users can be sure the correct profile is being used at the right time.
Normal users won't care, as they don't know how horrible the color match is
without profiling the printer and media.
Tests that border-image-repeat is rendered correctly.
The reftest is done via toolbars stuffed into a GtkFixed using
background-image and images tuned for it.
The new code is smaller, less crashy and correct(er), but arguably more
complex. I'd have liked to make it simpler, but this border image
algorithm is complex...
It's not useful to cache these surfaces here, as the GtkBorderImage will
be always generated on the fly, being a shorthand property.
This also allows to get rid of the intermediate image surfaces for
rendering the slices; we now use cairo_surface_create_for_rectangle()
to proxy the slices from the source surface to the rendered area, which
should also yield better performance.
It's composed by
- border-image-source: a cairo_pattern_t holding an image from file or a
gradient
- border-image-slice: a GtkBorder containing the slice offsets to apply
on the image
- border-image-repeat: a GtkRepeatType for the image
We deviate from pure CSS3 in the following ways:
* border-image-width is assumed to be always 1, i.e. always equal to
what's specified by border-width. I don't think it's a particularly
useful property to have, but we could add it later if needed.
* border-image-outset is absent, as we can't render outside of the
allocation yet.
https://bugzilla.gnome.org/show_bug.cgi?id=651194