Commit Graph

56466 Commits

Author SHA1 Message Date
Matthias Clasen
b299ac8dfa Add editable delegate api to docs
And add a section that explains how to use these
functions when setting up a GtkEditable delegate.
2019-02-19 00:25:59 -05:00
Matthias Clasen
22ea832eb3 Fix testtreesort warnings 2019-02-19 00:25:59 -05:00
Matthias Clasen
ac445229d0 a11y text test: Use a GtkText instead 2019-02-19 00:25:59 -05:00
Matthias Clasen
3422edff6c a11y tests: Update expected output
GtkText makes an appearance in many places now.
2019-02-19 00:25:59 -05:00
Matthias Clasen
102c0ce696 focus test: Use a GtkText instead
Thats where the focus is nowadays.
2019-02-19 00:25:59 -05:00
Matthias Clasen
996a4246fb defaultvalue test: Exempt GtkText::buffer
It gets created on-demand, so isn't NULL.
2019-02-19 00:25:59 -05:00
Matthias Clasen
613f8ceacf testsuite: update css node tests
The entries have changed. Reflect that.
2019-02-19 00:25:59 -05:00
Matthias Clasen
0e11944166 widget-factory: Don't set can-focus on entries
The focus needs to be on the text inside, now.
2019-02-19 00:25:59 -05:00
Matthias Clasen
08bd6904b9 file chooser: Use editable api on the search entry 2019-02-19 00:25:59 -05:00
Matthias Clasen
37b841b59b font chooser: Use editable api on search entry 2019-02-19 00:25:59 -05:00
Matthias Clasen
7d9e63ae38 app chooser: Use editable api on search entry 2019-02-19 00:25:59 -05:00
Matthias Clasen
f1012b5623 Fix the search bar example
More GtkSearchBar entry -> editable fixups.
2019-02-19 00:25:59 -05:00
Matthias Clasen
a0454e4025 gtk-demo: Make the delayed search demo work
Make this demo work with the new search entry.
2019-02-19 00:25:59 -05:00
Matthias Clasen
b8c981fb2b inspector: Work with new search entry
Don't assume a search entry is an entry, and
use the editable api as far as possible.
2019-02-19 00:25:59 -05:00
Matthias Clasen
3a1a7c43f3 treeview: make search work
Make search work with both GtkEntry and GtkSearchEntry,
even if a GtkSearchEntry is not derived from GtkEntry
anymore.
2019-02-19 00:25:59 -05:00
Matthias Clasen
fa3d1940bf search bar: Work with the new GtkSearchEntry
Don't assume a search entry is an entry, and use
the editable api as far as possible.
2019-02-19 00:25:59 -05:00
Matthias Clasen
667ea2dd42 search entry: Use a GtkText 2019-02-19 00:25:59 -05:00
Matthias Clasen
210c5d88a2 Add a test for GtkPassworkEntry 2019-02-19 00:25:59 -05:00
Matthias Clasen
c6e6fb19e7 Add GtkPasswordEntry
This is a simple editable which hides the entered
text and shows a caps-lock warning.
2019-02-19 00:25:59 -05:00
Matthias Clasen
39d5f9e07b entry completion: Make this work again
Connect to GtkText signals where necessary.
2019-02-19 00:25:59 -05:00
Matthias Clasen
cbbc7dd70f treeview: use a GtkText as search entry 2019-02-19 00:25:59 -05:00
Matthias Clasen
a31da76f95 treeview: Disable some search entry functionality
This needs to be rewritten. Until then, keep it limping along.
2019-02-19 00:25:59 -05:00
Matthias Clasen
8bb6d00ce2 search entry: temporarily disable some functions
The search entry needs to be rewritten to use a
text child until then, keep it limping along.
2019-02-19 00:25:59 -05:00
Matthias Clasen
1930c74736 spin button: Use GtkText
We already use GtkEditable api throughout. This just
means we create a GtkText instead of a GtkEntry.
2019-02-19 00:25:59 -05:00
Matthias Clasen
ea098f8d51 entry accessible: Make this work with the text widget 2019-02-19 00:25:59 -05:00
Matthias Clasen
45fb1d06e3 entry: Delegate to GtkText
Use a GtkText child, and delegate the editable functionality
to it. Also forward all the properties that are provided by
GtkText.

