Commit Graph

33095 Commits

Author SHA1 Message Date
Timm Bäder
2a40ff1b47 Adwaita: add statusbar padding back
We removed the widget margins from the ui file over 2 years ago.
2019-10-09 16:57:22 +02:00
Timm Bäder
371c325ed1 statusbar: Use a bin layout 2019-10-09 16:57:22 +02:00
Timm Bäder
3d3525a589 stacksidebar: Inherit from GtkWidget
The child widgets are completely managed by the stacksidebar itself, so
this has no business being a GtkBin.
2019-10-09 16:57:22 +02:00
Timm Bäder
553c458e5a Adwaita: Remove superfluous border from stacksidebar
We already get a border from .sidebar
2019-10-09 16:57:22 +02:00
Timm Bäder
172f68e77d popovermenu: Switch to main submenu before mapping 2019-10-09 16:57:22 +02:00
Timm Bäder
fb1145d72d popovermenu: Only close if there's a new focus widget
Makes sense and otherwise we end up closing the popover for no reason
2019-10-09 16:57:22 +02:00
Timm Bäder
bd9687a4f2 popovermenu: Switch back to "main" AFTER unmapping
Otherwise we might set things to child visible etc. while being
unmapped, which is a violation of the widget invariants of these
properties.
2019-10-09 16:57:22 +02:00
Timm Bäder
49887d4c81 filechooserbutton: Only destroy existing native dialogs 2019-10-09 16:57:22 +02:00
Timm Bäder
d8c940325c widget: Create finalize assertions in destroy() 2019-10-09 16:57:22 +02:00
Timm Bäder
a3cef6c05e label: Use TRUE/FALSE instead of 1/0 2019-10-09 16:57:22 +02:00
Timm Bäder
11ee72fc7e dialog: Fix action button rearrangement
The gtk_widget_get_parent() check does not work anymore since the
headerbar adds the buttons to a child box.
2019-10-09 16:57:22 +02:00
Timm Bäder
355d3f070a widget: Plug layout manager leak 2019-10-09 16:57:22 +02:00
Timm Bäder
b5b81dea7f modelbutton: Rework
Create all the widgets on demand and use a box layout to arrange them
instead of manual size allocation.

Also don't inherit from GtkButton
2019-10-09 16:57:21 +02:00
Timm Bäder
5803366f7d button: Remove unused signal enum members 2019-10-09 16:57:21 +02:00
Timm Bäder
d3fc47e149 modelbutton: Use a box layout 2019-10-09 16:57:21 +02:00
Timm Bäder
b8f37da911 modelbutton: Replace map() with root() 2019-10-09 16:57:21 +02:00
Timm Bäder
722f8e825e modelbutton: Remove end_box
it's unused.
2019-10-09 16:57:21 +02:00
Timm Bäder
a743412c58 modelbutton: Create accel label on demand 2019-10-09 16:57:21 +02:00
Timm Bäder
a6f14555d1 Adwaita: Blue check/radiobuttons
Align with 3.24.
2019-10-09 16:57:21 +02:00
Feichtmeier
1c091a03f3 Tiny refactoring
- use checkradio_fg_color for check/radio in treeview, which points to fg_color, so no change of the hex color, thus no change to the parsed CSS
2019-10-09 16:57:21 +02:00
frederik.feichtmeier
2dfb8de0ec Adwaita: Add color defines from 3.24 2019-10-09 16:57:21 +02:00
Jakub Steiner
876e256f94 Adwaita: make links in infobars legible
- No longer tinted blue, make legible

Fixes https://gitlab.gnome.org/GNOME/gnome-software/issues/751
2019-10-09 16:57:21 +02:00
Timm Bäder
eb834b8370 adwaita: Use border-spacing to style checkbuttons 2019-10-09 16:57:21 +02:00
Timm Bäder
dbabdf8341 radiobutton: Fix a warning in a code sample 2019-10-09 16:57:21 +02:00
Timm Bäder
703fda3be8 label: Remove set_selectable_hint
It's just updating the cursor, so do it via update_cursor()
2019-10-09 16:57:21 +02:00
Timm Bäder
2f6d6f2473 label: Remove gtk_label_realize
We don't need this to update the cursor anymore.
2019-10-09 16:57:21 +02:00
Timm Bäder
3f3c8436c5 label: Don't update cursor after unsetting select_info
update_cursor() doesn't do anything in the priv->select_info == NULL
case.
2019-10-09 16:57:21 +02:00
Timm Bäder
d8b0a78c1e label: Change cursor even if unrealized
Cursor don't depend on that anymore.
2019-10-09 16:57:20 +02:00
Timm Bäder
013538daf9 placesviewrow: popup-menu returns a boolean 2019-10-09 16:57:20 +02:00
Christian Hergert
3b959456ac textview: cache paragraph render nodes
We can avoid recreating a number of text nodes from render_para() on
sub-sequent runs if we cache the rendernode instead of just the
PangoLayout.

When used with GtkSourceMap, this can yield a ~7 FPS improvement during
smooth scrolling at the cost of some more memory.
2019-10-08 11:44:27 -07:00
Sam Hewitt
83eeeb6a19 Adwaita: circular button fix
- remove old border drawing code that was breaking coloured buttons
 - fixes #2173
2019-10-07 16:50:34 -04:00
Sam Hewitt
6db181980a Adwaita: osd button fixes
- remove text/icon shadow from osd buttons
 - use :only-child to get circular standalone button
 - fixes #1696
