Commit Graph

29405 Commits

Author SHA1 Message Date
Matthias Clasen
a381ee6a55 Fix a typo 2017-11-08 22:09:23 -05:00
Matthias Clasen
23162bf0de filesystem: Drop surface-based APIs
These are no longer used.
2017-11-08 21:56:28 -05:00
Matthias Clasen
8460034f58 filechooserwidget: Use GIcons
This lets us avoid much of the symbolic icon rendering api.
2017-11-08 21:56:28 -05:00
Matthias Clasen
9aba7e3aa7 filechooserbutton: Use GIcons
This lets use avoid much of the symbolic icon rendering api.
2017-11-08 21:56:28 -05:00
Matthias Clasen
4148795c8b filesystem: Add GIcon getters
We want to move away from surfaces, and instead pass
GIcons and GdkTextures around.
2017-11-08 21:56:28 -05:00
Matthias Clasen
c83665005a Use color matrices for -gtk-recolor
Use the same approach we take for recoloring in GtkIconHelper now.
As part of this change, GtkCsSImageRecolor is changed to not derive
from GtkCssImageUrl anymore.
2017-11-08 10:04:38 -05:00
Daniel Boles
6f54e1fc6d CssProvider: Fix doc of min theme version loaded
The code shows that we only load back to 4.0, but this still said 3.0.
2017-11-08 09:22:49 +00:00
Daniel Boles
6a9c14b2fa CssProvider: Use consistent theme name placeholder
commit 475d916eb9 added various paths that
use theme-name for this, but the existing path already used THEME, with
a subsequent description referring to the latter. So use that everywhere
2017-11-08 09:22:46 +00:00
Matthias Clasen
6e4f7ad857 Fix the build 2017-11-08 00:37:04 -05:00
Matthias Clasen
acf58063a7 css image: Use GdkTexture api directly
No need to load a pixbuf anymore, we can just
directly create textures.
2017-11-07 23:04:36 -05:00
Matthias Clasen
44a3f6bb41 css: Use a color matrix for recoloring -gtk-icontheme
This is the same approach we are already using in
GtkIconHelper.
2017-11-07 21:39:47 -05:00
Matthias Clasen
1da7dc890c Make the recoloring code more robust
Pass both width+height and scale, so we can handle the case
where width+height are zero and we are using the file, scaled.
2017-11-07 21:27:38 -05:00
Matthias Clasen
6ebd2d384b fix the build 2017-11-07 19:56:11 -05:00
Matthias Clasen
284fd36e5d Fix symbolic.svg rendering
With the shader approach to symbolic recoloring, we must
not recolor the svgs anymore as we're loading them. Instead,
load them the same way that gtk-encode-symbolic-svg does.

This fixes the rendering of large symbolic icons e.g. the
'no search results found' page in the file chooser.
2017-11-07 18:56:32 -05:00
Benjamin Otte
f80a90d39a widget: Don't leak the cursor on destruction 2017-11-06 03:28:34 +01:00
Piotr Drąg
08d5ed5875 placessidebar: correct quotation marks in a new string 2017-11-05 21:18:53 +01:00
Alexandru Pandelea
2421e745b9 placessidebar: add starred location item
Add an item for showing all files marked as favorite. This item will
open all files that have the nao:predefined-tag-favorite tag

https://bugzilla.gnome.org/show_bug.cgi?id=785176
2017-11-05 21:02:04 +01:00
Benjamin Otte
1cee71049a emojichooser: animate the adjustment
... instead of doing a dance with the scrolled window to get it to scroll
the adjustment.
2017-11-05 16:12:35 +01:00
Benjamin Otte
c4ecc0993a flowbox: Don't call get_allocation()
That's wome outdated workaround code from the last version of GTK3.
2017-11-05 14:46:01 +01:00
Benjamin Otte
73077c4e90 viewport: Implement clipping for picking
This is necessary because picking is no longer automatically constrained
to a widget's box. So all clipping widgets need to constrain their
clipping, too.

This patch does that for GtkViewport only.
2017-11-05 07:19:22 +01:00
Benjamin Otte
e8b2493680 aboutdialog: Clean up for logo being a texture 2017-11-05 06:50:28 +01:00
Benjamin Otte
22472c1924 entry: Remove surface icons
We have texture icons.
2017-11-05 06:45:01 +01:00
Benjamin Otte
0f5d807cae iconhelper: Don't render to surface anymore
Just go directly to texture.
2017-11-05 06:30:45 +01:00
Benjamin Otte
bc552e74d8 menubutton: Don't fiddle with prelight state 2017-11-05 05:13:17 +01:00
Benjamin Otte
4ee02725b4 themes: Do expander arrow :hover properly
We want to prelight the arrow even when the label is hovered.
2017-11-05 05:13:17 +01:00
Benjamin Otte
e3effc8df2 expander: Don't do :hover yourself
GTK does it for you.
2017-11-05 05:13:17 +01:00
Benjamin Otte
c4a9fa9865 range: Stop trying to be smarter than GTK
GTK deals with PRELIGHT properly itself now, so there's no need to try
do it manually.
2017-11-05 05:13:17 +01:00
Benjamin Otte
4bb9a6360f range: Use gtk_widget_pick() to pick the mouse location
That's rather unsuccessful so far because it requires skipping a bunch
of irrelevant widgets, but oh well...
2017-11-05 05:13:17 +01:00
Benjamin Otte
994287b71f widget: Make gtk_widget_pick() really slow
We cannot fast-track picking by using gtk_widget_contains(). Child
widgets may extend their parent using ie negative margins.

