Commit Graph

28099 Commits

Author SHA1 Message Date
Emmanuele Bassi
51010da740 Use gtk_show_uri_on_window() in GtkLabel
Avoid the deprecated gtk_show_uri(), and allow activating link in
sandboxed applications.

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Bastien Nocera
0875aa56ba GtkMountOperation: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Bastien Nocera
76dfef6257 gtk: Ignore gtk_show_uri() deprecation warnings
https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Bastien Nocera
c358383d6c GtkLinkButton: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Bastien Nocera
d2c1e6faff GtkAboutDialog: We use gtk_show_uri_on_window() by default
Not gtk_show_uri().

https://bugzilla.gnome.org/show_bug.cgi?id=778726
2017-02-16 16:37:55 +01:00
Daniel Boles
02e9fb5a78 widget: Document signal mnemonic-activate
Name the extra bool argument, and move the explanatory paragraph from
the emitting method to the signal, with some minor tweaks to wording.

https://bugzilla.gnome.org/show_bug.cgi?id=778534
2017-02-15 21:44:29 +00:00
Bastien Nocera
22ea1a535e gtkshow: Prefer gtk_show_uri_on_window() which works for sandboxed apps
gtk_show_uri_on_window() will pass enough information for Portal helpers
to allow dialogue parenting in Flatpak, gtk_show_uri() won't, so
deprecate it.

https://bugzilla.gnome.org/show_bug.cgi?id=778678
2017-02-15 16:33:01 +01:00
Timm Bäder
4e141883e8 iconhelper: Remove unused _draw implementation 2017-02-14 16:56:55 +01:00
Timm Bäder
08355997c2 snapshot: Avoid a double-free
We can't pass the same string to two different snapshot states since
removing one of them will free the passed string, so just create another
one for the second state.
2017-02-14 16:56:55 +01:00
Timm Bäder
6a6b6549ea widget: Remove get_preferred_width/height mention in warning 2017-02-14 16:56:55 +01:00
Timm Bäder
1fcbc5b9e9 gtkcontainerprivate: Remove unused function prototypes 2017-02-14 16:56:55 +01:00
Timm Bäder
ec2ce26d82 colorbutton: Inherit from GtkWidget 2017-02-14 16:56:55 +01:00
Lapo Calamandrei
c4524623a9 HC: insensitive styling for views. 2017-02-08 21:32:47 -05:00
Lapo Calamandrei
6eb9b57e72 adwaita: insensitive styling for views
Add an insensitive style to views, somehow we didn't ship one, so
for example, disabled textviews looked the same as sensitive ones.
2017-02-08 21:32:33 -05:00
Timm Bäder
78a36cf4bb popover: Simplify gtk_popover_measure 2017-02-05 15:03:35 +01:00
Timm Bäder
07643764a6 infobar: Use GtkButton:icon-name 2017-02-05 15:03:35 +01:00
Timm Bäder
3b1601f8ad colorchooserwidget: Show palette by default
Restore the old behavior.
2017-02-05 15:03:35 +01:00
Michael Catanzaro
3905726627 notebook: redraw arrows after closing a tab
Thanks to Daniel Boles for helping with a crash in an earlier version of
this patch.

https://bugzilla.gnome.org/show_bug.cgi?id=777547
2017-02-04 12:57:08 -06:00
Timm Bäder
f251c5bf94 spinbutton: Fix right and middle click on +/- buttons
Tell the gesture that we handle all buttons and actually claim the
gesture in the ::pressed handler
2017-02-01 21:05:27 +01:00
Daniel Boles
2f2ec4fec8 searchentry: Fix typo in documentation 2017-01-31 09:39:39 +00:00
Timm Bäder
2f6d60d6af stack: Fix node position during crossfade 2017-01-30 18:11:15 +01:00
Timm Bäder
2aea8dfee9 togglebutton: Move :inconsistent to GtkCheckButton 2017-01-30 18:11:00 +01:00
Timm Bäder
66d584ce6e togglebutton: Move :draw-indicator property to GtkCheckButton
It's not used in GtkToggleButton at all, only in GtkCheckButton and
GtkRadioButton.
2017-01-30 18:11:00 +01:00
Timm Bäder
1a0577b3f4 checkbutton: Remove unused vfunc 2017-01-30 18:11:00 +01:00
Timm Bäder
eb0c5a6a6c checkbutton: Remove unused function prototype 2017-01-30 18:11:00 +01:00
Timm Bäder
6c6ed7496c widget: Remove gtk_widget_class_list_style_properties
Unused.
2017-01-30 18:11:00 +01:00
Timm Bäder
de56947e86 gtkbuilder: Remove unused struct 2017-01-30 18:11:00 +01:00
Timm Bäder
c82fee4882 build: Stop compressing ui files
It's slower at runtime. Instead, strip blanks.
2017-01-30 18:11:00 +01:00
Piotr Drąg
bfaed659f1 Fix translator comments
They need to be exactly one line above a string to show up in .po files.
2017-01-28 01:13:12 +01:00
Michael Catanzaro
03c026e6b6 Revert "notebook: redraw arrows after closing a tab"
This reverts commit 218beb2ef4.
2017-01-27 08:54:24 -06:00
Michael Catanzaro
218beb2ef4 notebook: redraw arrows after closing a tab
https://bugzilla.gnome.org/show_bug.cgi?id=777547
2017-01-24 08:33:35 -06:00
Timm Bäder
572639fed7 widget: Remove gtk_widget_get_preferred_size mention from docs
Mention gtk_widget_measure instead.
2017-01-22 15:01:53 +01:00
Timm Bäder
82e49952e5 flowbox: Measure child widget sizes using gtk_widget_measure 2017-01-22 15:01:40 +01:00
Timm Bäder
f05402ce2b widget: Remove warning about already visible widgets
That was just added by mistake of course.
2017-01-22 14:48:28 +01:00
Timm Bäder
56a58655fe Remove unnecessary gtk_widget_show calls 2017-01-22 14:38:21 +01:00
Timm Bäder
dc904ffaf9 gtkfontbutton: hexpand the font label
To restore the previous look.
2017-01-22 14:38:21 +01:00
Daniel Boles
90b9dc458f combobox: Stop pointlessly NULL-checking the menu
We now have a valid menu to use at all times.
2017-01-21 21:34:46 +00:00
Daniel Boles
8c980445e3 combobox: Move area and menu to .ui file
Now that priv->area is guaranteed to be constructed by us, and not
passed in by a user, we can move it to the .ui file and stop manually
managing its lifetime altogether. And once the area is there, we can
move the menu there too (and stop pointlessly destroying/rebuilding it).
2017-01-21 21:34:46 +00:00
Daniel Boles
439fcf7578 combobox: Remove property cell-area
The CellArea is going to become a pure implementation detail & be moved
to the .ui, instead of letting users mess with it (if anyone ever did).
2017-01-21 21:34:45 +00:00
Daniel Boles
36413a8eca combobox: Reuse code rather than reimplementing it
We already have cell_layout_is_sensitive() to get whether at least one
cell in a Layout is sensitive, which we need because CellLayout/View
do not implement foreach(). So, since we wrote that, we can use it to
check our CellArea too, instead of doing foreach with a custom callback.
2017-01-21 19:00:10 +00:00
Daniel Boles
c7e4c82df4 combobox: some code cleanups
* Merge adjacent if statements with the same condition
 * Add a space between a function and its declaration