Some of the more internal APIs, such as layout and im context
access and caps-lock warning, are removed here, but we preserve
most of the plain GtkEntry API by forwarding it to the GtkText
child.
2019-02-19 00:25:59 -05:00
Matthias Clasen
936181f354 Add a GtkTextAccessible
Add an accessible implementation for GtkText.
2019-02-18 14:24:21 -05:00
Matthias Clasen
fcb58887fa Make emoji completion work for GtkText
GtkEntry will stop using it directly in the following commits.
2019-02-18 14:24:21 -05:00
Matthias Clasen
1801bf6d83 Add a GtkText widget
This is a GtkEntry without any of the extras, such as
icons, completion, progress, caps-lock warning, emoji icon.
2019-02-18 14:24:21 -05:00
Matthias Clasen
b9c8dd64b3 spin button: Implement and use editable interface 2019-02-17 23:07:18 -05:00
Matthias Clasen
32795963c0 entry: Implement new editable iface 2019-02-17 23:07:18 -05:00
Matthias Clasen
7325f8e204 editable: Add more to interface
Add all the things to the GtkEditable interface that
make sense for most implementations.
2019-02-17 23:07:17 -05:00
Matthias Clasen
76be7a5025 a11y: Update assistant test output
This changed as part of the recent cleanup that removed
some internal boxing.
2019-02-17 15:54:24 -05:00
Timm Bäder
c9d9f8b750 flowbox: Implement get_child_at_pos properly
With transforms in the mix, checking if the coordinate is inside the
widget "allocation" makes even less sense. Just use gtk_widget_pick()
and walk up until we find a GtkFlowBoxChild.
2019-02-16 15:45:06 +01:00
Timm Bäder
ca2c05cdb3 widget: Push a transform node if we need to
This is the same as the old code since the transformation only contains
teh offset right now, but it will be different later where arbitrary
transformations are possible per widget.
2019-02-16 15:44:46 +01:00
Timm Bäder
10e5856583 widget: Save transform as matrix
The transform matrix is a translation matrix from the parent's origin to
the widget origin. We will later allow more transformations than just
translations.
2019-02-16 15:44:37 +01:00
Timm Bäder
0739399766 paned: Implement increased handle area using pick()
Otherwise, we do report the widgets below the invisible handle area as
hovered or active.
2019-02-16 11:19:29 +01:00
Matthias Clasen
bea1a02edd Merge branch 'wip/otte/boxes' into 'master'
GtkCssBoxes

See merge request GNOME/gtk!584
2019-02-15 16:12:26 +00:00
Matthias Clasen
74d6d81db9 Merge branch 'assistant-cleanup' into 'master'
Assistant cleanup

See merge request GNOME/gtk!581
2019-02-15 15:54:53 +00:00
Matthias Clasen
e5e2bd3187 Drop GtkAssistantPage::has-padding
This is causing us some internal complications, and
it is very easy to just add padding to the pages
yourself.
2019-02-15 10:23:48 -05:00
Matthias Clasen
d327d3fab2 assistant: Use a stack
We don't use any non-stack features of the notebook here.
2019-02-15 10:23:48 -05:00
Matthias Clasen
fb4f5e0a78 assistant: Add docs
Without this, introspection complains about a missing
transfer annotation.
2019-02-15 10:23:48 -05:00
Matthias Clasen
aa552229c9 singleselection: Make tests build without warnings 2019-02-15 10:23:48 -05:00
Benjamin Otte
c44c44ee25 css: Pass boxes to the render functions
Instead of style + rect_of_one_box, pass the new GtkCssBoxes object.
This has the nice side effect that when drawing background + border +
outline, we only compute all the boxes we need once.
2019-02-15 06:53:22 +01:00
Benjamin Otte
7ad0f7fc52 css: Mark some hot functions as G_GNUC_PURE
By doing that, gcc will generate code that avoids calling these
functions when not needed.
2019-02-15 06:53:22 +01:00
Benjamin Otte
285aba6ece widget: Make width, height and transform be widget-relative
Previously, those numbers stored the values relative to the margin box
of the widget. Now they store values relative to the content box,
thereby getting rid of the last remains of weird coordinate systems.
2019-02-15 06:53:22 +01:00
Benjamin Otte
19ffb40b27 cssboxes: Introduce
Split out the code for computing CSS boxes from given variables from the
background render code. This way, it can be shared between different
codebases.

Also, make that code completely be contained of static inline functions.
That ensures that it can be 100% inlined in cases where only parts of
the rectangle are needed (like in gtk_widget_get_width() in the future).

This will require some more patches to actually work, but those will
follow.
2019-02-15 06:53:22 +01:00
Benjamin Otte
86978d2654 widget: Store the render node in the widget's coordinate system
Also require gtk_widget_snapshot() to be in the widget's coordinate
system.
2019-02-15 06:53:17 +01:00
Benjamin Otte
694d7c378b root: Move the renderer to the root 2019-02-15 06:53:17 +01:00
Benjamin Otte
446713fb8b root: Add gtk_root_get_surface_transform()
The function isn't used yet, so this is just infrastructure.
2019-02-15 06:53:17 +01:00