Commit Graph

59219 Commits

Author SHA1 Message Date
Timm Bäder
a7f23ebe7d cssimage: Use gtk_internal_return_val_*
GtkCssImage is not public and being used in hot paths, e.g. CSS.
2019-09-09 17:36:23 +02:00
Timm Bäder
0f9a02e6f4 gtkprivate: Only define gtk_internal_return_if* for consistency checks
The wanted behavior here is that these are only defined if the buildtype
is debug, i.e. full debugging.
2019-09-09 17:36:23 +02:00
Timm Bäder
4b4b77ca04 cssanimatedstyle: Save animation in array 2019-09-09 17:36:23 +02:00
Timm Bäder
a231648607 cssanimatedstyle: Avoid type check in loop
We can just do the check once as source is not going to change within
the loop.
2019-09-09 17:36:23 +02:00
Timm Bäder
eeb5cd2321 cssanimatedstyle: Avoid unnecessary transition work
No need to do all the transition work if the transition duration will be
0 for all of them.
2019-09-09 17:36:23 +02:00
Timm Bäder
5c705ae9a5 cssrgbavalue: Add & use new_white() 2019-09-09 17:36:23 +02:00
Timm Bäder
19f69f6ac8 cssrgbavalue: Add an opaque white singleton
Used a few hundred times in the widget-factory.
2019-09-09 17:36:23 +02:00
Timm Bäder
ad1340cab4 cssrgbavalue: Add a singleton for transparent colors
The most common background color is no background color.
2019-09-09 17:36:23 +02:00
Timm Bäder
3a3a59c188 cssdimensionvalue: Create a few more common singletons 2019-09-09 17:36:23 +02:00
Timm Bäder
6ed6cc46de cssstaticstyle: Make set_value (transfer-full)
We only call this in one place and we can avoid a ref + unref pair this
way.
2019-09-09 17:36:23 +02:00
Timm Bäder
6837e80d14 css: Avoid more type checks in hot paths 2019-09-09 17:36:23 +02:00
Timm Bäder
4f3e65e745 csspalettevalue: Use simple arrays instead of a hashtable
Use two sorted name/value arrays to save the colors instead of a
hashtable. This makes palette values faster to compare etc.
2019-09-09 17:36:23 +02:00
Timm Bäder
36a1b69a19 cssanimatedstyle: Remove some casts in hot paths
gtk_css_animated_style_create_css_transitions down from 16% to 11%
when repeatedly clicking on a spinbutton button in the widget factory.
2019-09-09 17:36:23 +02:00
Timm Bäder
1f11892de4 bitmask: Add _gtk_allocated_bitmask_to_string 2019-09-09 17:36:23 +02:00
Timm Bäder
1bc8f3ac6e Adwaita: Hack around list button styling
Once again.
2019-09-09 17:36:23 +02:00
Timm Bäder
e62f10d5f0 widget-factory: Add a spinbutton in a list 2019-09-09 17:36:23 +02:00
Timm Bäder
822547dfef spinbutton: Use a box layout 2019-09-09 17:36:23 +02:00
Timm Bäder
c0214cfcc1 menubutton: Add a create_popup_func
Some use cases require a menu button to create the popup on demand.
2019-09-09 17:36:23 +02:00
Timm Bäder
cb6d96d65f menubutton: Remove unused member 2019-09-09 17:36:23 +02:00
Timm Bäder
4cc4868e93 label: Remove "line" from wrap properties
The property names are "wrap" and "wrap-mode", so it doesn't make sense
that the accessors refer to line_wrap and line_wrap_mode.
2019-09-09 17:36:23 +02:00
Timm Bäder
6c90d3a1b6 gsktransform: Fix documentation comment
There is no @m.
2019-09-09 17:36:23 +02:00
Timm Bäder
ffab342fc4 snapshot: Stop exporting _append_node_internal
Unused outside of gtksnapshot.c
2019-09-09 17:36:23 +02:00
Matthias Clasen
1203dc501c popover menubar: Use nested popover menus
Make the popover menubar use nested menus, to
better match the expected behavior of traditional
menus.
2019-09-08 19:02:06 -04:00
Matthias Clasen
3cbf1845a9 Add a timeout for open submenus
When a popover menu has an open submenu,
delay activating another item until after
the pointer is stationary for a little
while. This avoids the need for precise
horizontal motion when moving towards the
submenu.
2019-09-08 19:02:06 -04:00
Matthias Clasen
ea44eade21 Add nesting popover menus
Add a variant of popover menus that are nesting
like traditional menus. This is a better fit for
replacing traditional main menus.
2019-09-08 19:02:06 -04:00
Matthias Clasen
c75a368bab popover: Support vertical aligment
We already support horizontal alignment, and
we should do the same for vertical alignment.
2019-09-08 19:02:06 -04:00
Matthias Clasen
bc8d2add04 widget-factory: Add more submenus
Split the "Checks & Radios" submenu in the menubar
into two, so we can test opening multiple submenus.
2019-09-08 19:02:06 -04:00
Timm Bäder
c53f58e839 Merge branch 'wip/chergert/remove-emit-by-name' into 'master'
texttag: avoid use of g_signal_emit_by_name()