2017-01-21 18:59:27 +00:00
Daniel Boles
c5c0127e10 menushell: Fix select_last() to get last, not 1st
It was broken in the same way as select_first(), as explained in
commit a5211adb22
2017-01-21 18:55:46 +00:00
Daniel Boles
c662e691ed combobox: Fix documentation typo bx => box 2017-01-21 16:13:44 +00:00
Daniel Boles
a5211adb22 menushell: Make select_first() do that, not last…
It was looping over all items, not breaking out when it found the first
selectable one, and then selecting the _last_ selectable one (if any)
found. So, it did exactly the opposite of its name. This made me quite
baffled when opening a submenu with right-arrow put me at its last item.

Originally, the loop set to_select and broke if the current item was
selectable and not tear-off, meaning that it would correctly select the
first suitable item. However, when tear-off functionality was removed
in commit 4ed9452e90, so was the break.
2017-01-21 15:50:54 +00:00
Piotr Drąg
e47bd31e6a Fix CSS spelling in a translatable string 2017-01-20 23:46:38 +01:00
Daniel Boles
71d7a1b3d0 menushell: Don’t dereference before typechecking 2017-01-20 22:15:42 +00:00
Daniel Boles
802f838aa0 combobox: If typechecking, don’t reference before 2017-01-20 21:08:58 +00:00
Timm Bäder
ab051fd53f Don't hide windows and popovers in init()
Instead, don't make them visible in gtk_widget_init in the first place.
2017-01-20 21:51:05 +01:00
Timm Bäder
b1408c9694 fontbutton: Be a GtkWidget 2017-01-20 21:51:03 +01:00
Timm Bäder
6376aaf44b assistant: Don't forget to remove child widgets 2017-01-20 21:50:02 +01:00
Timm Bäder
0f2e043c3d toolitemgroup: Properly remove internal child widget
We now need to use gtk_widget_unparent and can't just destroy it.
2017-01-20 21:50:02 +01:00
Timm Bäder
4bd2a9bca9 popovermenu: Remove forall implementation 2017-01-20 21:50:02 +01:00
Timm Bäder
3fb4b079e1 button: Don't explicitly show child widgets 2017-01-20 21:50:02 +01:00
Timm Bäder
c36ad400fa recorder: Adapt to widget visibility changes
We now need to explicitly hide the details label.
2017-01-20 21:50:02 +01:00
Timm Bäder
3ec15d98fa Fix some widget visibility fallout 2017-01-20 21:37:08 +01:00
Timm Bäder
f4341ee9f7 widget: Remove show-all property
Doesn't make sense anymore now that gtk_widget_show_all is gone.
2017-01-20 21:37:07 +01:00
Timm Bäder
ea897c6df4 Remove gtk_widget_show_all 2017-01-20 21:37:04 +01:00
Timm Bäder
13b001b77c widget: Remove show_all vfunc 2017-01-20 21:33:38 +01:00
Timm Bäder
5f57e3b711 filechooserbutton: Be a GtkWidget
Instead of subclassing GtkBox to have 2 child widgets, subclass
GtkWidget and only render one of them.
2017-01-20 21:33:38 +01:00
Timm Bäder
d862c5c6df sizerequest: Use gtk_widget_measure to measure widget sizes 2017-01-20 21:33:38 +01:00
Timm Bäder
9679c4f0e0 gtkbuilder: Improve error messages 2017-01-20 21:33:37 +01:00
Timm Bäder
2a84be4ae5 shortcutswindow: Unset search_bar in dispose
And check for null-ness in unmap. This prevents a crash when the window
is first disposed and then unmapped.
2017-01-20 21:33:37 +01:00
Timm Bäder
5dbf8458f5 shortcutswindow: Use GtkButton:icon-name for search button 2017-01-20 21:33:37 +01:00
Timm Bäder
524bf22db7 shortcutsshortcut: Be a GtkWidget
Instead of subclassing GtkBox and overriding _add to not work, subclass
GtkWidget and add a normal GtkBox as a child widget.
2017-01-20 21:33:37 +01:00
Timm Bäder
8085884277 gtkshortcutswindow: Adapt to GtkWidget visibility changes 2017-01-20 21:33:37 +01:00
Timm Bäder
02c2887772 filechooser: adapt to GtkWidget:visible changes 2017-01-20 21:33:37 +01:00
Timm Bäder
b1eccd770e coloreditor: Hide overlay boxes 2017-01-20 21:33:37 +01:00
Timm Bäder
33d41fccdd Hide popovers and toplevels by default 2017-01-20 21:33:37 +01:00
Timm Bäder
fee788cd4a widget: Be visible by default 2017-01-20 21:33:36 +01:00
Daniel Boles
360fbd0920 combobox: popdown() the menu during unmap()
combo_box_popdown() currently skips popping down our menu if it is NULL.
But the required call to this at end-of-life was in destroy(), by which
point dispose() already NULLed the menu, so Menu::popdown() would never
run, even if it should. Fix this by trying popdown() earlier in unmap().
Also, add a converse assurance that we don’t popup() while not mapped.

Even once we remove all the now-pointless NULL checks, destroy() was the
wrong place to call combo_box_popdown(), and unmap() is the right place.
2017-01-20 13:47:26 +00:00
Chun-wei Fan
3629def0d0 gtkmain: Fix build on Windows
gtk_init() removed its support for supporting arguments, so we ought to do
likewise for Windows, which actually defines items that call gtk_init()
the old way (and also get rid of argument support in those functions,
since the direction is to not support them).

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-01-20 19:50:02 +08:00
Benjamin Otte
f8b6831c98 gtk: Register GSK resources at startup
That way they show up in the resource list in the inspector even when
running with the Cairo renderer.
2017-01-20 01:19:02 +01:00
Daniel Boles
68824e80fd combobox: Remove dead code & unneeded type checks
Commit fdc0c6426b removed the appears-as-
list style property, & hence the ability to put the ComboBox into list
mode – but it left behind a pile of hijinks that were only used in said
mode & so were now doing absolutely nothing. This commit deletes those.

