| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
That would imply the pixelcache monitors the style context for changes
and it doesn't do that.
Its only use case was opacity checks, so add
gtk_pixel_cache_se_is_opaque() instead.
|
|
|
|
| |
Removing the child unsets the pxielcache's style context...
|
|
|
|
|
|
|
|
|
| |
The viewport itself doesn't move, so we cannot use it as the pixel
cache's background. Use the bottommost using element instead, which is
the viewport's child.
This might need adaptations in themes as we want the backgroud to be
opaque to speed up pixel cache performance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GtkViewport currently tries to draw a background over the bin window.
The feature is a bit broken at the moment, as it does not take into
account padding that might have been set on the GtkViewport, but in
general it does not seem very useful, and goes somewhat against the CSS
box model where every widget/gadget is responsible to draw its own
background. For a fix, we could either have the viewport gain a "bin"
gadget, or we could stop drawing the background.
As it isn't clear that there are any users of this feature, stop drawing
the background; a client can achieve the same effect by drawing the
background on the widget inside the viewport itself.
|
|
|
|
|
| |
This will get us margin support, among other things, and simplifies the
code.
|
| |
|
|
|
|
| |
No need to do this manually.
|
| |
|
|
|
|
| |
Using the state of the context makes this more obviously correct.
|
|
|
|
| |
This lets us avoid hardcoding the type in CSS.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These days exposure happens only on the native windows (generally the
toplevel window) and is propagated down recursively. The expose event
is only useful for backwards compat, and in fact, for double buffered
widgets we totally ignore the event (and non-double buffering breaks
on wayland).
So, by not setting the mask we avoid emitting these events and then
later ignoring them.
We still keep it on eventbox, fixed and layout as these are used
in weird ways that want backwards compat.
|
|
|
|
|
|
|
| |
This allows the pixel cache to opportunistically use CAIRO_CONTENT_COLOR
instead of CAIRO_CONTENT_COLOR_ALPHA during surface creation.
https://bugzilla.gnome.org/show_bug.cgi?id=754658
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Translate shadow != None into the FRAME style class.
This doesn't change the style classes used for drawing,
it only sets the style class permanently instead of
saving and restoring in draw().
https://bugzilla.gnome.org/show_bug.cgi?id=732256
|
| |
|
|
|
|
| |
Just queue a resize instead of fiddling with the size allocation.
|
| |
|
|
|
|
|
|
| |
-1 is a special value for "undefined" and needs to stay that way
https://bugzilla.gnome.org/show_bug.cgi?id=729607
|
|
|
|
|
| |
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
|
|
|
|
|
| |
Previously, the code would fall back on GtkBin's hfw implementation
which didn't account for padding and borders.
|
|
|
|
|
| |
That function looks longer than not using it, but we'll need it in the
next commit.
|
|
|
|
|
| |
It's nice that bugs get pointed out in code comments. Fixing them would
probably have been preferrable though.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=726475
|
|
|
|
| |
Instead of Return value:
|
|
|
|
| |
https://wiki.gnome.org/Design/OS/Typography
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=702996
|
|
|
|
|
|
|
|
| |
Since gdk_window_move() no longer uses XCopyArea all scrolling
now re-renders everything in the window. To get performance
back we use a GtkPixelCache to store already drawn children,
and we when we expose the viewport we just blit the
offscreen to the right place.
|
|
|
|
|
|
|
| |
This avoids an evil trap when doing MAX (..., ... - 2 * border_width)
and the expression on the right gets promoted to unsigned, instead
of going negative as you would expect.
https://bugzilla.gnome.org/show_bug.cgi?id=699633
|
|
|
|
|
|
| |
NULL is accepted here, so add (allow-none).
https://bugzilla.gnome.org/show_bug.cgi?id=694022
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the previously hardcoded calls to gdk_window_set_user_data,
and also lets us track which windows are a part of a widget. Old code
should continue working as is, but new features that require the
windows may not work perfectly.
We need this for the transparent widget support to work, as we need
to specially mark the windows of child widgets.
https://bugzilla.gnome.org/show_bug.cgi?id=687842
|
|
|
|
|
|
|
|
|
|
| |
There's really no reason why we shouldn't automatically create a
GtkViewport when the widget added to GtkScrolledWindow is not a
GtkScrollable, instead of just printing a g_warning.
Copy the viewport special case into the scrolled window implementation
of gtk_container_add().
https://bugzilla.gnome.org/show_bug.cgi?id=693015
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to use GTK_RESIZE_QUEUE, but that is problematic for e.g
a GtkScrolledWindow with NEVER scroll policies, as size changes
in ancestors will never get propagated to the scrolled window, causing
it to not have the correct size.
This is a slight performance hit, but in practice its not bound to be
problematic. In typical UIs there is only a single "large" GtkScrolledWindow
visible at a time, so a size requeust propagating out of such a window
will only hit the smaller amount of widgetry outside the scrolled window,
and additionally all such widgets will have their size request caches
still valid.
https://bugzilla.gnome.org/show_bug.cgi?id=690099
|
| |
|
|
|
|
|
|
|
| |
This can cause lagging when scrolling as it causes us to repaint
on every scroll event. This wasn't historically a great problem,
but with smooth scrolling we get a lot more events, so this
now creates visible lagging on slower machines.
|
|
|
|
|
| |
... and make all the headers to not include gtkadjustment.h anymore. Of
course, also include it in the source files instead.
|
|
|
|
|
| |
This is so smooth scroll events are send/handled by the
parent GtkScrolledWindow if any.
|
|
|
|
|
|
| |
This makes kinetic scrolling work with viewports where the
content does not otherwise select for button or touch events,
such as testscrolledwindow's label.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the changes in default CSS to make the default background transparent
we ran into issues where intermediate GdkWindow (for instance the
view_window in GtkViewport) where we didn't set an explicit background
(because before they were always covered). So instead of showing throught
the transparent windows were showing the default backgroind of the intermediate
window (i.e. black).
With this change we also needed to fix GtkViewport, as it was previously
relying on the bin and view windows to cover widget->window so that the
border was not visible if shadow_type was NONE.
|
|
|
|
|
| |
Without this you don't get the right border/padding for widget->window
and the border shows up under the scrolled contents.
|
| |
|
| |
|
|
|
|
| |
So there's no need to check for that in the getters.
|
| |
|
|
|
|
|
| |
We unset it on destroy already. This makes it consistent with all other
scrollables.
|
| |
|
|
|
|
|
| |
Mostly making sure that return values and varargs don't loose
their docs.
|