This is not just a theoretical concern, this is what's happening right
now with GtkScale's sliders relative to the trough.

The problem is that we now iterate through all widgets, even when they
aren't anywhere near the mouse pointer. So essentially every pick
operation is now guaranteed O(N_WIDGETS) which used to be the worst case
that pretty much never happened.
2017-11-05 05:13:17 +01:00
Benjamin Otte
cf1cd19b61 range: Stack widgets properly
The trough widgets have the slider on top of the fill level and the
hilight widget. Make sure the widget stacking respects that.

This is particularly relevant because picking event targets should pick
the slider and not the hilight widget.
2017-11-05 05:13:17 +01:00
Benjamin Otte
897fdaf1c0 entry: Texture properties are objects
Carelessly copy/pasting made them boxeds. Oops.
2017-11-05 05:13:17 +01:00
Benjamin Otte
cf2d549e92 widget: Implement gtk_widget_pick()
... and use it.
2017-11-05 05:13:17 +01:00
Benjamin Otte
8d849458ac docs: You can't modify textures
So there's no need to tell people they must not do that.
2017-11-05 00:07:17 +01:00
Benjamin Otte
70846c85b3 window: Make icons GdkTextures
Cairo surfaces are bad, mkay?
2017-11-05 00:07:17 +01:00
Benjamin Otte
b4b7c27274 aboutdialog: Make logo a texture property
Get rid of cairo surfaces!
2017-11-05 00:07:17 +01:00
Benjamin Otte
b12a53406d builder: Mirror GdkPixbuf abilities for GdkTexture
In particular, allow specifying a filename for a GDK_TYPE_TEXTURE
property. This makes it easy to transition properties from Pixbuf type
to Texture type without having to touch resource files.
2017-11-05 00:07:17 +01:00
Benjamin Otte
2d959553e9 image: Add the ability to set textures
This also adds it to all other places that use the same infrastructure:
GtkEntry and GtkCellRendererPixbuf
2017-11-05 00:07:17 +01:00
Emmanuele Bassi
481b5d1b89 Partially revert GskTexture → GdkTexture rename
Excessive use of sed when moving GskTexture to GDK; the GskTextureNode
should still live under the GSK namespace.
2017-11-04 15:06:00 +00:00
Benjamin Otte
c5a631b999 inspector: Unrealize renderer before unreffing
See previous patch for a description on why that is necessary.
`
2017-11-04 15:22:25 +01:00
Benjamin Otte
a0ff63e162 iconhelper: Compute surface size without icon helper
This is so we can do the next batch of changes
2017-11-04 15:22:25 +01:00
Benjamin Otte
197eeade74 textview: Use gtk_widget_set_cursor()
This currently breaks because we still use GdkWindows. Soon...
2017-11-04 15:22:25 +01:00
Benjamin Otte
f7646cf541 textview: Remove GdkWindow usage from the public API
A sideeffect is that we don't set the correct parent window on child
widgets anymore, but that is hopefully going to be fixed once we get rid
of child windows completely.
2017-11-04 15:22:25 +01:00
Benjamin Otte
a409320cda gtk: Use gtk_widget_set_cursor()
... and gtk_widget_set_cursor_from_name() instead of setting cursors on
GdkWindows.
2017-11-04 01:37:03 +01:00
Benjamin Otte
b38a4cb824 widget: Export gtk_widget_set_cursor()
Widgets can now set their favorite cursor using public API.

This is very necessary because all cursor-setting APIs are still
setting it on their GdkWindow, which by now is the toplevel - oops.
2017-11-04 01:00:27 +01:00
Benjamin Otte
9323d098a6 gdk: Cursors no longer have a display
Change constructors to reflect that.

While doing so, also add a fallback argument to the cursor constructors,
so it is now possible to create cursors with fallback.
2017-11-04 00:07:13 +01:00
Benjamin Otte
ca3c23662c GskTexture => GdkTexture
We want this thing to replace GdkPixbuf, so it has to live in GDK.
2017-11-04 00:07:13 +01:00
Carlos Garnacho
b8d3f88ddb gtkwindow: Use event target widget for WM handling special paths
The check used to achieve discarding events not meant for the window
widget itself (because they are handled in the regular paths). Using
the target widget is the equivalent now.
2017-11-03 22:19:13 +01:00
Kjell Ahlstedt
23014438d6 GtkWindow: Tidy up after icon became a cairo surface
Use g_value_set/get_boxed() in gtk_window_get/set_property(), case PROP_ICON.
icon_from_list() shall always add a reference to the returned icon.
gtk_window_set_icon() must accept icon != NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=789870
2017-11-03 20:05:28 +01:00
Timm Bäder
11b8f27b76 notebook: Fix setting show-tabs
show-tabs=FALS means the notebook is not supposed to show tabs,
regardless of whether it has a current page or not.
2017-11-03 11:22:44 +01:00
Timm Bäder
2603fa0cc3 notebook: Remove useless call to gtk_widget_reset_style 2017-11-03 11:22:44 +01:00