While doing that, I got carried away…so this also stops pointlessly type
checking popup_widget, as that can never be anything but a GtkTreeMenu.
It still checks for NULL everywhere, which shouldn’t be needed, but (A)
this commit is already too big, & (B) simply removing such checks where
they _seem_ unnecessary causes bad times. I’ll puzzle through that later
2017-01-19 23:50:09 +00:00
Daniel Boles
c790724469 combobox: Make wrap-width and grid mode work again
Commit fdc0c6426b for removing (partly!)
appears-as-list also deleted the code that propagated wrap-width to the
TreeMenu and thus put us into “grid mode”. This restores that code.

And as Benjamin noted, calling check_appearance() here is wrong, so bye.
2017-01-19 22:08:45 +00:00
Matthias Clasen
2c7e567f05 Update callers
Adapt all our tests and examples to the new initialization api.
2017-01-19 13:50:17 -05:00
Matthias Clasen
7a13715736 Drop arguments from gtk_init
This is our ultimate goal: no more commandline argument handling.
Lots of callers will have to be updated.
2017-01-19 13:21:12 -05:00
Matthias Clasen
f2ee897009 Simplify initialization code
Now that gtk_get_option_group and gtk_parse_args are no longer
public, we can get rid of them.
2017-01-19 13:21:12 -05:00
Matthias Clasen
64b40c65ae Drop the --gtk-debug and --gtk-no-debug options
We have environment variables that cover this.
2017-01-19 13:21:12 -05:00
Matthias Clasen
4cfcca7997 Drop the --g-fatal-warnings argument
We don't need it, GLib has an environment variable for this.
2017-01-19 13:21:12 -05:00
Matthias Clasen
9c52f6b3ca Drop the --gtk-modules argument
We don't need it; the environment variable is enough.
2017-01-19 13:21:12 -05:00
Matthias Clasen
63d6e2d8e2 Don't export gtk_get_option_group
We want to get rid of commandline option handling in GTK+.
This is a step in that direction.
2017-01-19 13:21:12 -05:00
Matthias Clasen
42fd5a0b8b Stop exporting gtk_parse_args
We want to stop handling commandline arguments, and that is the
sole purpose of this function. So it has to go
2017-01-19 13:21:12 -05:00
Matthias Clasen
7e8eb3ddcd Drop gtk_init_with_args
We want to simplify our initialization code and remove all commandline
argument handling from it. The first stop for this is to reduce the
number of gtk_init variants we have.
2017-01-19 13:21:12 -05:00
Daniel Boles
94ae322f65 combobox: Avoid a pointless assignment
Don’t get the active item pointer before the grid/non-grid conditional,
because if we’re in grid mode, we re-get it before selecting it anyway.
2017-01-19 03:31:52 +00:00
Daniel Boles
c83ead5eea combobox: Also preselect active item in grid popup
i.e. when wrap-width > 0. This was only being done for non-grid cases.
So, ComboBoxes in grid mode did not indicate their selection when popped
up and required users to keynav from ‘nothing’ (at the top-left) to the
item they wanted to select. By selecting the active item in advance, now
it’s highlighted & acts as the starting point for keynav around the grid
2017-01-19 03:18:08 +00:00
Daniel Boles
494a38504b scale: Really fix documentation of set_digits()
This previously only mentioned its effect on the displayed value, and
even after the previous commit, its rounding of the actual value upon
change still reads like too much of an afterthought. Worse, it wasn’t
mentioned at all in the doc for the @digits parameter. Change this to
emphasise rounding always occurs and the displayed value is secondary.
2017-01-19 00:45:32 +00:00
Daniel Boles
0776bd438b scale: doc: set_digits doesn’t round retroactively
Whether it should is an open question, but for now, the documentation
should clearly indicate that currently rounding is only applied upon
changes to the value, not to the existing value when ::digits changes.
This is already clear in the doc for the underlying Range::round-digits.

https://bugzilla.gnome.org/show_bug.cgi?id=358970
2017-01-19 00:17:56 +00:00
Daniel Boles
d9dd312752 Scale: Always sync ::digits to Range::round-digits
The documents state that gtk_scale_set_digits() “causes the value of the
adjustment to be rounded off to this number of digits, so the retrieved
value matches the value the user saw.” Note the lack of any condition.

But in fact, if draw-value was false, rounding was disabled on the base
Range, so values that weren’t displayed weren’t rounded. This made the
docs wrong and made an apparently cosmetic detail alter functionality.

Fix by ensuring the number of digits set on Scale is always propagated
along to gtk_range_set_round_digits(), thus rounding to it in all cases
when the value changes, regardless of whether the value is displayed.

This doesn’t address the other idea from Bugzilla: that changing the
number of digits should clamp the _existing_ value if it’s more precise.
This contradicts digits docs in the base Range, but the above from Scale
can be read as implying it’ll happen. For now, that’s an open question.

https://bugzilla.gnome.org/show_bug.cgi?id=358970
2017-01-19 00:17:56 +00:00
Daniel Boles
e4ede33a65 combobox: Work around popup handler altering model
GtkFileChooserButton installs a handler for the popped-up signal, which
refilters the menu, in order to hide the “(None)” item from the popup
if it was previously selected in the ComboBox. This oddity means that:

 • Until recently, this item would be selected in the menu shell, which
   would then be popped up and change the selection away from that item.
   This was therefore redundant (more on which below!) but benign.

 • After the patch for https://bugzilla.gnome.org/show_bug.cgi?id=771242
   however, this causes a critical assertion fail, as now we stash the
   originally selected item in a pointer so that it can be selected only
   after realisation/popup – but by that stage, the model has just been
   refiltered and the previous pointer no longer refers to a valid item.

This commit works around this problem by, after popping up the menu,
getting the active item again, in case a popped-up handler has gone and
invalidated the pointer to the active item that we saved before popup.

