Commit Graph

36549 Commits

Author SHA1 Message Date
Matthias Clasen
2ac51ad827 centerlayout: Some spacing-related fixes
Try to arrange for border-spacing to actually be
respected in the final layout.

Fixes: #3081
2020-08-24 11:34:30 -04:00
Matthias Clasen
2e72b663b0 Merge branch 'wip/carlosg/start-spinbutton-start' into 'master'
gtkspinbutton: Group up/down button gestures with self

Closes #3085

See merge request GNOME/gtk!2471
2020-08-24 13:31:06 +00:00
Carlos Garnacho
e61f516a7c gtkspinbutton: Group up/down button gestures with self
We are adding click gestures on the up/down buttons, but can't let
the GtkButton built-in ones prevent ours to run.

As the saying goes, if you can't beat them, join them. Group the
spinbutton and GtkButton gestures together, so it's irrelevant which
gets called first and ends up winning.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3085
2020-08-24 14:55:47 +02:00
Matthias Clasen
6043ed8c89 docs: Some updates to GtkWidgetClass docs
Mention layout managers for vfuncs that are skipped
if you have one.
2020-08-23 20:40:15 -04:00
Matthias Clasen
40d7092f4a widget: Queue a draw when we need to
The code in gtk_widget_real_css_changed assumes that
queue_resize > queue_allocate > queue_draw, but the
second one is not really true. These days, we happily
keep reusing the same render node even when the child
allocation is changed.

So, if a css change has flags that tell us we should
redraw, we need to queue a draw, otherwise we might
end up reusing an outdated render node.

This fixes spinners staying visible when they stop
spinning, despite the theme setting their opacity
to 0.
2020-08-23 17:07:37 -04:00
Matthias Clasen
dc963dcbcb Cosmetics
gtk_css_style_change_affects takes flags for a reason,
no need to call it multiple times.
2020-08-23 16:45:15 -04:00
Matthias Clasen
c4d350c260 build: Start using meson feature options
Use feature options for things that are optional features,
update the docs.

Visible changes here is that the 'print-backends' option
got renamed to 'print' to go better with 'media', and the
'tracker3' option got renamed to 'tracker'.

For options that have been changed into features, the
syntax now is -Dfeature=enabled or -Dfeature=disabled
or -Dfeature=auto.
2020-08-23 16:45:15 -04:00
Matthias Clasen
54e4bf8b75 Fix a leak in the font chooser widget
Contrary to what you may expect, pango_attr_font_desc_new()
is not transfer full, it makes a copy of the font description.
2020-08-23 16:45:15 -04:00
Jakub Steiner
a498aca3ab Adwaita: error labels insensitive & backdrop states
- address colored labels for the two states

See https://gitlab.gnome.org/GNOME/gtk/-/issues/3063#note_891618
2020-08-22 10:14:11 -04:00
Matthias Clasen
4eacfdba60 Merge branch 'remove-unnecessary-frames' into 'master'
Remove unnecessary frames from some widgets

See merge request GNOME/gtk!2462
2020-08-22 14:09:35 +00:00
nana-4
6a7a0f0b8a viewport: Remove unused frame
We've always removed this with Adwaita.
2020-08-22 09:30:28 +09:00
nana-4
1948f8a07f placessidebar: Remove unused frame
We've always removed this with Adwaita.
2020-08-22 09:23:52 +09:00
nana-4
8eb807d7f4 entrycompletion: Remove unnecessary frame
The popover already has a border as a frame. Don't create double
borders.
2020-08-22 09:18:31 +09:00
Matthias Clasen
125ed52ccb Merge branch 'new-sysprof' into 'master'
Port profiling to sysprof-collector api

See merge request GNOME/gtk!2457
2020-08-21 23:58:09 +00:00
Matthias Clasen
7a9501b1fb Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2461
2020-08-21 22:36:45 +00:00
Matthias Clasen
f00e2e2146 inhibit: Pass valid arguments when Inhibiting
When we pass "" as reason, gnome-session responds
with a "Reason not specified" error. So, send
"Reason not specified" instead. Its true.
2020-08-21 17:40:36 -04:00
Matthias Clasen
ab5e62ddab Merge branch 'matthiasc/for-master' into 'master'
layoutmanager: Fix the child-widget property

Closes #3080

See merge request GNOME/gtk!2460
2020-08-21 20:45:53 +00:00
Matthias Clasen
865b29500c layoutmanager: Fix the child-widget property
We were setting the child-widget property to the parent.
Oops.
2020-08-21 14:29:14 -04:00
Matthias Clasen
ed67d9c103 Merge branch 'codespell-changes' into 'master'
*: Fix spelling mistakes found by codespell

See merge request GNOME/gtk!2459
2020-08-21 17:32:12 +00:00
Matthias Clasen
d4e069a629 Port tracing to the sysprof collector api
Use the new sysprof collector api to do tracing.
2020-08-21 10:55:01 -04:00
Matthias Clasen
a416650f6b application: Drop support for profiler activation
Drop support for the org.gnome.Sysprof3.Profiler
D-Bus interface. It is not really used, and if
we don't expose it, we can simplify our profiler
infrastructure.
2020-08-21 10:55:01 -04:00
Matthias Clasen
e5d088208a Merge branch 'fontconfig-speedup' into 'master'
Trigger fontconfig initialization early

See merge request GNOME/gtk!2454
2020-08-21 14:49:31 +00:00
Björn Daase
6315cd977c *: Fix spelling mistakes found by codespell 2020-08-21 15:29:34 +02:00
Jason Francis
2437622b5f
builder-tool: Rewrite GtkBox
Rewrite expand/fill properties on GtkBox to
hexpand/halign/vexpand/valign on the child widget.

