Commit Graph

36628 Commits

Author SHA1 Message Date
Sebastian Dröge
ae5d1cd161 Annotate sequence argument of GtkGesture signals as nullable 2020-09-02 13:32:20 +03:00
Matthias Clasen
062822ab06 Merge branch 'checkbutton-fixes' into 'master'
Checkbutton fixes

See merge request GNOME/gtk!2518
2020-09-01 22:15:33 +00:00
Matthias Clasen
746bdd3d47 checkbutton: Don't notify write-only properties
Nobody is listening...
2020-09-01 16:31:07 -04:00
Matthias Clasen
c5c67cbb8c action helper: Drop G_GNUC_INTERNAL from headers
We haven't needed this for a long time now.
2020-09-01 16:29:21 -04:00
Matthias Clasen
639c839ba4 Add docs about grouping via action
Mention this in the docs for gtk_check_button_set_group
and gtk_toggle_button_set_group.
2020-09-01 16:29:21 -04:00
Matthias Clasen
5f8769e1a8 checkbutton: Support GtkActionable properly
Support grouping buttons via a radio action, as well
as via explicit gtk_check_button_set_group() calls.
2020-09-01 16:29:21 -04:00
Matthias Clasen
3569360949 actionhelper: Add a getter
Add a getter for the GtkActionHelper:role property.
2020-09-01 16:29:20 -04:00
Matthias Clasen
1c0bf2604c checkbutton: Don't leak the action helper 2020-09-01 15:24:34 -04:00
Matthias Clasen
1bbab5664d Merge branch 'license-clarification' into 'master'
License clarification

See merge request GNOME/gtk!2517
2020-09-01 18:58:52 +00:00
Matthias Clasen
87855dd375 Move timsort sources to a subdirectory
This makes it easier to identify the files that
belong together, and are under the same license.
2020-09-01 14:25:56 -04:00
Matthias Clasen
0e6eba3968 inspector: Plug another memory leak
Fixes: #3107
2020-09-01 13:06:20 -04:00
Matthias Clasen
aaef9bec7f treelistrowsorter: Plug a memory leak 2020-09-01 13:01:34 -04:00
Matthias Clasen
391c05ef70 inspector: Plug a small memory leak 2020-09-01 12:57:08 -04:00
Matthias Clasen
b628338db3 list widgets: Simplify the constructors
Now that both arguments to the _new_with_factory() constructors
are nullable, there's no good reason to keep a separate _new()
around. Just make gtk_list_view_new() and gtk_grid_view_new()
take both a model and a factory.
2020-09-01 12:24:06 -04:00
Matthias Clasen
7051fdee5d Merge branch 'projective-transform' into 'master'
Replace uses of graphene_matrix_transform_

See merge request GNOME/gtk!2514
2020-09-01 13:44:38 +00:00
Matthias Clasen
e36b594867 Replace uses of graphene_matrix_transform_
Replace our uses of graphene_matrix_transform_point,
_point3d and _bounds by our own versions that handle
projective transforms correctly.

This fixes render node bounds being incorrect for widgets
involving projective transforms (e.g. testrevealer swing
transformations), and also fixes picking on such widgets.
2020-09-01 09:18:38 -04:00
Benjamin Otte
a8d6ba9517 Merge branch 'view-selection-model-3' into 'master'
list widgets: Use selection models in the api

See merge request GNOME/gtk!2512
2020-09-01 11:08:51 +00:00
Matthias Clasen
9377ce984d Merge branch 'adwaita-more-border-spacing' into 'master'
Adwaita: Add border-spacing to some container widgets and style classes (properly)

See merge request GNOME/gtk!2479
2020-08-31 21:17:21 +00:00
Matthias Clasen
8d79a32c50 list widgets: Use selection models in the api
Change the apis in GtkListView, GtkColumnView and
GtkGridView to be explicitly about GtkSelectionModel,
to make it obvious that the widgets handle selection.

Update all users.
2020-08-31 17:15:05 -04:00
Matthias Clasen
ccb447da02 Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

Closes #2777

See merge request GNOME/gtk!2503
2020-08-31 16:30:21 +00:00
Matthias Clasen
76b5ff6a00 pagesetupdialog: Just use labels in check buttons
Check buttons lost their ability to hold general
content. And while that is maybe sad, the tiny
images here are not really useful anyway, and
should just go away.
2020-08-31 12:05:53 -04:00
nana-4
4cf9228659 Adwaita: Ensure button.circular is a perfect circle
It seems the commit 9d60047616 had no
effect, even on image buttons.
2020-08-31 11:24:46 +02:00
Jakub Steiner
2f0a4c7128 Adwaita: rich-list styling
FIXME: why is the second list in Demo>List Box>Controls taller?
2020-08-31 11:21:57 +02:00
Matthias Clasen
17c4838569 Drop GtkRadioButton 2020-08-30 22:25:36 -04:00
Matthias Clasen
bb6045f02d builder-tool: Replace radio buttons by check buttons
For --3to4, replace GtkRadioButton by either GtkCheckButton
or GtkToggleButton, depending on the value of :draw-indicator.