If a handler does this, everything done to find/use the original item is
pointless. But this avoids the ugly critical in FileChooserButton, while
not harming every other ComboBox that doesn’t mess with its model while
popping up (hopefully the vast majority), and it’s very difficult to
imagine a way to check if the active item is /going to/ be hidden later)
2017-01-18 22:24:24 +00:00
Daniel Boles
7a5c995fd4 combobox: Don’t select active item if it’s hidden
I hope no one ever actually brings such a silly item into this world,
but this achieves symmetry with the similar checks immediately after.
2017-01-18 22:24:24 +00:00
Daniel Boles
2e973cedc9 combobox: Move variables into narrowest scopes 2017-01-18 22:24:24 +00:00
Benjamin Otte
fb47a8d714 css: Remove deprecated number-as-pixels compatibility
Previously, for compatibility with GTK 3.0, we allowed specifying
numbers without units and interpreted them as pixels, even when the CSS
specification didn't.

Remove that now that we can break API.
2017-01-18 04:13:56 +01:00
Matthias Clasen
95834ad1e1 Revert "filechooser portal: Make sure we can save"
This reverts commit 4875c689a0.

This was a thinko. Writable is not actually settable from the
application side, but only for the user, from the backend side.
2017-01-17 14:14:44 -05:00
Matthias Clasen
4875c689a0 filechooser portal: Make sure we can save
Explicitly request files for saving to be writable, otherwise
we are at the mercy of the portal, which currently gets it wrong.
2017-01-17 14:09:55 -05:00
Timm Bäder
239f14cc96 switch: Fix build
Partial revert of 2b6b5c1c8f, which
removed a little too much.
2017-01-16 21:01:59 +01:00
Timm Bäder
2b6b5c1c8f switch: Remove some unused code 2017-01-16 18:17:28 +01:00
Timm Bäder
ca889b6e21 gtkentryprivate: Remove unused prototype 2017-01-16 17:23:01 +01:00
Timm Bäder
28a3dd539d scalebutton: Use GtkButon:icon-name in the ui file 2017-01-16 17:22:53 +01:00
Timm Bäder
3cfcbe2ccf spinbutton: Restore gtk3 focus behavior
Focus the spinbutton on button press, never focus the buttons.
2017-01-16 17:22:45 +01:00
Timm Bäder
132f2721ce inspector: Use GtkButton:icon-name in ui files 2017-01-16 17:22:38 +01:00
Timm Bäder
f4afa000a1 entry: Remove unused struct member 2017-01-16 17:22:29 +01:00
Daniel Boles
5e816f7283 grid: Fix plural error in docs' @Short_description 2017-01-15 20:37:49 +00:00
Benjamin Otte
87497ca2e1 snapshot: Rename gtk_snapshot_translate_2d()
It's now called gtk_snapshot_offset().
2017-01-13 14:37:48 +01:00
Benjamin Otte
6055028c96 snapshot: Rename append APIs
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
2017-01-13 04:46:09 +01:00
Benjamin Otte
e5e5beafa5 cssimage: Fallback images have no aspect ratio
The aspect ratio for fallback image was incorrectly set to 1.

Reftest is included.
2017-01-13 03:38:36 +01:00
Benjamin Otte
a06b1ea1ba cssimage: Scale images to contain, not cover
Images with just an aspect ratio, but without a size, should be scaled
to be fully visible in the given area.
But we scaled them to completely cover the given area, which made them
partially invisible.

Reftest included.
2017-01-13 03:38:36 +01:00
Benjamin Otte
b58de2d16c snapshot: Redo pop() API
gtk_snapshot_pop() => removed
gtk_snapshot_pop_and_append() => gtk_snapshot_pop()

So now there is no way to get a rendernode out of the snapshotting API
until you gtk_snapshot_finish().
2017-01-13 03:38:36 +01:00
Benjamin Otte
bc3ba68641 snapshot: Add gtk_snapshot_push_blend()
and use it for backgrounds.
2017-01-13 03:38:36 +01:00
Benjamin Otte
4668e6dc63 stack: Build stored render node with custom Snapshot object
This is in preparation for API changes in GtkSnapshot.
2017-01-13 03:38:36 +01:00
Benjamin Otte
d9b0685b49 Add gtk_snapshot_push_cross_fade()
... and use it.

The function is a bit awkward because it requires 2 calls to
gtk_snapshot_pop(), but once you accept that, it's very convenient to
use, as can be seen by the 2 implementations.
2017-01-13 03:38:36 +01:00
Matthias Clasen
3024956df1 about dialog: Add a "system" tab
This is a free-form tab that can contain information about the
system environment. To see it, set GtkAboutDialog::system-information
to a non-NULL value.

https://bugzilla.gnome.org/show_bug.cgi?id=776604
2017-01-12 15:29:56 -05:00
Timm Bäder
e08918cce0 actionbar: Notify when :revealed changes 2017-01-12 15:14:25 +01:00
Timm Bäder
db12128d35 infobar: Fix copy&paste error in documentation
Of course you shouldn't call gtk_dialog_response on a GtkInfoBar.
2017-01-12 09:18:55 +01:00
Timm Bäder
1bb4f1e9d9 infobar: Add :revealed property 2017-01-12 09:16:02 +01:00
Timm Bäder
e3871c4424 infobar: Keep GParamSpecs around
So we can use them in notify_by_pspec
2017-01-12 09:13:38 +01:00
Benjamin Otte
b8371a1d61 shortcutswindow: Make dispose work properly 2017-01-11 18:33:09 +01:00
Alexander Larsson
c00f8dce9f GtkSnapshot: Always use int for the translation
We already take ints when setting the translation, so it can't
currently take any other values. Additionally, I was seeing large
costs in int -> double -> int for the rects in
gtk_snapshot_clips_rect(), as all callers really are ints (widget
allocations) and the clip region is int-based.