See merge request GNOME/gtk!1088
2019-09-08 07:40:55 +00:00
Piotr Drąg
50543a7948 Update POTFILES.skip 2019-09-07 13:29:47 +02:00
Marek Černocký
f7cd22d5ec Updated Czech translation 2019-09-07 12:10:12 +02:00
Emin Tufan Çetin
b136c77031 Update Turkish translation 2019-09-06 18:50:05 +00:00
Bob Ham
6bfe171058 gtkapplication-dbus: Initialise screensaver-active property
When GtkApplication starts listening to the screensaver's D-Bus
status, the screensaver-active property is not initialised and
applications making use of the property are out of sync until the
first state change.  Any application starting when the screensaver is
active will think it's inactive.

To fix this, we set the property when we first start monitoring the
screensaver.
2019-09-06 14:59:27 +01:00
Christian Hergert
5e49da1d73 textview: optimize linedisplay cache based on number of visible rows
This tries to estimate the number of visible rows in a textview based on
the default text size and then tunes the GtkTextLineDisplayCache to keep
3*n_rows entries in the cache.

This was found imperically to be near the right cache size. In most cases,
this is less than the number of items we cache now. However, in some cases,
such as the "overview map" from GtkSourceView, it allows us to reach a
higher value such as 1000+. This is needed to keep scrolling smooth on
the larger view sizes.

With this patch, a HiDPI system with a GtkSourceView and GtkSourceMap
from the GTK 4 port can perform smooth scrolling simultaneously.
2019-09-05 19:06:35 -07:00
Christian Hergert
cc7ae525ef texttag: avoid use of g_signal_emit_by_name()
This avoids looking up the signal by name and instead uses the saved
signal identifier from gtktexttagtable.c
2019-09-04 19:39:24 -07:00
Matthias Clasen
a29853f53b Merge branch 'wip/chergert/faster-comparison' into 'master'
textlayout: remove use of GtkTextIter in line comparison

See merge request GNOME/gtk!1087
2019-09-04 17:02:06 +00:00
Christian Hergert
7cea21043e textlayout: remove use of GtkTextIter in line comparison
We do not need to create a GtkTextIter to perform the comparison here as
that will require a number of validation steps that are extra work
compared to just discovering the GtkTextLine number directly.
2019-09-04 09:12:54 -07:00
Matthias Clasen
cbdea09c92 Merge branch 'gtk-4-issue2128' into 'master'
[gtk4] wayland: Fix xdg-output v3 support

See merge request GNOME/gtk!1082
2019-09-03 14:38:30 +00:00
Olivier Fourdan
31393704de wayland: Fix xdg-output v3 support
The xdg_output.done event is deprecated in xdg-output v3, so clients
need to rely on the wl_output.done event instead.

However, applying the changes on the fist wl_output.event when using
xdg-output v3 may lead to an incomplete change, as following xdg-output
updates may follow.

Make sure we apply xdg-output events on wl_output.done events with
xdg-output v3.

https://gitlab.gnome.org/GNOME/gtk/issues/2128
2019-09-03 16:13:24 +02:00
Jordi Mas
848a19a013 Update Catalan translation 2019-09-01 08:28:18 +02:00
Ryuta Fujii
98bc89968a Update Japanese translation 2019-08-31 13:45:30 +00:00
Ryuta Fujii
9c0e9e462b Update Japanese translation 2019-08-31 12:31:35 +00:00
Ryuta Fujii
57d762d5ea Update Japanese translation 2019-08-31 12:27:01 +00:00
Changwoo Ryu
9018ce1125 Update Korean translation 2019-08-30 14:10:45 +00:00
Timm Bäder
1b32f5c28b Merge branch 'typo' into 'master'
popover: fix typo in schema string

See merge request GNOME/gtk!1071
2019-08-29 13:56:13 +00:00
Alexandre Franke
0e35e50f8f Update French translation 2019-08-29 12:53:34 +00:00
Alexandre Franke
88b617646a popover: fix typo in schema string 2019-08-29 14:50:20 +02:00
Ask Hjorth Larsen
27fa7eace1 Updated Danish translation of gtk-properties 2019-08-29 12:37:41 +02:00
Ask Hjorth Larsen
ca996e0e85 Updated Danish translation of gtk 2019-08-29 12:37:41 +02:00
Jordi Mas
df683205d9 Update Catalan translation 2019-08-28 19:37:59 +02:00
Benjamin Otte
6905935fd3 Merge branch 'wip/ricotz/issue2107' into 'master'
gsk: Add missing 'transfer full' annotations of instance parameters

Closes #2107

See merge request GNOME/gtk!1065
2019-08-26 17:00:34 +00:00