Timm Bäder
9166b03c42
fixed: Documentation clarifications
2019-09-09 17:36:25 +02:00
Timm Bäder
31efc882db
fixed: x/y passed to get_child_position are not optional
2019-09-09 17:36:25 +02:00
Timm Bäder
1db59d1c89
fixedlayout: Don't call the child transform position
...
It's a full transform and not just a translation these days.
2019-09-09 17:36:25 +02:00
Timm Bäder
afb3715700
linkbutton: Use widget API to set has-toolip
...
As God intended.
2019-09-09 17:36:24 +02:00
Timm Bäder
6be4279f39
linkbutton: Use proper action name for right-click menu
2019-09-09 17:36:24 +02:00
Timm Bäder
5782871f91
menubutton: Control sensitivity of child button
...
Instead of the menubutton itself.
2019-09-09 17:36:24 +02:00
Timm Bäder
0e9ac9e64b
magnifier: Remove some unused members
2019-09-09 17:36:24 +02:00
Timm Bäder
0821d5b29d
widget: Clear up gtk_widget_class_install_property_action docs
2019-09-09 17:36:24 +02:00
Timm Bäder
b3cffc0516
widget: Remove reference to non-existent function
...
gtk_widget_class_install_stateful_action() does not exist.
2019-09-09 17:36:24 +02:00
Timm Bäder
80a58672d1
widget: Add some missing annotations to gtk_widget_class_query_action
2019-09-09 17:36:24 +02:00
Timm Bäder
18714e25a8
window: Remove useless deprecation guards
...
gtk_window_present() is not deprecated.
2019-09-09 17:36:24 +02:00
Timm Bäder
b29c30c9d5
cssprovider: Remove unused member from GtkCssScanner
2019-09-09 17:36:24 +02:00
Timm Bäder
d8df197489
cssprovider: Don't lookup on empty css providers
...
This should not have a huge performance impact, but debugging is easier
if we don't lookup in empty css providers.
2019-09-09 17:36:24 +02:00
Timm Bäder
514e60c1bb
cssnode: GtkCssAnimatedStyle->style is always a static style
2019-09-09 17:36:24 +02:00
Timm Bäder
32a256bd03
gtksettings: Remove unused functions & prototypes
2019-09-09 17:36:24 +02:00
Timm Bäder
b9316a404a
cssnode: Remove unused struct
2019-09-09 17:36:24 +02:00
Timm Bäder
ea2a3f3e62
cssstyle: Remove unused _add_difference
2019-09-09 17:36:24 +02:00
Timm Bäder
5cd8009c53
stylecontext: Remove leftover function prototypes
2019-09-09 17:36:24 +02:00
Timm Bäder
26aa620efe
stylecontext: Stop exporting _resolve_color
...
Only used in gtkstylecontext.c
2019-09-09 17:36:24 +02:00
Timm Bäder
e0cf6e4775
csscolorvalue: return the initial color value directly
2019-09-09 17:36:24 +02:00
Timm Bäder
df2d43c893
csscolorvalue: Remove unused new_from_rgba()
2019-09-09 17:36:24 +02:00
Timm Bäder
8d6c5ba90e
cssstaticstyle: Compute initial/inherit values directly
2019-09-09 17:36:24 +02:00
Timm Bäder
629f528f6d
cssinitialvalue: Make _compute public
...
So we can use it in cases where the class of css value is known to be an
initial one.
2019-09-09 17:36:24 +02:00
Timm Bäder
191e3bc7e1
csslookup: Remove 'relevant' parameter from _init
...
Unused.
2019-09-09 17:36:24 +02:00
Timm Bäder
ecad4743bd
csslookup: Remove 'missing' bitmask
...
It's almost never useful to have a bitmask here, since it's only used
for the intersection case in gtk_css_style_provider_lookup. However,
even if that returns true, we still need to check every single style
property for being set again in the look afterwards.
Just remove the bitmask.
2019-09-09 17:36:24 +02:00
Timm Bäder
ceb8aedf97
cssanimatedstyle: Keep transition_info_add from recursing
...
The slowest part of that fuction is the type check for
GtkCssShorthandProperty. Subproperties of shorthand properties never
refer to more shorthand properties however, so we don't want to have the
type check for those.
2019-09-09 17:36:24 +02:00
Timm Bäder
0cf4eb379f
csslookup: Remove tautological if expression
...
A value is always either set or missing.
This was changed in a1f7c459b7
, which
removed the ability for partial style computation.
2019-09-09 17:36:24 +02:00
Timm Bäder
f3fdf58ff7
cssstaticstyle: Avoid ref'ing specified value in compute_value
...
There are alerady _get functions for GtkCssInheritValue and
GtkCssInitialValue, so use those. We can avoid a ref+unref pair this
way.
2019-09-09 17:36:24 +02:00
Timm Bäder
3073e65851
cssprovider: Fix compilation wth VERIFY_TREE set
2019-09-09 17:36:24 +02:00
Timm Bäder
a75529f3c0
cssmatcher: Inline node values into matcher
...
So we don't have to go through the matcher->node->decl every time
2019-09-09 17:36:24 +02:00
Timm Bäder
75a48aed0b
cssanimatedstyle: Make set_animated_value transfer-full
2019-09-09 17:36:24 +02:00
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
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
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
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
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
Alexandre Franke
88b617646a
popover: fix typo in schema string
2019-08-29 14:50:20 +02:00
Matthias Clasen
9bb58c3eca
Merge branch 'office-runner-crash' into 'master'
...
Fix a crash in gtk-builder-tool
See merge request GNOME/gtk!1064
2019-08-26 13:50:43 +00:00
Matthias Clasen
c0b8eb30de
Fix a crash in gtk-builder-tool
...
Crash pointed out by Bastien Nocera.
Testcase included.
2019-08-26 15:34:15 +02:00
Дилян Палаузов
6ded38de2b
Minor typos in the Documentation (a/an)
2019-08-25 12:52:46 +00:00
Timm Bäder
ee27587428
scale: Add a destroy notify to set_format_value_func
...
Closes #2098
2019-08-15 17:21:47 +02:00
Timm Bäder
d2f76d689f
scaler: Avoid some signal connections
...
We're mainly using this for icons that will never change contents or
size, and we're using a GtkScaler per such icon when on a hidpi setup,
so just avoid the two signal connections per icon.
2019-08-15 17:13:29 +02:00
Timm Bäder
20cd6cc155
spinbutton: Use gtk_button_new_from_icon_name
2019-08-15 16:23:01 +02:00
Timm Bäder
960e766206
widget: Don't duplicate events to translate coordinates
2019-08-15 16:23:01 +02:00
Timm Bäder
1c9fbe3773
widget: Remove captured event handler code
2019-08-15 16:23:01 +02:00
Timm Bäder
6669ddad09
scrolledwindow: Stop using _gtk_widget_set_captured_event_handler
...
We can use an event controller with phase = CAPTURE these days.
2019-08-15 16:23:01 +02:00
Matthias Clasen
55839dc508
Merge branch '948-patch-renaming-a-file-can-make-it-to-loose-selection_GTK4' into 'master'
...
filechooser: keep file selected after being renamed
Closes #948
See merge request GNOME/gtk!1053
2019-08-13 21:18:41 +00:00
Matthias Clasen
6dd23b2bf0
text view: Fix a typo
...
Pointed out in https://gitlab.gnome.org/GNOME/gtk/issues/2094
2019-08-13 15:16:03 -04:00
Nelson Benítez León
487e095d24
filechooser: keep file selected after being renamed
...
Because otherwise when the file list is sorted "by name"
and the new name causes the file to be re-sorted to another
row, the selection stays in the old row which is now
occupied by a different file.
Fixed by keeping track of the renamed file and revealing
it in the "row-changed" signal handler, which gets emitted
after a file is renamed.
Fixes issue #948
2019-08-12 17:32:56 -04:00
Timm Bäder
164ebee129
Adwaita: Style spinbutton up/down children explicitly
...
Once again to increase the specificty above that of the
"list row button.etc." selector. Makes hovering spinbutton buttons in
lists look normal again.
2019-08-11 10:41:58 +02:00
Timm Bäder
76f2c4f0aa
Adwaita: Update .devel headerbar styling
...
Just pull in the changes from gtk-3-24
2019-08-11 10:30:01 +02:00
Timm Bäder
9999ac1255
range: Avoid a divison by 0
...
Based on a patch by Blake Latchford
Fixes #618
2019-08-11 10:06:52 +02:00
Daniel Boles
3242174f81
AccelLabel: Add get_accel_closure() accessor
...
Fixes #875
2019-08-11 09:55:43 +02:00
Timm Bäder
6f1cade817
color chooser: Port checkered pattern drawing from cairo
2019-08-11 09:34:50 +02:00
Timm Bäder
c6961f1b61
range: Use public delay-factory API
2019-08-11 09:34:50 +02:00
Timm Bäder
8c88453816
cellrenderer: Add accessors for {get,set}_is_expande{r,d}
2019-08-11 09:34:50 +02:00
Timm Bäder
c812e1dc94
Adwaita: Fix hovering modelbutton arrows
...
This CSS snippet was supposed to only recolor the popover arrow but
ended up also recoloring the > arrow on modelbuttons that show a
submenu. Make the selector more specific.
2019-08-11 09:05:31 +02:00
Timm Bäder
8d1a2247e0
treeview: Redo tree line drawing using textures
...
Gets rid of the remaining cairo nodes used for line drawing.
2019-08-11 09:05:28 +02:00
Timm Bäder
4fba7f8c59
treeview: Redo grid line drawing using textures
...
The cairo pattern in use was simple enough, so just use a 2×1 or 1×2
texture to draw horizontal and vertical grid lines. This avoids a bunch
of cairo nodes (that can't be cached by the renderers).
2019-08-11 09:05:25 +02:00
Timm Bäder
a93745238f
snapshot: Annotate child_bounds parameter of push_repeat as nullable
2019-08-10 19:51:45 +02:00
Timm Bäder
b812ff2597
treeview: Shorten destroy() implementation
2019-08-10 19:51:45 +02:00
Timm Bäder
8a51796150
treeview: Remove two _dashes members
...
Tree lines and grid lines always look the same these days.
2019-08-10 19:51:45 +02:00
Timm Bäder
dd7d171186
treeview: Remove GTK_TREE_VIEW_FOREGROUND_LINE
2019-08-10 19:51:45 +02:00
Timm Bäder
0ac20f978e
spinbutton: Remove an unnecessary queue_draw() call
2019-08-10 19:51:45 +02:00
Timm Bäder
0a96c3f062
scale: Properly update when inverted
...
Just queue_resize()ing the range itself doesn't work as it will just
re-allocate all the child widgets (i.e. just the trough) to its old
position and size.
2019-08-10 19:51:45 +02:00
Timm Bäder
42e6630c3e
scale: Make a function shorter
2019-08-10 19:51:45 +02:00
Timm Bäder
1125d08f0d
range: Remove outdated comment
2019-08-10 19:51:45 +02:00
Mohammed Sadiq
c1bb699151
builderparser: Allow bind-source without bind-property
...
This allow users to bind same property of two objects with only
specifing “name” and “bind-source” in UI file.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2080
2019-08-10 19:01:36 +05:30
Mohammed Sadiq
55af84d359
widget: Fix a typo in documentation
2019-08-10 12:11:13 +05:30
Christian Hergert
4ae362d138
textview: clear cached entries before releasing containers
...
We want to ensure all of the display cache entries are released in the
normal fashion before releasing the structures so that we can maintain
the invariant that cache_iter will always exist while in the cache.
2019-08-09 12:52:16 -07:00
Timm Bäder
fd201e4df7
treeviewcolumn: Remove cell_area parameter from _cell_get_size
...
Fixes #297
2019-08-09 17:04:58 +02:00
Timm Bäder
21123a1264
iconhelper: Don't snapshot 0 sized icons
...
This is happening for me when snapshotting small thumbnails in the file
chooser. The GtkScaler will scale the 1px height/width by 2, resulting
in nothing being drawn at all.
2019-08-09 15:55:38 +02:00
Timm Bäder
87aeec2b63
scale: Fix value widget measurement
...
Since we set the size request of the label, the later measure()
call would return at least the size we set, making the size only ever
grow.
2019-08-09 14:30:01 +02:00
Timm Bäder
ea5fc348fa
scale: Replace format-value signal
...
There is no reason for this to be a signal, since multiple handlers
don't make sense anyway. It was also broken because the scale needs to
know when a signal handler is added so it can update the value
representation.
Replace the signal with a set_format_value_func function which allows us
to do that.
Fixes #113
2019-08-09 14:30:01 +02:00
Timm Bäder
ebc0d3760f
range: remove range_size_request vfunc
...
It's unneeded in GtkScale and named after the gtk2 size_request function
2019-08-09 14:30:01 +02:00
Timm Bäder
b4a6d69f5d
scale: Allocate left marks next to trough
2019-08-09 14:30:01 +02:00
Timm Bäder
05cdce2e8d
scale: Fix an uninitialized value
2019-08-09 14:30:01 +02:00
Timm Bäder
509b781079
widget: Avoid a few type checks
2019-08-09 14:30:01 +02:00
Timm Bäder
4b7a6a885d
Merge branch 'adwaita-scales-marks-fintune-fix-master' into 'master'
...
Adwaita: Fix fine-tune mode for scales with marks
Closes #1799
See merge request GNOME/gtk!696
2019-08-08 16:41:04 +00:00
Jonas Ådahl
048957cd49
gtk/icon-theme: Handle lack of SVG loader gracefully
...
When loading a SVG icon from a gresource file only containing SVG icons,
but without having a SVG loader available in gdk-pixbuf, we would crash
when trying to eventually load the resource. Fix this by gracefully
handling this by simply failing to load the icon, while the first time
it happens, log a warning.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2084
2019-08-08 09:05:30 +02:00
Timm Bäder
434d32bf95
Adwaita: Fix round titlebar button outline radius
...
Fixes #2073
2019-08-07 18:49:50 +02:00
frederik.feichtmeier
1178a0011a
Exclude appmenu titlebuttons
2019-08-07 18:46:50 +02:00
frederik.feichtmeier
0af2e65c80
Make titlebuttons round
...
- use even sides for the titlebuttons so the result is a circle and not an ellipse
- add maximum border radius
- set min width/height to 0
- adjust margin and padding to match the previous look
2019-08-07 18:46:47 +02:00
Timm Bäder
e8f3b47bf3
gesturelongpress: Add getter/setter for delay-factor
2019-08-07 14:11:00 +02:00
Timm Bäder
8b16e44d26
passwordentry: Fix a documentation comment parameter name
2019-08-07 13:12:57 +02:00
Timm Bäder
002abc6d48
placessidebar: Remove popover using gtk_widget_unparent()
...
the gtk_widget_destroy() does not work anymore.
2019-08-06 17:39:01 +02:00
Timm Bäder
aca31c3ab6
adwaita: Increase spinbutton button styling specificity
...
So it trumps the 'toned down' button styling.
Fixes #2012
2019-08-06 17:38:54 +02:00
Matthias Clasen
a3609c3f6d
Merge branch 'implement-choices-file-chooser-native-win32-for-gtk-4' into 'master'
...
Implement choices for GtkFileChooserNativeWin32 [Gtk4]
Closes #1982
See merge request GNOME/gtk!1043
2019-08-05 12:20:06 +00:00
Luca Bacci
02935afe94
GtkFileChooserNativeWin32: Uninitialize COM at end of thread
...
GtkFileChooserNativeWin32 is created and shown on a secondary thread.
This thread initializes COM support with CoInitializeEx but does not
finalize it, so we have a leak. Fix that by calling CoUninitialize()
before thread terminates.
See Merge Request !1043
2019-08-04 18:03:37 +02:00
Luca Bacci
234d0443b2
GtkFileChoooserNative: change prepend to append for insertions in choices list
...
Although slightly less efficient, keeping the order in the choices
list makes it easier for GtkFileChooserNative implementations to
add widgets in the order specified by the application.
See Merge Request !1043
2019-08-04 18:03:21 +02:00
Luca Bacci
822deabdfe
Implement choices for GtkFileChooserNativeWin32
...
See Merge Request !1043
2019-08-04 18:03:05 +02:00
Timm Bäder
b2e94f81cf
window: Remove some leftover event code
2019-08-03 14:44:25 +02:00
Timm Bäder
109df77d87
popover: Use GTK_POS_BOTTOM as default position
...
This has always made a lot more sense.
2019-08-03 14:44:25 +02:00
Timm Bäder
76e3284ca1
colorchooserwidget: Inherit from GtkWidget
...
No reason for this to be a GtkBox.
2019-08-03 14:44:24 +02:00
Ray Strode
1612e38cda
window: sort icons before adding to _NET_WM_ICON
...
When processing the list of icons for a window to add them to
_NET_WM_ICON gdk_x11_surface_set_icon_list only adds as many
icon sizes as will fit within X protocol limits.
It achieves this by keeping a running total of the number of
bytes taken up by icons already processed and bails as soon
as it goes over the limit.
The problem is, one 512x512 icon is already over the limit,
and so no icons will get added at all if the first icon in
list is 512x512.
Indeed, the code seems to assume the list is sorted from smallest
icon to biggest icon.
This commit changes the caller to sort the list.
2019-08-01 16:48:58 -04:00
Matthias Clasen
4a631787bd
Merge branch 'subpixel-positioning' into 'master'
...
Subpixel positioning
See merge request GNOME/gtk!1024
2019-07-28 21:02:31 +00:00
Matthias Clasen
4de670b0b4
Turn off metrics hinting
...
This will be necessary to see the effects of subpixel positioning.
2019-07-28 16:42:52 -04:00
Christian Hergert
9926e6ebde
textlayout: introduce caching for GtkTextLineDisplay
...
This adds a GtkTextLineDisplayCache which can be used to cache a number
of GtkTextLineDisplay (and thus, PangoLayout) while displaying a view.
It uses a GSequence to track the position of the GtkTextLineDisplay
relative to each other, a MRU to cull the least recently used display,
and and a direct hashtable to lookup display by GtkTextLine.
We only cache lines that are to be displayed (!size_only). We may want to
either create a second collection of "size_only" lines to speed that up,
or determine that it is unnecessary (which is likely the case).
2019-07-28 10:34:15 -07:00
Christian Hergert
b930c5a8a2
textiter: add _gtk_text_iter_same_line()
...
This is a faster form to compare two text iter to see if they are on the
same line.
2019-07-28 10:34:15 -07:00
Matthias Clasen
7eb5dfd294
inspector: Show the pango backend
2019-07-28 11:39:16 -04:00
Matthias Clasen
988fac404a
Add pango version checks
...
Seems the ci does not have pango 1.44 yet.
2019-07-28 10:50:14 -04:00
Timm Bäder
eea76e8cce
textview: Remove some unnecessary gtk_widget_show() calls
...
Widgets are visible by default.
2019-07-28 08:44:45 +02:00
Timm Bäder
b2d639b6d9
window: Unroot with old display
...
Things might rely on the old display being set while unrooting.
Fixes #2052
2019-07-27 07:57:06 +02:00
Matthias Clasen
f1c7803f80
label: Parse new pango attributes
...
Support allow-breaks and show attributes.
These will be in pango 1.44
2019-07-27 00:02:08 -04:00
Emmanuele Bassi
f1e4efebb7
Merge branch 'gtk-4-add-TCRYPT-options-to-ask-password-dialog' into 'master'
...
gtkmountoperation: Add TCRYPT options to the ask-password dialog
See merge request GNOME/gtk!263
2019-07-25 10:16:11 +00:00
Matthias Clasen
e89e182565
Merge branch 'avoid-redundant-attributes' into 'master'
...
text layout: Avoid redundant text attributes
See merge request GNOME/gtk!1015
2019-07-24 23:47:41 +00:00
Matthias Clasen
552fe0406c
text layout: Avoid redundant text attributes
...
Don't insert text attributes if the font, or scale
or fallback did not actually change. This helps
Pango avoid excessive item breaks, which in turn
helps shaping to work across things like color
changes.
Related: https://gitlab.gnome.org/GNOME/pango/issues/28
2019-07-24 19:05:32 -04:00
Matthias Clasen
2f387c2a23
Merge branch 'missing-gobject-annotation' into 'master'
...
Add nullable annotation to combo_box_text_get_active_text
See merge request GNOME/gtk!1012
2019-07-24 13:50:04 +00:00
Timm Bäder
0d95c5dfe2
passwordentry: Normalize boolean value
2019-07-24 08:10:37 +02:00
Timm Bäder
f2a2908c59
passwordentry: Remove empty vfunc implementation
2019-07-24 08:10:26 +02:00
Timm Bäder
f4cb60dcca
textlayout: Avoid querying CSS state if we don't have to
...
This is actually pretty slow, and we almost never render a selection.
2019-07-24 07:54:30 +02:00
Timm Bäder
b3d0629709
popover: Remove some unnecessary checks
...
gtk_popover_move_resize() already checks whether the popover has a
surface.
2019-07-24 07:54:30 +02:00
Matthias Clasen
30f55c4d07
Remove a redundant vfunc
...
PangoRenderer has a perfectly adequate default
implementation of draw_glyphs, no need to duplicate that.
2019-07-23 23:28:24 -04:00
Ryan Westlund
f00d964f4f
Add nullable annotation to combo_box_text_get_active_text
2019-07-23 22:59:35 -04:00
Matthias Clasen
d2920c501d
Merge branch 'blink-later' into 'master'
...
Blink later
See merge request GNOME/gtk!1011
2019-07-24 02:05:32 +00:00
Matthias Clasen
af528b08dc
Merge branch 'error-nodes' into 'master'
...
Render error underlines as render nodes
See merge request GNOME/gtk!1009
2019-07-24 01:39:37 +00:00
Matthias Clasen
a628907891
textview: Defer cursor blinking on input
...
We were not calling the right cursor functions
in the commit handler.
2019-07-23 21:18:03 -04:00
Matthias Clasen
19ad4d67ef
textview: Delay initial cursor blinking
...
These changes follow the same changes for
gtktext.c in the previous commit.
2019-07-23 21:17:05 -04:00
Matthias Clasen
a4e427b44a
text: Delay initial cursor blinking
...
We used to have a solid cursor for 2/3 of the cycle,
now we start fading after 1/4th. To make up for it,
add half a cycle of delay.
2019-07-23 21:08:47 -04:00
Matthias Clasen
3278e9ab6c
Render error underlines as render nodes
...
Use a sequence of transformed squares,
instead of a cairo node. The drawing is not
identical to the previous code, but reasonably
close.
2019-07-23 18:31:39 -04:00
Christian Hergert
02d8e95b73
textlayout: remove use of gtk_text_layout_free_line_display
...
Now that these are reference counted, we no longer need to use
the variant requiring access to the GtkTextLayout.
2019-07-23 14:59:40 -07:00
Christian Hergert
e0b9b51e9f
textlayout: make GtkTextLineDisplay reference counted
...
This makes GtkTextLineDisplay use GRcBox instead of g_slice_*
directly. By using reference counting for this structure, we
can ensure that we hold an extra ref for one_display_cache as
well as caching additional GtkTextLineDisplay for the visible
range in the future.
2019-07-23 14:52:14 -07:00
Matthias Clasen
fb06b7fa94
text: Remove an outdated comment
2019-07-23 15:14:38 -04:00
Matthias Clasen
7b451678f5
fix the build
2019-07-23 14:26:32 -04:00
Matthias Clasen
758c54eab8
text: Fix incomplete invalidation
...
When a style change affects the text, we need to
clear the cached content, in order to pick up the
new text style.
2019-07-23 10:41:52 -04:00
Matthias Clasen
c39cc15573
text view: Fix incomplete invalidation
...
Update the cached text style when a css change affects
content or background. This fixes text views drawing
black-on-dark when switching to the dark theme.
2019-07-23 10:41:43 -04:00
Christian Hergert
e475d4bdc5
textlayout: fix bounds for clipping
...
This should match gtk_snapshot_append_layout(), which means that we expect the
bounds to be rooted at 0, 0.
2019-07-21 18:21:04 -07:00