2019-10-07 15:27:55 -04:00
Sam Hewitt
023bb2c984 Adwaita: use borders_color for separators
- fixes #2175
2019-10-07 13:05:12 -04:00
Benjamin Otte
a3cfb42888 eventcontrollerkey: Change behavior of contains-focus
contains-focus now returns TRUE when is-focus is TRUE instead of FALSE.

Fixes #2184
2019-10-07 04:49:50 +02:00
Benjamin Otte
578dc9e70b eventcontrollerkey: Add getters for the properties
...and use them.
2019-10-07 04:49:50 +02:00
Benjamin Otte
6769db160d icontheme: Don't try to scale pixbufs to 0px
Always insist on at least 1px, even if the thumbnail we're turning into
an icon was 256 * 3 and should be scaled to 32 * 3/8.
2019-10-07 04:49:50 +02:00
Benjamin Otte
56d16aae42 selectionmodel: Remove doubled semicolon 2019-10-07 04:49:50 +02:00
Daniel Boles
98f0d85c4a Builder: Fix a couple of typos in documentation 2019-10-06 20:48:10 +01:00
Christian Hergert
fea2a82ef6 textview: use GtkTextViewChild for border and overlay children
This creates a new GtkTextViewChild that can manage overlay children at
given x,y offsets in buffer coordinates. This simplifies GtkTextView by
extracting this from GtkTextWindow as well as providing a real widget for
the borders.

With this change, we also rename gtk_text_view_add_child_in_window() to
gtk_text_view_add_overlay(). For those that were using
GTK_TEXT_WINDOW_WIDGET, they can use a GtkOverlay. It does not appear
that anyone was using GTK_TEXT_WINDOW_(LEFT|RIGHT|TOP|BOTTOM) for widgets
in this fashion, but that can be done by setting a gutter widget with
gtk_text_view_set_gutter(). We can make GtkTextViewChild public if
necessary to simplify this should it become necessary.

GtkTextViewChild will setup a CSS node of either "text" or "border"
depending on the GtkTextWindowType.

The old GtkTextViewChild has been renamed to AnchoredChild as it is only
used for widgets with anchors in the GtkTextBuffer. This also removes the
use of allocated GSList and instead embeds a GQueue and GList to save a
few extraneous allocations.
2019-10-04 14:45:43 -07:00
Christian Hergert
8373cc6c47 textview: revert renaming of buffer_to_surface_coords()
The renaming of this function doesn't make much since because the window
is the GtkTextWindowType, not GdkWindow specifically. So we can keep the
old name which is closer to the proper meaning and less code for consumers
to change when porting to 4.x.
2019-10-04 13:22:49 -07:00
Matthias Clasen
872d2046fd Merge branch 'list-box-headers' into 'master'
Fix reuse of list box header widgets

See merge request GNOME/gtk!1114
2019-10-04 18:27:05 +00:00
Sam Hewitt
44ec142fa9 Adwaita: new levelbar style 2019-10-04 14:16:11 -04:00
Philip Withnall
b70f389b64 gtklistbox: Only unparent header rows if they haven’t been reused
It’s possible for code which uses a `GtkListBox` to reuse a single
header row, and move it around between rows. For example, this might
happen if the code has interactive widgets (like buttons) in the row,
and doesn’t want to continually recreate them and reattach signals to
them whenever the row headers change.

Unfortunately, this was broken, as the old header widget was
unconditionally unparented, even if it had just been set as the header
for a different row in the same `GtkListBox`. This left it assigned as
a child widget in the `GtkListBox` (so it was iterated over by
`forall`), but without its parent widget set.

Fix that by only unparenting the header if it hasn’t already been
assigned as the parent of a different row.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-04 18:48:53 +01:00
Philip Withnall
1c73edd9b0 gtklistbox: Factor the new header out into a separate variable
Makes the code a little clearer, but makes no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-04 18:48:51 +01:00
Christoph Reiter
94d9088034 Print a warning if GTK_DEBUG is set but gtk isn't built with G_ENABLE_DEBUG
G_ENABLE_DEBUG is tied to the meson builttype property, so building with "plain"
results in G_ENABLE_DEBUG not being defined and the GTK_DEBUG env var just gets ignored
for that build.

Since it can be confusing that GTK_DEBUG has no effect print a warning message instead.

See #2020. This is a port of !1109 to master
2019-10-02 21:35:20 +02:00
Rico Tzschichholz
0ad4166482 mediafile: Add g-i annotations for actual return-type of factory methods 2019-09-26 08:19:25 +02:00
Timm Bäder
7ce1055656 eventcontrollerscroll: Events are unhandled by default
While the ::scroll signal always returns whether it handled the event,
the others do not, for example ::decelerate.

Previously, this caused the event to stop at a scroll controller with
CAPTURE phase, never emitting the ::decelerate signal on later
controllers with BUBBLE phase.

Fixes #2151
2019-09-25 17:51:53 +02:00
Timm Bäder
78a376aa7f snapshot: Try to avoid some linear gradient nodes 2019-09-25 17:51:52 +02:00
Timm Bäder
43f2b47fc9 searchentry: Use a box layout 2019-09-25 17:51:52 +02:00
Timm Bäder
413cfed7d7 searchentry: Use edit-clear-all-symbolic as clear icon
Fixes #2109
2019-09-25 17:51:52 +02:00