Commit Graph

32863 Commits

Author SHA1 Message Date
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