This change completely cleared a 2% rectangle_init_from_graphene from
the profile and is likely to have nice performance effects elsewhere
too.
2017-01-11 16:14:03 +01:00
Alexander Larsson
275185d415 widget: Avoid typechecks when accessing ->clip and ->allocation 2017-01-11 15:30:30 +01:00
Alexander Larsson
8cabfef9c9 GtkCSSImage: Avoid some type checks
The width/height/aspect getters are called a lot, and almost all
callers already verify it from _gtk_css_image_get_concrete_size (),
so just skip these checks.
2017-01-11 15:28:35 +01:00
Alexander Larsson
7bee22bcb6 Avoid some more type checks for internal calls 2017-01-11 15:27:51 +01:00
Alexander Larsson
68a27a9951 gtkcssgadget: Use private non-checking versions of gtk_widget calls
This avoids a lot of checking overhead.
2017-01-11 12:05:44 +01:00
Alexander Larsson
6341fab985 GtkSnapshot: Reuse snapshot state objects
Rather than allocate new ones all the time we reuse the previous ones.
We just clear them and save them in the parent for later reuse.
2017-01-11 11:41:46 +01:00
Alexander Larsson
f67ae85b7a GtkSnapshot: Move collect data to a union in the state
This means we allocate the collect data with the state, avoiding
an extra allocation. Also, a union means every state object
is the same size and we could reuse the state objects.
2017-01-11 11:21:27 +01:00
Alexander Larsson
65ad2541d7 Snapshot: Only record names if inspector is recording
Otherwise we do a lot of allocations and vprintf calls which are
not used.
2017-01-11 10:22:40 +01:00
Alexander Larsson
882290b479 Skip dynamic type check in css value getters
This gets called a lot during snapshotting, and this change
alone brings down snapshot time by almost 10% in a syntethic
snapshot test.
2017-01-11 09:20:30 +01:00
Benjamin Otte
4c7ddbf519 cssimage: Fix cross-fade
Simgle image cross-fade opacity was computed the wrong way, which caused
weird fade-in/out animations, for example in flat buttons.

I messed this up when porting cross-fades to snapshot().
2017-01-11 02:53:12 +01:00
Matthias Clasen
9133ec5cd4 Remove an unnecessary check
Since the demise of theme engines, we can no longer hit
the case of id >= GTK_CSS_PROPERTY_N_PROPERTIES. So don't
check for this in a very frequently called function.
2017-01-10 19:56:21 -05:00
Matthias Clasen
c1dc36dff0 Use an internal parameter check here as well
We should not slow down the core parts of the css machinery
with type checks.
2017-01-10 19:56:16 -05:00
Matthias Clasen
ecd0ce3993 Use gtk_internal_return_val_if_fail here
It seems odd to have checks in just a few functions,
so switch everything over to use the internal versions.
2017-01-10 19:56:09 -05:00
Matthias Clasen
a013a16d1c Use _gtk_widget_get_window more
This avoids type checks in places where we know it is safe.
2017-01-10 19:56:02 -05:00
Matthias Clasen
d9bc675cba Refactor some css transition code slightly
Reshuffling things a bit to avoid a bunch of NULL and
type checks.
2017-01-10 19:55:57 -05:00
Matthias Clasen
4f0cf475a5 Use the .symbolic.png assets in Adwaita
Using an image() fallback from svg to png doesn't make too
much sense, since the svg is always used (unless librsvg is
not present), while the png icon is faster and cheaper to
load and thus preferable.
2017-01-10 17:16:10 -05:00
Daniel Boles
0b7542bad1 revealer: Fix a typo in a function doc
Also, "ie" wasn't very clear, but fixing that to "i.e." would cause
truncation of the summary when processed by bindings using doxygen. So,
I replaced it with "in other words", which is no _less_ clear, at least.
2017-01-09 22:44:46 +00:00
Chun-wei Fan
ea58ebe76d Visual Studio builds: Move project files to win32/
It was suggested that the project files to be moved to win32/, so that we can
have one less layer of directories we need to go down into to reach the project files.
2017-01-09 15:38:48 +08:00
Benjamin Otte
dcb15d6728 cssgadget: Compute clip correctly
We were computing it relative to the gadget allocation, but it should be
relative to the widget allocation.
2017-01-09 01:12:06 +01:00
Timm Bäder
deb458c656 widget: Document child/sibling accessors 2017-01-08 16:58:27 +01:00
Timm Bäder
545fb271b7 switch: Use a widget as slider 2017-01-08 16:54:34 +01:00
Timm Bäder
9b76badb50 widget: Add construct-only css-name property
So we can set the css name of a widget to something that's not related
to the class name. If the css-name property is set to NULL, we will
still fall back to the one set using gtk_widget_class_set_css_name which
is alwasys non-NULL since GtkWidget itself sets it to "widget".
2017-01-08 16:44:46 +01:00
Timm Bäder
d15ca3b2b4 actionbar: Fix class and instance struct parent member 2017-01-08 15:12:45 +01:00
Timm Bäder
3d5a62a0c9 actionbar: Add revealed property
So we can show and hide it with a transition as well as bind another
property to it.
2017-01-08 14:57:11 +01:00
Timm Bäder
c392f41bb2 builderparser: Shuffle if-statements around once more
The previous reordering broke the builderparser test case.
2017-01-08 13:07:12 +01:00
Timm Bäder
de6b788a91 printunixdialog: Remove leftover draw handler 2017-01-08 11:06:49 +01:00
Timm Bäder
48d5f7843b actionbar: Add revealer as internal child 2017-01-08 10:49:06 +01:00
Timm Bäder
12c2274750 actionbar: Remove show() and hide() implementations
They only show/hide the widget in a delayed fashion which doesn't
work, just like it doesn't work with infobars and popovers.
2017-01-08 10:46:26 +01:00
Benjamin Otte
2a9ae1e8df tests: Remove gtk_widget_send_key()
It's unused in GTK.
2017-01-08 03:46:30 +01:00
Benjamin Otte
daf0270f1a tests: Remove widget find functions
They are all unused by GTK.

