| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
|
| |
|
|
|
|
|
| |
Let GtkGizmo override the contains() implementation.
Update all callers to pass NULL for the contains_func.
|
|
|
|
|
| |
This boolean return was from the old gadget code and we weren't using it
in the new gizmo code.
|
|
|
|
|
| |
The values have been 0/0 for a long time now, so just drop the
GtkAllocation argument and replace it with width and height.
|
| |
|
| |
|
|
|
|
| |
As the clip is no longer needed, get rid of it.
|
|\
| |
| |
| |
| | |
Rename window to surface
See merge request GNOME/gtk!72
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is an automated change doing these command:
git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface
git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface
git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface
git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface
git sed -f g gtk_widget_set_window gtk_widget_set_surface
git sed -f g gtk_widget_get_window gtk_widget_get_surface
git sed -f g gtk_widget_register_window gtk_widget_register_surface
git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface
git checkout NEWS*
|
|/ |
|
|
|
|
|
|
|
| |
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
|
|
|
|
| |
This avoids a bunch of strdups at startup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Themes should not enforce min sizes on blocks in continuous mode; in
this case, the filled block should be as large as it needs to be to
reflect the current value, and no larger or smaller than that. So, the
fact that the minimal size was selected on just levelbar block is wrong:
we should also require the levelbar.discrete class to apply min sizes.
The widget should enforce whatever correct minimum size results from the
above fix, by reapplying commit 78b4885fe8850e132d8bb06df8ab90ac6c2033e0
Except: we should not allocate/draw the filled block if the value is 0,
as in this case, the LevelBar should be empty, not have a min-size fill.
This partially reverts commit 96062ffeae5245fa165a96a2af86d5645f5e8569,
as it makes sense to set min sizes for discrete blocks, so keep that in.
https://bugzilla.gnome.org/show_bug.cgi?id=783649
|
|
|
|
| |
now featuring the required comma :/
|
|
|
|
|
|
| |
This reverts commit d5e25be9bcd6c1a9db74ee749fa8808ba55a5ca5.
It doesn't build.
|
|
|
|
| |
Just use the original allocation, instead of copying it and passing that
|
|
|
|
|
|
|
|
|
| |
This reverts commit e25e1c54a44264de628fb3919fb47afd44e21ba5.
That commit causes a block always to be shown at the min side, even when
the value is 0, in which case, no fill should be shown.
https://bugzilla.gnome.org/show_bug.cgi?id=783649
|
|
|
|
|
|
|
|
|
|
|
| |
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.
This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
always initialize clips to the (content) allocation, don't walk up the
widget hierarchy in gtk_widget_set_clip, implement
gtk_widget_size_allocate in GtkSeparator. This way we don't end up using
uninitialized clip values.
The entire clip handling is up for major rework since we can't and don't
want to force every single widget to call _set_clip in size-allocate
implementations.
|
|
|
|
|
| |
Could result in a division by zero later on and doesn't make a lot of
sense anyway.
|
|
|
|
|
|
|
|
| |
This replaces all internal gadgets with widgets.
Remaining problem: "block" nodes have a min-width of 32px in Adwaita,
but when allocated in continuous mode, the levelbar doesn't care and
underallocates them.
|
| |
|
|
|
|
|
|
|
| |
And with it, remove the draw func from custom gadgets, that has been
NULL everywhere.
All gadgets are snapshot now.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
GtkLevelBar supports adding custom offsets as style classes, and they
are applied whenever the :value property matches. The current code,
however, only updates any CSS nodes when an offset is found, causing
it to not update when a discrete value changes but no custom offset
is added.
Fix that by always updating the CSS nodes.
https://bugzilla.gnome.org/show_bug.cgi?id=773799
|
|
|
|
|
|
|
|
| |
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
|
| |
|
|
|
|
|
| |
glib will use the correct marshaller automatically. And as a side
effect, we also get all glib optimizations, like a va marshaller.
|
|
|
|
|
|
| |
We create and destroy gadgets inside the levelbar hierarchy here,
and if we don't explicitly remove their CSS nodes from the parent,
they stick around.
|
|
|
|
|
|
| |
We were freeing the old offset before using its name to
recreate a new one. Don't do that.
Found by gcc's undefined behavior sanitizer.
|
| |
|
|
|
|
|
|
|
|
| |
We had some odd special-casing for the lowest and highest offset
that did not quite work. The new rule is simple: If the value
is between offset n-1 and n, it gets the style for offset n.
https://bugzilla.gnome.org/show_bug.cgi?id=761416
|
|
|
|
|
|
| |
The docs were not explaining at all what happens to existing
level offsets when the min- or max-value of a level bar are
changed.
|
|
|
|
|
| |
We are adding 3 offsets, not just two. Add a define for the
third one, and mention it in the docs.
|
|
|
|
|
|
|
|
|
| |
During the gadget conversion, the drawing of discrete levelbars
was unintentionally changed to draw a wide trough but narrow
blocks, which does not look great. So go back to the previous
way of drawing things.
https://bugzilla.gnome.org/show_bug.cgi?id=761428
|
| |
|
|
|
|
|
| |
Use gtk_css_gadget_set_state in all the places where we previously
were getting a node from a gadget, just to call gtk_css_node_set_state.
|
|
|
|
|
| |
Instead of just picking the first. This is because the theme might set a
border on only one of them, like the HighContrast theme does.
|
|
|
|
| |
We're always interested in the minimum size.
|
| |
|
|
|
|
| |
We now use one gadget for the trough, and one for each block.
|
| |
|
|
|
|
|
| |
We should not try to access a block with an index that exceeds the
number of blocks in the widget.
|
|
|
|
|
| |
Clarify the use of brackets in the CSS node diagrams:
[] means optional nodes or classes, <> means child widgets.
|
|
|
|
|
|
|
|
| |
Instead of having old and new style, now have a GtkCssStyleChange opaque
object that will compute the changes you are interested in for you.
This simplifies change signal handlers quite a bit and avoids lots of
repeated computation in every signal handler.
|