| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Include gtkprivate.h for I_() and glib-i18n.h for
gettext macros.
|
| |
|
|
|
|
|
|
|
| |
Due to a bug in gi-docgen we're not getting a warning if a fragment to a
type does not match the actual type, and we're generating a broken link.
See: https://gitlab.gnome.org/GNOME/gi-docgen/-/merge_requests/120
|
|
|
|
| |
Replace leftover gtk-doc syntax (#Type) with backquotes.
|
| |
|
|
|
|
| |
Drop the old gtk-doc'isms, and use the gi-docgen links instead.
|
|
|
|
|
|
| |
We were inadvertently turning constant constraints into
constraints against super, due to confusion between target
and source attribute.
|
|
|
|
|
|
|
|
|
|
|
| |
When using GtkBuilder to create constraints and guides,
the layout manager is already rooted when the guides get
created, and we were forgetting to create the guides
constraints in this case. Fix it by adding a call to
gtk_constraint_guide_update().
This was showing up in the new builder-based constraints
demo as the guide not having the expected effect.
|
|
|
|
|
|
|
| |
This isn't strictly required for correctness, but
it makes the GtkBuilder codepath do the same that
the vfl codepath does: call gtk_layout_manager_layout_changed
only once, after all the constraints have been added.
|
|
|
|
|
| |
Guides were not properly looked up when creating
constraints in a ui file.
|
|
|
|
| |
This fixes several typos and missing references
|
|
|
|
|
| |
Now that we can have an element-type annotation, we should use it where
needed.
|
|
|
|
|
| |
The loop is iterating over the wrong variable, and it's reimplementing
g_strfill() in a less efficient way.
|
| |
|
|
|
|
|
|
| |
Provide list models for the constraints and guides,
so we can show them in the inspector, and use them
in e.g. the constraints editor.
|
|
|
|
| |
Like we describe constraints, we can also define guides.
|
|
|
|
|
| |
Using GtkBuildable we can provide a custom parser for reading
constraints defined in a GtkBuilder UI file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of playing games with mapping negative symbolic values to
positive ones, let's use the appropriate constants everywhere. This
allows us to use:
GTK_CONSTRAINT_STRENGTH_WEAK * 2
Or
GTK_CONSTRAINT_STRENGTH_STRONG + 1
In code using the public API.
We also store the strength values as integers, so we can compare them
properly, and only turn them into doubles when they are inserted into
the solver, just like every other variable.
|
|
|
|
|
| |
Make sure all types show up in the docs,
and misc other improvements.
|
|
|
|
|
|
| |
We want to minimize changes to the solver, so
keep the size constraints around and only update
them when the size changes.
|
|
|
|
|
| |
We want our edit constraint to be strong enough to
overpower nat. size constraint, therefore use STRONG * 2.
|
|
|
|
|
| |
The name of the arguments of the functions must match the name of the
arguments in the documentation stanza.
|
|
|
|
|
| |
Since the public API will use it to fill out GErrors, it needs to be
publicly available.
|
|
|
|
|
| |
We should mark the layout as changed when
constraints are added or removed.
|
|
|
|
|
| |
If trust our allocation algorithm, this can never
trigger (and in fact, it never does).
|
|
|
|
|
|
| |
In measure and allocate we are potentially
changing quite a few constraints. Don't
optimize at every step.
|
|
|
|
|
|
|
|
| |
Only constraint the opposite direction if we
actually have a for_size, and measure natural
size after removing the edit constraints. With
these changes, the test that compares constraint
layout to grid layout passes.
|
|
|
|
|
|
|
| |
It makes more sense to treat the natural size
of both children and guides as stays, since
we want to meet these values as closely as we
can, under the circumstances.
|
|
|
|
|
|
|
| |
Print out the allocation we end up giving to
guides. This helps in making sense of the
allocations of the child widgets that these
guides relate to.
|
|
|
|
|
|
|
|
|
| |
Set up all constraints for minimum + natural
width + height when measuring, regardless
of the orientation we're measuring. Anything
else will lead to incorrect answers when
there are constraints that cut across
dimensions.
|
|
|
|
|
|
|
| |
This commit moves GtkConstraintGuide into its own
source files to avoid gtkconstraintlayout.c turning
too messy, adds max size properties and implements
getters and setters.
|
|
|
|
|
|
| |
This struct is not really useful for just
a single hash table, and it gets in the way
of moving the guide code to its own file.
|
|
|
|
| |
We don't want to leave constraints behind.
|
|
|
|
|
|
| |
Store the values and constraints in
arrays, to facilitate treating them
uniformly.
|
|
|
|
| |
Otherwise it's impossible to remove them.
|
| |
|
|
|
|
|
| |
The dictionary-based function is convenient for language bindings, but C
developers will feel more at home with a variadic arguments list.
|
| |
|
|
|
|
| |
This is meant to be a flexible space.
|
|
|
|
|
| |
This is in preparation for allowing non-widgets
to act as constraint targets.
|
|
|
|
| |
Changing the set of constraints should cause a relayout.
|
|
|
|
|
|
|
|
|
| |
We cannot use the given "for size" when querying our children, because
the constraint layout has no idea about the opposite size of its
children until the layout is complete.
Additionally, we should only suggest an opposite size for the layout if
we have one, instead of suggesting a weak zero size.
|
|
|
|
|
|
| |
The size constraints are transient to measurement and allocation, so
they don't really need to be stored inside the GtkLayoutChild subclass
created by a GtkConstraintLayout.
|
|
|
|
|
|
|
|
|
|
| |
The relations between left, right, width
and top, bottom, height are required for
internal consistency. It doesn't make sense
to ever drop these.
Changing the strength of these relations makes
my systems behave much more stable.
|
|
|
|
| |
Otherwise, you can't do many interesting things.
|
|
A layout manager using GtkConstraintSolver to measure and allocate
children.
|