And other people can write their own find functions if they need any in
their tests.
2017-01-08 03:36:05 +01:00
Matthias Clasen
507a1e4d7a Make GTK_DEBUG=interactive work better
We currently have various ways to initialize GTK+, and not
all of them were supporting this way of bringing up the
inspector. Fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=776807
2017-01-07 19:16:15 -05:00
Benjamin Otte
c1f1dae997 viewport: Remove API to query GdkWindows 2017-01-08 00:48:13 +01:00
Benjamin Otte
d50b73f66d treeview: Remove gtk_tree_view_get_bin_window()
We don't want to expose GdkWindows in the public API.
2017-01-08 00:48:12 +01:00
Timm Bäder
47d4ad71fb Remove gtk_container_snapshot_child
Replace it with the already existing gtk_widget_snapshot_child.
2017-01-07 17:19:30 +01:00
Timm Bäder
f486805ba0 Unparent child widgets 2017-01-07 17:19:30 +01:00
Timm Bäder
5f98597a0c Add gtk_widget_set_focus_child
With a very useful implementation, but at least now we don't get runtime
warnings.
2017-01-07 17:19:30 +01:00
Timm Bäder
52aed5d607 Add gtk_widget_snapshot_child 2017-01-07 17:19:30 +01:00
Timm Bäder
08d644c4a5 widget: Warn if children are left in finalize() 2017-01-07 17:19:30 +01:00
Timm Bäder
7d0e534969 gtkmain: Correctly notify all widgets of a grab 2017-01-07 17:19:30 +01:00
Timm Bäder
8960bb7c8e widget: Fix :parent property type
Parent widgets can now also be widgets, not just containers.
2017-01-07 17:19:30 +01:00
Timm Bäder
9aedbc376b inspector: Don't try to access child props of non-containers 2017-01-07 17:19:30 +01:00
Timm Bäder
5ab2377afa widget: Remove gtk_widget_style_get_property 2017-01-07 17:19:30 +01:00
Timm Bäder
25236dbed8 spinbutton: Use widgets for up/down buttons 2017-01-07 17:19:30 +01:00
Timm Bäder
b2b4d9e418 switch: Use GtkLabels for on/off labels 2017-01-07 17:19:30 +01:00
Timm Bäder
42f1ff0123 inspector: Show child widgets of widgets 2017-01-07 17:19:29 +01:00
Timm Bäder
d77b288e65 widget: Implement create_path for widgets with non-container parent 2017-01-07 17:19:26 +01:00
Timm Bäder
af9d932e47 widget: Unparent widgets in dispose()
If they have a non-container parent.
2017-01-07 16:44:01 +01:00
Timm Bäder
ef44d05894 widget: Check for containerness before calling container API 2017-01-07 16:44:01 +01:00
Timm Bäder
8ef73660e4 widget: Implement map/unmap with child widgets
Once again, do what GtkContainer did before.
2017-01-07 16:44:01 +01:00
Timm Bäder
b15b9e028f widget: Implement show_all
Do what gtk_container_forall did: show_all all children, then the widget
itself.
2017-01-07 16:44:01 +01:00
Timm Bäder
8a55a6975c widget: Iterate over child widgets instead of gtk_container_forall 2017-01-07 16:44:01 +01:00
Timm Bäder
1e031cba99 widget: Add children and sibling pointers
and a (private) way to access them. We will later use these pointers to
manage children of non-container widgets and containers alike.
2017-01-07 16:44:00 +01:00
Timm Bäder
626868c7ba combobox: Remove unused define 2017-01-07 16:15:12 +01:00
Matthias Clasen
5fa1b14a96 Revert "Use CSS for styling links in labels"
This reverts commit 60a8769e7f0c952fdc8090b1ecd96cca00123ad9.

This needs more work to work properly.
2017-01-05 20:57:42 -05:00
Matthias Clasen
4170f79eea Use CSS for styling links in labels
This was implemented only halfway, and was hardcoding the
underline. We don't need to do that anymore.
2017-01-05 20:57:42 -05:00
Matthias Clasen
f3779b42c5 Make it possible to set style classes for label links
This makes it possible to style links in labels differently
in certain situations.
2017-01-05 16:55:45 -05:00
Sébastien Wilmet
88699f588d docs: improve the documentation of GtkEntry:attributes
See the implementation of gtk_entry_create_layout():
pango_attr_list_splice() is used to add the PangoAttrList of the preedit
string. And that is done *after* applying the PangoAttrList of the
"attributes" property.

https://bugzilla.gnome.org/show_bug.cgi?id=776868
2017-01-04 19:56:30 +01:00
Benjamin Otte
b993acfe2c gsk: Add GskRepeatNode
Also add gtk_snapshot_push_repeat() and use that to draw backgrounds.

With that change, CSS background snapshots are created without Cairo
nodes.
2017-01-01 19:53:36 +01:00
Benjamin Otte
aa917ce3b7 css: Redo GtkCssAffects
We now have GTK_CSS_AFFECTS_CONTENT for properties that have an effect
on content rendering.

Using GTK_CSS_AFFECTS_ICON is wrong for icon-transform and icon-filter
as they don't change the icon, just how the icon is rendered, so we use
GTK_CSS_AFFECTS_CONTENT for those.

We also introduce GTK_CSS_AFFECTS_POSTEFFECT for opacity and filter -
properties that affect the whole drawing of the widget by applying an
effect after everything is said and done.
2017-01-01 19:53:36 +01:00
Benjamin Otte
2571036c07 gsk: Turn GskTexture into a GObject 2017-01-01 19:53:36 +01:00
Benjamin Otte
4ead5c3ba8 colorplane: Implement snapshot() 2017-01-01 19:53:36 +01:00
Benjamin Otte
e542d411ac accellabel: Initialize allocation variable
I have no idea why gcc didn't catch this.
2016-12-31 14:37:20 +01:00
Benjamin Otte
fb43807fbb cssfiltervalue: Change node name
We're not just using this for icon filters, but for regular filters, so
the existing name is confusing.
2016-12-31 14:37:20 +01:00
Daniel Boles
0259312142 scrolledwindow: Fix func summary being cut off in bindings using doxygen
...which treats the first '.' in doc comments as the end of the summary.
So, e.g., in gtkmm, get_kinetic_scrolling() is currently summarised as
"Changes the behaviour of @scrolled_window wrt." Not very informative!

No need for a period there & anyway, the phrase "wrt to" is superfluous,
and we have space to actually say "with regard to", so just do that now.
2016-12-31 13:27:15 +00:00
Benjamin Otte
959f80e6e9 css: Implement filter
So far, it's only implemented for widgets, not for gadgets.

Not sure how to do it for gadgets without conflicts for widget gadgets
yet...
2016-12-31 02:49:47 +01:00
Benjamin Otte
45fbc25e5e css: Remove -gtk-icon-effect
-gtk-icon-filter replaces this now.
2016-12-31 02:49:47 +01:00
Benjamin Otte
5b33127692 gtk: Replace -gtk-icon-effect with -gtk-icon-filter
Instead of
  -gtk-icon-effect: dim;
  -gtk-icon-effect: hilight;
we now use
  -gtk-icon-filter: opacity(0.5);
  -gtk-icon-filter: brightness(1.2);
respectively.
2016-12-31 02:49:47 +01:00
Benjamin Otte
2645b5a7d7 gtk: Implement -gtk-icon-filter
This uses the new GskColorMatrixNode to implement a filter that applies
to icons. It's meant to replace -gtk-icon-effect.
2016-12-31 02:49:47 +01:00
Benjamin Otte
8973191278 snapshot: Add gtk_snapshot_push_color_matrix()
So far, this is unused.
2016-12-31 02:49:47 +01:00
Benjamin Otte
7540702cf0 gsk: Add GskColorMatrixNode
This node essentially implements the feColorMatrix SVG filter. I got the
idea yesterday after looking at the opacity implementation.

