Commit Graph

36558 Commits

Author SHA1 Message Date
nana-4
c0efadc0f3 Adwaita: Make frames rounded
As per GNOME mockups.

Since GtkFrame now sets GTK_OVERFLOW_HIDDEN, we can round the frame
without corner overlapping.

This also adds some margin to the child label of GtkFrame to ensure it
will not be clipped by the rounded corners of the frame.
2020-08-25 21:12:35 +09:00
nana-4
ef837f0415 Adwaita: Remove a shadow-type leftover
After commit edae2a8dc5, frames always
draw frames. So, remove the unused frame.flat styling.
2020-08-25 21:12:35 +09:00
Matthias Clasen
43ec96684a text: Properly handle focus moving to a descendent
To discriminate between is-focus and contains-focus,
we need to use notify::is-focus. This makes sure
we don't get annoying warnings when the blink_cb
gets triggered on an unfocused entry.

Fixes: #2979
2020-08-24 18:31:35 -04:00
Matthias Clasen
66e0f8505e emojichooser: Grab focus on map
This is the right thing to do, since we have a visible
entry and want text input to go there.
2020-08-24 18:31:08 -04:00
Matthias Clasen
fd7d61887c colorchooser: Fix the add_palette api
When adding a custom palette, we need to arrange
for the custom section to stay at the bottom.

Maybe there should be a way to turn off custom
colors, too.
2020-08-24 17:20:17 -04:00
Matthias Clasen
7ff326e700 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #3081

See merge request GNOME/gtk!2472
2020-08-24 16:43:39 +00:00
Matthias Clasen
d27f9abbca Merge branch 'unmapped-text' into 'master'
Unmapped text

See merge request GNOME/gtk!2466
2020-08-24 15:52:08 +00:00
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
ca0f136deb text: Don't compute invisible char needlessly
There is no real reason to do expensive text layout
operations unless we need the invisible char because
the text's visibilty is FALSE.
2020-08-23 17:41:13 -04:00
Matthias Clasen
c0191c7225 text: Defer most recomputation until we're mapped
It doesn't make sense to update scroll positions or
im cursor locations while we're unmapped, and doing
so causes us to do expensive text measuring.
2020-08-23 17:41:13 -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