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
Matthias Clasen
064ad42432
text view: Smooth cursor blinking
...
Fade the text cursor in and out, instead
of abruptly turning it on and off.
2019-07-21 16:03:49 -07:00
Christian Hergert
4ff9163c47
textview: port GtkTextView to GskPangoRenderer
...
This removes the use of GtkTextDisplay (a PangoRenderer) to use
the GskPangoRender which generates render nodes. Part of this means
improving the GskPangoRenderer to support the necessary features for
displaying a GtkTextView.
Primarily, this is a merging of GtkTextDisplay features into
GskPangoRender. Additionally, GtkTextDisplay was removed to allow for
gtk_text_layout_snapshot() to be implemented elsewhere.
2019-07-21 16:03:45 -07:00
Matthias Clasen
45ebe47d94
textview: Stop exporting private apis
...
These headers are no longer 'semi-public, but private
and uninstalled, so exporting these functions does
not do any good.
2019-07-21 13:26:40 -07:00
Matthias Clasen
51161fb0d6
text: Smooth cursor blinking
...
Fade the text cursor in and out, instead
of abruptly turning it on and off.
2019-07-21 11:35:13 -07:00
Matthias Clasen
63fd97749c
Adwaita: Fix entry block cursors
2019-07-21 11:35:04 -07:00
Timm Bäder
8f734b01b2
window: Plug a GList leak
...
We need to free the GList manually when using g_list_remove_link().
2019-07-21 12:45:10 +02:00
Timm Bäder
8beea4d958
window: Merge some functions into their only callers
...
So it's clear we only add or remove the pointerfocus-es in
_update_pointer_focus.
2019-07-21 11:06:24 +02:00
Timm Bäder
1583200e24
cellrenderertext: Remove some unnecessary NULL checks
2019-07-21 10:26:00 +02:00
Timm Bäder
03fa8ed259
cellrenderertext: Don't unnecessarily ref a layout
...
We never pass a NULL layout to get_size().
2019-07-21 10:22:05 +02:00
Timm Bäder
0bd939624e
textlayout: Remove some outdated comments
...
These two members have been commented out for 19 years.
2019-07-21 10:02:54 +02:00
Timm Bäder
b658a1a8e3
entry: Measure icons again
...
This was previously removed because it changes the minimum and natural
size of the entry when the icons are shown/hidden at runtime. Just not
measuring them does not work however, so reintroduce this.
2019-07-21 09:58:08 +02:00
Timm Bäder
7eae9d115c
placesview: Make "Other Locations" search case-insensitive
...
It's just weird to search for "c" and not find the list item labelled
"Computer".
2019-07-21 09:51:54 +02:00
Timm Bäder
2ca56d4c4c
linedisplay: Save paragraph bg color inline
...
No need to allocate this separately.
2019-07-21 09:47:09 +02:00
Timm Bäder
3935027880
filechooserwidget: Fold function into only caller
2019-07-19 18:14:50 +02:00
Timm Bäder
8665828d7f
filechooserwidget: Don't emit default-size-changed() in unroot()
...
It doesn't make much sense to assume the default size has changed just
because the widget has been unrooted.
2019-07-19 18:14:50 +02:00
Timm Bäder
a8b559e99f
filechooser: Remove SETTINGS_KEY_WINDOW_POSITION
...
Now unused.
2019-07-19 18:14:50 +02:00
Timm Bäder
5674a3db46
filechooserwidget: Don't look at saved window position
...
We don't save it anymore so no need to look at it here.
2019-07-19 18:14:49 +02:00
Timm Bäder
dd3acc9014
filechooserdialog: Stop using gtk_window_get_position()
2019-07-19 18:14:49 +02:00
Timm Bäder
a9364bc053
Revert "file chooser: Stop using gtk_window_get_position"
...
This reverts commit 2ed533c3e1
.
This also made the filechooser dialog not save the window size anymore,
which does not depend on the gtk_window_get_position() removal.
2019-07-19 18:14:49 +02:00
Timm Bäder
59313e1459
gtkfilechooserwidget: Temporarily disable revealer transitions...
...
... when going between recent and browse. It just looks weird to have
this transition while the treeview model is just cleared/repopulated
without any transition.
2019-07-19 18:14:49 +02:00
Timm Bäder
3e54d374de
placessidebar: Remove sidebar border again
2019-07-19 18:14:49 +02:00
segfault
97cdf87350
gtkmountoperation: Add TCRYPT options to the ask-password dialog
2019-07-18 20:06:20 +02:00
segfault
e5cccbf5a0
gtkmountoperation: Support TCRYPT options when using proxy handler
...
GMountOperation now supports options to unlock TCRYPT volumes. This
patch sets these options if they are returned by AskPassword() of a
GtkMountOperationHandlerProxy.
2019-07-18 11:41:45 +02:00
Timm Bäder
24a4063645
scrollbar: Use a box layout
...
Makes a lot more sense than the intermediate box just for its layout.
2019-07-15 07:52:42 +02:00
Timm Bäder
4f11bbc59b
text: Don't leak emoji chooser
2019-07-15 06:56:19 +02:00
Timm Bäder
9ceb41f9a4
menu: Fix an uninitialized value
...
If the menu does not have any children, we'd otherwise end up calling
g_object_ref() on an uninitialized value.
2019-07-15 06:43:25 +02:00
Timm Bäder
831309eed2
progressbar: Use box layout
...
Instead of the custom layouting we did before.
2019-07-15 06:38:51 +02:00
Timm Bäder
4bb4a98493
text: Move some locals into the closest scope
2019-07-15 05:38:25 +02:00
Timm Bäder
70b0f712ad
text: Remove some useless casts
2019-07-15 05:19:02 +02:00
Timm Bäder
c6e9372ba3
text: Move some locals into the closest scope
2019-07-15 05:17:46 +02:00
Timm Bäder
38f4a7708e
Remove some dead assignments
2019-07-14 10:08:04 +02:00
Timm Bäder
6abcd8d013
Adwaita: Add fontbutton spacing back
2019-07-14 10:08:04 +02:00
Timm Bäder
37906a2200
adwaita: Remove a dead rule
...
GtkFileChooserButtons are called "filechooserbutton" these days, not
button.file
2019-07-14 10:08:04 +02:00
Timm Bäder
92a79d3f96
popover: Fix a broken cast
...
The widget passed here is priv->relative_to, not the popover.
2019-07-13 17:06:22 +02:00
Timm Bäder
2884691740
picture: Unref previous paintable
...
We were leaking all of them.
2019-07-13 09:38:28 +02:00
Timm Bäder
a13d6bbbdf
Merge branch 'fix-issue-2014-gtk4' into 'master'
...
Fix a string leak in gtkemojicompletion.c [gtk4]
Closes #2014
See merge request GNOME/gtk!993
2019-07-12 09:59:38 +00:00
Luca Bacci
d15dc6f90b
Fix a string leak
...
Fixes #2014
2019-07-12 08:43:44 +00:00
Timm Bäder
58e6c277b0
fpsoverlay: Fix fps overlay position
2019-07-10 18:34:16 +02:00
Matthias Clasen
1d29d44ddb
Merge branch 'wip/baedert/accelmap' into 'master'
...
AccelMap: Sort accels before iterating over them in foreach()
See merge request GNOME/gtk!980
2019-07-09 19:39:58 +00:00
Matthias Clasen
bda3c6c084
Merge branch 'wip/baedert/for-master' into 'master'
...
Improve the valgrind experience
See merge request GNOME/gtk!984
2019-07-09 19:39:13 +00:00
Robert Ancell
dbd2a81501
Change the few examples that use a full GTK_ enum value in .ui files.
...
Lowercase versions work just as well and are much more readable.
2019-07-08 15:52:28 +12:00
Timm Bäder
264d4bada6
widget: Remove queue_resize_no_redraw
...
We always invalidate the widget in size_allocate() anyway.
2019-07-07 07:43:08 +02:00
Timm Bäder
633172fd66
widget: Make queue_compute_expand() private
...
Nobody needs to call this anymore.
2019-07-07 07:36:29 +02:00
Timm Bäder
95f30fee87
iconhelper: Try to avoid some save/restore calls
...
GtkImage already does something similar so we often end up with 0/0
here. Avoid the save()/restore() calls in GtkSnapshot in that case.
2019-07-07 07:24:00 +02:00
Timm Bäder
449c96ffb3
widget: Unref previous transform
2019-07-07 07:24:00 +02:00
Timm Bäder
4123c85021
actionmuxer: Plug a memory leak
2019-07-07 07:24:00 +02:00
Timm Bäder
a77f8e886b
cssprovider: Fix a memory leak in load_internal
...
We create a new GBytes but never unref it.
2019-07-06 09:50:07 +02:00
Adrien Plazas
3bae6fa1c7
headerbar: Don't change the custom title's valign
...
This allows custom titles to use the vertical alignment of their choice
without having to set it manually after it has been added to the header
bar, hence allowing them to define their preferred alignment from a UI
template.
This is useful for widgets like the view switcher which requires filling
the header bar's whole height.
2019-07-04 13:03:37 +02:00
Timm Bäder
68f19a8e6a
accelmap: Sort accels before interating over them in foreach()
2019-07-04 08:35:42 +02:00
Timm Bäder
12ebbd1b24
accelmap: Avoid a confusing goto
2019-07-04 08:35:34 +02:00
Benjamin Otte
b2868d7218
Merge branch 'wip/frame-clock-consumers' into 'master'
...
Frame clock consumers
See merge request GNOME/gtk!971
2019-07-03 16:21:32 +00:00
Matthias Clasen
9768f35931
widget: Don't lose a layout manager ref
...
gtk_widget_set_layout_manager is transfer-full,
so we must give it a new reference from set_property
to implement object property semantics properly.
2019-07-03 09:18:41 -04:00
Jonas Ådahl
f66e764855
menu: Remove unused variable
2019-07-03 11:42:28 +02:00