It can be used for opacity (not sure if we want to) and to implement a
bunch of the CSS filters.
2016-12-31 02:49:47 +01:00
Benjamin Otte
d82e8bf3d6 debugupdates: Draw without cairo node 2016-12-31 02:49:47 +01:00
Chris Mayo
051a7eceb1 GtkAboutDialog: Fix formatting of example email address in html
Signed-off-by: Chris Mayo <aklhfex@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=776524
2016-12-30 10:36:50 -05:00
Matthias Clasen
e62696b145 about dialog: Simplify the template a bit
Remove some unnecessary complications, like an extraneous
box, and some child property settings that are not needed.
2016-12-30 10:33:16 -05:00
Matthias Clasen
7e6820415d Avoid a possible crash in ::activate-url handlers
If the signal handler ends up changing the label text,
the link is no longer around to update the css node.
Check for this possibility to avoid a crash here.
2016-12-29 11:09:20 -05:00
Benjamin Otte
599cc995f3 css: Handle repeating gradients with only one offset
Example:
  repeating-linear-gradient(red 50%, blue 50%)

Those gradients in Firefox draw a solid image of the last color, so do
the same here.
2016-12-26 17:22:01 +01:00
Daniel Boles
2a7171534e Box: Restore an accidentally deleted comment
Also, split a MAX() onto its own line to match the others.
2016-12-26 10:57:51 +00:00
Daniel Boles
71bbd8881f Box: avoid recalc/reassignments, improve var names
Homogeneous branches repeated the calculation/assignment of the initial
space available to children. This avoids that by shuffling some code.

Perhaps more importantly, in doing that, I ended up with some ambiguous
names, and Company and I realised how vague the pre-existing naming was.
"size" becomes "extra_space", as this is what it represents. Conversely,
"extra" becomes "size_given_to_child" (albeit still given out in two
different ways depending on whether the Box is homogeneous). My hope is
that these sections of code are now somewhat less baffling than before!
2016-12-25 23:16:14 +00:00
Daniel Boles
5d10174031 Box: Don't unnecessarily repeat a function call
The spacing was already saved in a variable just above.
2016-12-25 21:46:40 +00:00
Benjamin Otte
1d84555729 iconhelper: Invalidate style before accessing texture
Invalidating the style might cause invalidation of the texture. So we
end up with a pointer to freed memory.
SAD!
2016-12-24 06:19:16 +01:00
Benjamin Otte
6cc08d60ef calendar: Implement snapshot() 2016-12-23 12:07:22 +01:00
Benjamin Otte
a36e5ceea7 cellrenderer: Remove render() vfunc
Make the last 2 cell renderers create the cairo node themselves.
2016-12-23 11:11:52 +01:00
Benjamin Otte
513a8c46af cellrendererpixbuf: Implement snapshot() 2016-12-23 10:50:04 +01:00
Benjamin Otte
a0f65d16bc cellrendererprogress: Implement snapshot() 2016-12-23 10:44:49 +01:00
Benjamin Otte
b901572d86 cellrenderertoggle: Implement snapshot() 2016-12-23 09:31:54 +01:00
Benjamin Otte
c412a717f1 cellrenderertext: Implement snapshot() 2016-12-23 09:23:07 +01:00
Benjamin Otte
677c5bdedf cellrenderer: Move snapshotting down into cell renderers
Now that every call to GtkCellArea is a snapshot call and no more cairo
calls are left, move the actual differentiation between Cairo and
Snapshot down to the cell renderer.
2016-12-23 09:23:04 +01:00
Benjamin Otte
91c71b10e6 inspector: Add a render node save button
Now we can select buggy nodes, save them to a file, and add that file to
our testsuite.
2016-12-23 08:11:00 +01:00
Benjamin Otte
3a38bc9bf7 gsk: Remove spread member from GskShadow
I had originally thought I'd use GskShadow for box-shadow, but didn't in
the end.

So now it's only used for text-shadow and icon-shadow, and those don't
have a spread.
2016-12-23 08:11:00 +01:00
Benjamin Otte
0efeaf9508 treeview: Port rest of stuff to snapshot()
The only thing still drawn with Cairo are grid lines.
2016-12-22 03:37:32 +01:00
Benjamin Otte
f1825f5eff treeview: Partially convert to snapshot()
The big fat scary bin drawing function that actually draws the cell
renderers - that one is still missing.
2016-12-22 03:37:32 +01:00
Chun-wei Fan
23edff1606 gtkcssimagelinear.c: Avoid VLAs
VLAs are not supported by Visual Studio and possibly other compilers that
are supported by GTK+-3.90+, and probably never will be, although it is a
C99 specification, and it became optional for C11.  It is also not a part
of the newer compiler requirements that are listed out for GTK+-3.90.x.

There exist concerns about the implementation of VLAs in compilers that
support them as well, so change it to a g_newa() approach.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2016-12-22 08:40:32 +08:00
Rico Tzschichholz
a571e53491 snapshot: Fix some annoations 2016-12-21 18:16:34 +01:00
Benjamin Otte
def94f03e2 debug: Add GTK_DEBUG=snapshot
This causes the snapshotting algorithm to dump all widget nodes into
their own container node. We then name that group accordingly (ie
"GtkSwitch<0xdeadbeef>") so you can easily see which node belongs where.

The feature is toggleable in the inspector's visual tab.

There's a few problems with it, becuse GtkSnapshot optimized container
nodes away if they are not needed, so we are losing some widgets...
2016-12-20 19:26:40 +01:00
Benjamin Otte
acaa04c031 revealer: Implement snapshot()
The revealer needs to clip the child during animations, whcih draw() did
automatically, but snapshot() does not.
2016-12-20 19:26:40 +01:00
Benjamin Otte
c4065b9ee0 API: Export gtk_container_snapshot_child()
It's equivalent to gtk_container_propagate_draw() and then one is
public, too.
2016-12-20 19:26:40 +01:00
Benjamin Otte
22a657004b debug: Remove pixel-cache debug categories
We have no more pixel cache, so they are kind of useless.
2016-12-20 19:26:40 +01:00
Debarshi Ray
2cbe057351 flowbox: Don't emit child-activated while dragging the pointer
https://bugzilla.gnome.org/show_bug.cgi?id=776306
2016-12-20 18:48:03 +01:00
Benjamin Otte
1b553478f6 cssimageradial: Handle "partial" gradients correctly
When the first/last color stop is not at 0%/100%, we need to start the
repeating at their offsets and not at 0%/100%.