Update the testsuite to cover this.
2020-08-30 22:17:31 -04:00
Matthias Clasen
28d7f497ef togglebutton: Add grouping
This is the replacement for groups of radiobuttons
with draw-indicator = FALSE.
2020-08-30 22:14:05 -04:00
Matthias Clasen
c7b6c2f441 Remove GtkRadioButton references in the docs 2020-08-30 21:23:25 -04:00
Matthias Clasen
2c5c938f0d Clean up uses of gtk_toggle_button_get/set_active
Replace all uses on check buttons by the corresponding
check button api.
2020-08-30 21:23:25 -04:00
Matthias Clasen
cd284da794 checkbutton: Reuse a helper function 2020-08-30 21:23:25 -04:00
Matthias Clasen
591b52584e checkbutton: Fix clicking on the last group member
Clicking on the last group member was letting me
uncheck it, creating a radio group without active
item, which is not what we want.
2020-08-30 21:23:25 -04:00
Matthias Clasen
f30d32f609 pagesetupdialog: Drop gtkradiobutton.h include
No longer used.
2020-08-30 21:23:25 -04:00
Matthias Clasen
33b65d5e61 stackswitcher: Drop gtkradiobutton.h include
No longer used.
2020-08-30 21:23:25 -04:00
Matthias Clasen
00124b593e inspector: Drop gtkradiobutton.h include
No longer used.
2020-08-30 21:23:25 -04:00
Matthias Clasen
2d6c43b598 checkbutton: Drop gtkradiobutton.h include
No longer used.
2020-08-30 21:23:25 -04:00
Matthias Clasen
d6e1276fe1 mountoperation: Stop using radio buttons
Use grouped check buttons instead.
2020-08-30 21:23:25 -04:00
Matthias Clasen
151b9c71db printeroptionwidget: Stop using radio buttons
Use grouped check buttons instead.
2020-08-30 21:23:25 -04:00
Matthias Clasen
d3042dabf4 printdialog: Make collate image smaller
This matches the appearance on GTK 3, and prevents
the checkbuttons next to the image from being spaced
out.
2020-08-30 17:59:23 -04:00
Matthias Clasen
830b2b7f30 printdialog: Fix radio groups
We need to use grouped checkbuttons now.
2020-08-30 17:59:23 -04:00
Matthias Clasen
af155838bd fontchooser: Fix radio groups for features
We need to use grouped checkbuttons now.
2020-08-30 17:59:23 -04:00
Matthias Clasen
5ef0ed1189 inspector: Add some translator comments
Some of the strings we have here are hard to translate,
so leave some hints, and some context.

Fixes: #3104
2020-08-30 13:12:10 -04:00
Matthias Clasen
071763c844 inspector: Add a dark background to the recorder
Add a button to toggle the background in the node
view between dark and light. This helps to discern
the borders of some nodes.
2020-08-30 08:59:13 -04:00
Matthias Clasen
c69ac09afb Another attempt to make circular buttons square
circular button, square hole...
2020-08-30 08:34:30 -04:00
Matthias Clasen
8e74687ab3 page setup dialog: Prevent cascading paper dialogs
We trigger the paper dialog when the "manage" item
in the dropdown is selected. But the selection also
changes due to internal changes, such as reloading
the custom paper list when the paper dialog is
closed. We need to be extra careful to avoid triggering
another paper dialog when that happens.

Fixes: #3098
2020-08-29 16:30:34 -04:00
Matthias Clasen
15c6760a96 print dialog: Prevent cascading paper dialogs
We trigger the paper dialog when the "manage" item
in the dropdown is selected. But the selection also
changes due to internal changes, such as reloading
the custom paper list when the paper dialog is
closed. We need to be extra careful to avoid triggering
another paper dialog when that happens.
2020-08-29 16:30:26 -04:00
Matthias Clasen
0f42d37f8b css: Fix parsing of scientific notation
The parser got its chars mixed up while parsing numbers
like 2.3e-04. While it is unlikely to meet such numbers
in human-generated css, we do have them e.g. when saving
render node trees with transforms.

Also add some css parser tests for number parsing.
2020-08-29 12:44:26 -04:00
Timm Bäder
1375fb4464 Change button hierarchy
A radiobutton without indicator is really just a togglebutton with a
group.

A radiobutton with indicator is really just a checkbutton with a group.

Make checkbutton its own widget not inheriting from GtkButton.
GtkRadioButton could be removed but it stays for now.

Radiobutton && !draw-indicator => Togglebutton
Checkbutton && !draw-indicator => Togglebutton

Radiobutton && draw-indicator => CheckButton + group
2020-08-29 16:46:28 +02:00
Timm Bäder
0fd8a287fc spinbutton: Whitespace 2020-08-29 11:11:29 +02:00
Timm Bäder
1d6ac9b47b button: Use gtk_widget_class_add_shortcut directly
To show how that works
2020-08-29 11:11:29 +02:00
Timm Bäder
acbb59bfae button: Whitespace 2020-08-29 11:11:29 +02:00
Matthias Clasen
5b5d2665d3 idle sizer: Request a motion event after layout
When we are reallocating widgets, make sure that
we get a motion event in the next frame cycle,
so the hover state gets updated.
2020-08-27 16:01:45 -04:00