Rewrite GtkVBox and GtkHBox to GtkBox, setting the orientation
property.

Added a test for boxes.
2020-08-20 23:41:29 -04:00
Jakub Steiner
dd2e1e4867 Merge branch 'wip/jimmac/rich-list-styling' into 'master'
Adwaita: rich-list styling

See merge request GNOME/gtk!2456
2020-08-20 20:58:31 +00:00
Jakub Steiner
5f630481db Adwaita: rich-list styling
FIXME: why is the second list in Demo>List Box>Controls taller?

https://gitlab.gnome.org/GNOME/gtk/-/issues/3073
2020-08-20 19:39:18 +02:00
nana-4
e07827e976 frame: Set GTK_OVERFLOW_HIDDEN
It doesn't really make sense for the frame to allow drawing children
outside of it.
2020-08-20 22:24:36 +09:00
Matthias Clasen
a674832658 Trigger fontconfig initialization early
Add a pango call to create the fontmap already in gtk_init.
This will let us hide the cost of FcInit() (which on font-heavy
systems can be ~100ms) in a thread, on the pango side.
2020-08-19 22:12:00 -04:00
Matthias Clasen
2031bcd388 Merge branch 'replace-hardcoded-margins' into 'master'
tooltip & placessidebar: Replace hard-coded margins with theme

See merge request GNOME/gtk!2444
2020-08-20 00:30:37 +00:00
Timm Bäder
ec81ccd5f9 label: Try to avoid a pango_layout_get_extents call
Measuring text is quite expensive, so only do this if really necessary.
2020-08-19 16:14:59 -04:00
Jakub Steiner
aabb713594 Adwaita: error labels insensitive & backdrop states
- address colored labels for the two states

See https://gitlab.gnome.org/GNOME/gtk/-/issues/3063#note_891618
2020-08-17 10:00:29 +02:00
nana-4
19c2cc1296 placessidebar: Replace hard-coded margins with theme
So we can easily adjust the widget sizing in the theme.
2020-08-15 22:46:31 +09:00
nana-4
9b42edbef4 tooltip: Replace hard-coded margins with theme
So we can easily adjust the widget sizing in the theme.
2020-08-15 22:46:31 +09:00
Matthias Clasen
303e023c36 Merge branch 'gtkassistant_docstring' into 'master'
gtkassistant: Minor docstring wording changes

See merge request GNOME/gtk!2442
2020-08-15 12:49:29 +00:00
nana-4
667b3b117d pathbar: Set .slider-button style class to slider buttons again
This was set in the .ui file that no longer exists, so we need to set it
again here.
2020-08-15 18:31:32 +09:00
Holger Knust
cb7c903594 gtkassistant: Minor docstring wording changes
Changed the wording to improve the clarity of the documentation. Fixed grammar issue ("spllited")
2020-08-15 05:20:03 -04:00
Matthias Clasen
fa0a88ae22 Merge branch 'api-touchups' into 'master'
Api touchups

See merge request GNOME/gtk!2439
2020-08-14 12:47:50 +00:00
Jakub Steiner
131e2f6e43 Adwaita: error labels and entries
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3063
2020-08-14 14:13:37 +02:00
Matthias Clasen
ae7cefd97d Drop style class defines
We document the supported style classes by name,
not by macro name, and these macros don't really
add any value. Drop them for GTK 4.
2020-08-14 07:03:27 -04:00
Matthias Clasen
35708162cc Make GtkNativeInterface private
We are not sure yet if allowing out-of-tree
implementations of GtkNative are a good idea.
2020-08-14 07:03:27 -04:00
Matthias Clasen
e48a1d2df0 Merge branch 'list-styles' into 'master'
Implement and document list styles

See merge request GNOME/gtk!2421
2020-08-13 21:15:22 +00:00
Jakub Steiner
f4561d3fd5 Adwaita: rich-list rows
- add whitespace to match the existing look
2020-08-13 16:30:22 -04:00
Jakub Steiner
c5963b960a Adwaita: fix focus for .navigation-sidebar 2020-08-13 16:30:22 -04:00
Matthias Clasen
b49fd47276 Adwaita: Fix hover in navigation sidebars
The placessidebar gets this from somewhere else, but
it wasn't working in the gtk-demo sidebar, so add it
explicitly. placessidebar specific styles should be
dropped from Adwaita as much as possible, but not
doing that here.
2020-08-13 16:30:22 -04:00
Jakub Steiner
bdb1d87859 Adwaita: style rich-list and data-table
- style special list types
- add navigation-sidebar too

https://gitlab.gnome.org/GNOME/gtk/-/issues/2929
2020-08-13 16:30:22 -04:00
Matthias Clasen
0279e1c76b inspector: Use the new list style classes
Set .rich-list and .data-table on lists, as appropriate.
2020-08-13 16:30:21 -04:00
Matthias Clasen
cce3ff6f04 placessidebar: Use the .navigation-sidebar style class 2020-08-13 16:30:21 -04:00
Matthias Clasen
221786dda3 lists: Mention list style classes in docs
Document that GtkListView, GtkColumnView and GtkListBox
support .rich-list, .navigation-sidebar and .data-table
style classes.
2020-08-13 16:30:21 -04:00
Matthias Clasen
ea887959bd textbuffer: Some more insert_with_attributes speedup
There is no need for use to collect tags in an array;
we can just insert them into the text buffer right away.
2020-08-13 12:36:39 -04:00
Antoine Jacoutot
b4508be3c9 OpenBSD: don't include malloc.h
This header doesn't exist anymore on recent OpenBSD releases.
2020-08-13 17:48:34 +02:00