Attached reftest demonstrates the problem.
2016-12-20 18:01:12 +01:00
Benjamin Otte
6c20ddc119 searchbar: Implement snapshot() 2016-12-20 18:01:12 +01:00
Benjamin Otte
0dbdf0c428 gadget: Remove gtk_css_gadget_draw()
And with it, remove the draw func from custom gadgets, that has been
NULL everywhere.

All gadgets are snapshot now.
2016-12-20 18:01:12 +01:00
Benjamin Otte
613194a246 colorswatch: Implement snapshot 2016-12-20 18:01:12 +01:00
Benjamin Otte
4d9eedafcd roundedbox: Add gtk_rounded_boxes_init_for_style()
Instead of making people intiialize a rectangle and then applying border
radius manually, provide a constructor that does it for them.
While doing that, also allow people to instead request the padding box
or the content box.

Refactor all relevant code to use this new constructor.
2016-12-20 18:01:12 +01:00
Benjamin Otte
95a2a5c54c gtk: Remove GtkJunctionSides 2016-12-20 18:01:12 +01:00
Benjamin Otte
3f75b11982 frame: Implement snapshot() 2016-12-20 18:01:12 +01:00
Benjamin Otte
c87db76cb5 iconview: Implement snapshot() 2016-12-20 18:01:12 +01:00
Benjamin Otte
94e906c802 cellview: Implement snapshot()
This also adds gtk_cell_area_snapshot().
2016-12-20 18:01:12 +01:00
Benjamin Otte
2034e83a20 gsk: Add GskOutsetShadowNode 2016-12-20 18:01:12 +01:00
Benjamin Otte
fcc1f554d6 gsk: Add GskInsetShadowNode
And again lots of shadow code gets copied to GSK. But we're now almost
at a stage where widget-factory does not use cairo nodes anymore.
2016-12-20 18:01:12 +01:00
Benjamin Otte
4fc64ae3dd gsk: Add contains/intersect functions for GskRoundedRect
... and use them.
2016-12-20 18:01:12 +01:00
Benjamin Otte
2480e0d575 gsk: Add GskShadowNode
... and make the icon rendering code use it.

This requires moving even more shadow renering code into GSK, but so be
it. At least the "shadows not implemented" warning is now gone!
2016-12-20 18:01:12 +01:00
Benjamin Otte
071c9a8221 API: gdk: Add gdk_rgba_is_clear() and gdk_rgba_is_opaque()
I want to use these inside GSK, and I'm not a fan of putting GdkRGBA
APIs into it or duplicating it into GTK.

So public API it is.
2016-12-20 18:01:12 +01:00
Benjamin Otte
15e8a22f08 gsk: Move gtk/gtkcairoblur.c to gsk/gskcairoblur.c 2016-12-20 18:01:11 +01:00
Benjamin Otte
6e31fc4300 inspector: Print node type in node properties 2016-12-20 18:01:11 +01:00
Benjamin Otte
75b76af221 gsk: Add GskBorderNode
The node draws a solid CSS border, which can be used to cover everything
but dashed and dotted borders (double, groove, inset, ...).

For different border styles, we overlay multiple nodes and set their
colors to transparent for sides with non-matching styles.
2016-12-20 18:01:11 +01:00
Benjamin Otte
9af468cdec gtk: Remove unused argument from function 2016-12-20 18:01:11 +01:00
Benjamin Otte
a9809e5d30 gsk: Add gsk_rounded_rect_shrink()
... and replace _gtk_rounded_box_grow() and _gtk_rounded_box_shrink()
with it.
2016-12-20 18:01:11 +01:00
Benjamin Otte
65e9894450 menu: Implement snapshot() for the menu code 2016-12-20 18:01:11 +01:00
Benjamin Otte
e492a63e4c paned: Implement snapshot() 2016-12-20 18:01:11 +01:00
Benjamin Otte
8ad7c435ca cssimage: Implement snapshot() for cross-fade 2016-12-20 18:01:11 +01:00
Benjamin Otte
9822fe81a3 snapshot: Implement gtk_snapshot_push_opacity()
Use it in GtkWidget's opacity handling.
2016-12-20 18:01:11 +01:00
Benjamin Otte
6b29dbf26a snapshot: Handle NULL returns in pop_and_append() 2016-12-20 18:01:11 +01:00
Benjamin Otte
30438c6e8b gsk: Add cross-fade node
And implement stack crossfades with it.
2016-12-20 18:01:11 +01:00
Benjamin Otte
81297857cc snapshot: Convert Range, Scale, ColorScale
And of course Scrollbar, but that one does no drawing itself.
2016-12-20 18:01:11 +01:00
Benjamin Otte
e8cd71228a gsk: Implement linear gradient render nodes 2016-12-20 18:01:11 +01:00
Benjamin Otte
cf520b7a1f gsk: Add blend nodes
Implement blend mode support in GTK background compositing with it.
2016-12-20 18:01:11 +01:00
Benjamin Otte
3e26fadb24 css: Replace custom blend modes with GskBlendMode 2016-12-20 18:01:11 +01:00
Benjamin Otte
58b2c1d009 cssimage: Port a few more simple ones to snapshots 2016-12-20 18:01:10 +01:00
Benjamin Otte
cd68c93b4c render: Fall back later when rendering backgrounds
We can now render most backgrounds fine.
2016-12-20 18:01:10 +01:00
Benjamin Otte
3d5173d4ac gtk: Fix memleaks
It turns out, some simple getters - such as
gdk_drawing_context_get_clip() - love copying things before returning
them.

I guess somebody has to burn cycles...
2016-12-20 18:01:10 +01:00
Benjamin Otte
dd1cf1ac0f css: An opaque background does not allow omitting push_group
When the background-clip of the background is smaller than the
background-clip of blended images, not pushing a group is wrong.

Test testing exactly that included.
2016-12-20 18:01:10 +01:00
Benjamin Otte
23e35706b4 gsk: Add support for rounded clip rectangles
Also add support to GtkSnapshot, so people can push rounded clips.
2016-12-20 18:01:10 +01:00
Benjamin Otte
f96f16899d roundedbox: Remove _gtk_rounded_box_path()
Use gsk_rounded_rect_path() instead.

That's a private GSK function, be we can just include its header.
2016-12-20 18:01:10 +01:00
Benjamin Otte
fa9b0f9965 roundedbox: Remove _gtk_rounded_box_move()
Use gsk_rounded_rect_offset() instead.
2016-12-20 18:01:10 +01:00
Benjamin Otte
e26f84fca0 gtk: Remove GtkRoundedBox struct
Use GskRoundedRect instead.
2016-12-20 18:01:10 +01:00