Commit Graph

27611 Commits

Author SHA1 Message Date
Benjamin Otte
e09fd1eb8a scrolledwindow: Fix rendering
We used to allocate the gadget relative to the view window. We allocate
relative to widget->window now.
2016-12-19 05:36:06 +01:00
Benjamin Otte
e755d9357d notebook: Implement snapshot 2016-12-19 05:36:06 +01:00
Benjamin Otte
3ba5c70028 iconhelper: Implement snapshot 2016-12-19 05:36:06 +01:00
Benjamin Otte
d9619abb11 progressbar: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
1733a3de0e toolbar: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
182dad304a eventbox: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
8900d6cc45 separatortoolitem: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
edf8ffecdf levelbar: Implement snapshot() 2016-12-19 05:36:06 +01:00
Benjamin Otte
96a94fc21d frame: Remove the border node
It does weird clipping that
(a) nobody likes
(b) is hard to support in the new rendering world.
So we take the easy way out.

The actual frame is now drawn by the frame node around the label.
2016-12-19 05:36:06 +01:00
Benjamin Otte
795f38b4cc cellview: Remove code to modify the background
GtkCellView has a gadget, so peopl can do all their shenanigans with
CSS.

And the original use case (overriding the background so that the
cellview's GdkWindow shares the background color of the combobox) is
outdated since we have transparent backgrounds.
2016-12-19 05:36:06 +01:00
Benjamin Otte
0eecc6f686 grid: Implement support for CSS border-spacing 2016-12-10 04:32:55 +01:00
Benjamin Otte
404cdd5d02 boxgadget: Implement CSS border-spacing 2016-12-10 04:32:55 +01:00
Benjamin Otte
75c3d193f6 box: Implement support for border-spacing 2016-12-10 04:32:55 +01:00
Benjamin Otte
5aea108802 box: Remove unused member variable 2016-12-10 04:32:55 +01:00
Benjamin Otte
d7148a4718 css: Add "border-spacing" CSS property
It's using a GtkCssPositionValue, even though that name is wrong. But
the functionality of managing 2 lengths is exactly what we want.

Nobody is using this yet.
2016-12-10 04:32:55 +01:00
Benjamin Otte
cb8483b0a6 gtk: Remove unneeded gtk_snapshot_push()/pop() calls 2016-12-09 21:39:43 +01:00
Benjamin Otte
f8932d643d snapshot: Always create an initial node
This way we ensure that there is only one root node and everybody can
append() with impunity.
2016-12-09 21:39:43 +01:00
Timm Bäder
489aee5d00 widget: Remove unused adjust_* vfuncs
Expose them privately to gtksizerequest.c using normal functions
instead.
2016-12-07 18:12:54 +01:00
Timm Bäder
1aa1676d9d menu: Replace button-press-handler with gesture 2016-12-07 18:06:37 +01:00
Timm Bäder
be9adea58e toolbar: Replace button-press-event handler with gesture 2016-12-07 18:06:32 +01:00
Timm Bäder
55b1f231fb linkbutton: Replace button-press-event handler with gesture 2016-12-07 18:06:28 +01:00
Timm Bäder
c4a6c37767 separatortoolitem: Remove button-event/motion-event handlers
These only exist for the window dragging which does not exist anymore
currently. It will be reintroduced later in a form that does not require
these handlers.
2016-12-07 18:06:23 +01:00
Timm Bäder
4c12c4ba02 snapshot: Add annotations to parameters/return values 2016-12-07 18:06:17 +01:00
Timm Bäder
ea22bd9d40 widget: Use gtk_widget_measure to measure widget sizes 2016-12-07 08:19:22 +01:00
Timm Bäder
07a9b202ab widget: Remove _gtk_widget_supports_clip 2016-12-07 08:19:22 +01:00
Timm Bäder
3063d4a5e3 widget: Remove gtk_widget_invalidate_style_context 2016-12-07 08:19:22 +01:00
William Hua
fdec3e8a3f build: add gir depends for GdkX11, GdkWin32, and Gsk on Gdk
https://bugzilla.gnome.org/show_bug.cgi?id=775651
2016-12-05 12:56:50 -05:00
Benjamin Otte
582ea50faa inspector: Add support for displayin the render region
Now I just need a UI designer that makes this look nice...
2016-12-05 15:02:47 +01:00
Benjamin Otte
60567db486 gskrenderer: Add gsk_renderer_begin_draw_frame()
This way, we can hijack the begin/end draw process and do out own
processing before passing it on to GDK.
2016-12-05 15:02:47 +01:00
Benjamin Otte
e950a5190d inspector: Pass the drawing context into the recorder
That way we can capture both the actual changes (clip region) and the
area that was redrawn (render region), which in OpenGL might not be
identical.

Nothing shows the render region yet though...
2016-12-05 15:02:47 +01:00
Benjamin Otte
bddfd7bb41 gdk: Remove all code that only existed because of use_gl
Now that we don't use GL anymore, this code is unnecessary.
2016-12-05 15:02:47 +01:00
Benjamin Otte
e42e27304a gskrenderer: Store the GL context
And use it to create the drawing context with it.

Note that this doesn't yet have any effect and is all infrastructure
preparation work.
2016-12-05 15:02:47 +01:00
Benjamin Otte
332ed7be5b API: Require passing a GLContext to begin_draw_frame()
This is in preparation for requiring explicit passing of GL contexts
when drawing.
2016-12-05 15:02:47 +01:00
Benjamin Otte
633631a47b cssgadget: Compute relative to own allocation, not widget allocation
This would lead to clipped gadgets when the gadget allocation differed
from the widget allocation, like in GtkListBox.
2016-12-05 15:02:46 +01:00
Timm Bäder
ac20c3eb22 frame: Use gtk_widget_measure to measure child sizes 2016-12-04 12:00:46 +01:00
Timm Bäder
7096d6dd28 viewport: Use gtk_widget_measure to measure child sizes
and rewrite the adjustment handling in a orientation-agnostic way.
2016-12-04 12:00:46 +01:00
Timm Bäder
5ee590fbc8 scrolledwindow: measure child widgets using gtk_widget_measure 2016-12-04 12:00:46 +01:00
Timm Bäder
1ab3d32808 revealer: Measure child widget size using gtk_widget_measure 2016-12-04 12:00:46 +01:00
Timm Bäder
7f8d0acfd3 headerbar: measure children using gtk_widget_measure 2016-12-04 12:00:46 +01:00
Timm Bäder
5b05c12780 toolpalette: call set_has_window 2016-12-04 12:00:45 +01:00
Timm Bäder
9f98138ffb printunixdialog: Remove GtkDrawingArea::draw handler
the source file has been updated to use gtk_drawing_area_set_draw_func,
but the draw_cb handler in the ui file is still left.
2016-12-04 12:00:38 +01:00
Benjamin Otte
0d68b22479 stylecontext: Remove a bunch of unneeded headers 2016-12-03 18:15:49 +01:00
Daniel Boles
8efc91c4e0 GtkProgressBar: trivial conditional optimisation
I'd hope the compiler would realise this for us, but let's be explicit.
2016-12-03 16:27:03 +00:00
Timm Bäder
3dac21f20b entry: Refactor get_icon_pixbuf
This way it will only return a pixbuf if the icon helper has a pixbuf.
2016-12-03 13:19:26 +01:00
Timm Bäder
8a543ab23c iconhelper: Ensure the surface used for textures is ARGB32 2016-12-03 13:19:26 +01:00
Timm Bäder
49508ddfdb iconhelper: Remove allocate implementation 2016-12-03 13:19:26 +01:00
Timm Bäder
31ed68dbfa listbox: Fix row hovering
GtkListBox is not a windowed widget anymore so we can't use
gtk_widget_get_window. Just directly access priv->view_window instead to
get the right window.
2016-12-03 13:19:26 +01:00
Timm Bäder
fa4d6e8918 spinbutton: Remove _get_panels 2016-12-03 13:19:26 +01:00
Timm Bäder
36377e9964 Remove gtk_widget_get_preferred_height_and_baseline_for_width
It's just a wrapper around gtk_widget_measure nowadays.
2016-12-03 13:19:25 +01:00
Timm Bäder
8d36fbfbaa togglebutton: Remove unused defines 2016-12-03 13:19:25 +01:00