[libadwaita/wip/exalm/style: 3/4] window-mixin: Drop the outline node
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/style: 3/4] window-mixin: Drop the outline node
- Date: Wed, 7 Apr 2021 08:35:33 +0000 (UTC)
commit c80075358bddb6cae8a97af67f85825bcd9f0deb
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Thu Feb 25 13:20:11 2021 +0500
window-mixin: Drop the outline node
In GTK4 the outline can be done with just CSS, as follows:
window {
outline-color: alpha(white, .1);
outline-width: 1px;
outline-offset: -1px;
outline-style: solid;
}
With this in mind, we don't need to have an extra css node and can drop it.
Still keep the contents node, we may need it later, for example for a toast
system.
Fixes https://gitlab.gnome.org/exalm/libadwaita/-/issues/20
src/adw-window-mixin.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
---
diff --git a/src/adw-window-mixin.c b/src/adw-window-mixin.c
index a096ca0..f80caf0 100644
--- a/src/adw-window-mixin.c
+++ b/src/adw-window-mixin.c
@@ -34,21 +34,12 @@ struct _AdwWindowMixin
GtkWidget *titlebar;
GtkWidget *contents;
- GtkWidget *outline;
GtkWidget *child;
};
G_DEFINE_TYPE (AdwWindowMixin, adw_window_mixin, G_TYPE_OBJECT)
-static gboolean
-outline_contains (AdwGizmo *gizmo,
- double x,
- double y)
-{
- return FALSE;
-}
-
void
adw_window_mixin_size_allocate (AdwWindowMixin *self,
int width,
@@ -103,9 +94,6 @@ adw_window_mixin_new (GtkWindow *window,
gtk_widget_set_layout_manager (self->contents, gtk_bin_layout_new ());
gtk_window_set_child (window, self->contents);
- self->outline = adw_gizmo_new ("outline", NULL, NULL, NULL, outline_contains, NULL, NULL);
- gtk_widget_set_parent (self->outline, self->contents);
-
gtk_widget_add_css_class (GTK_WIDGET (window), "unified");
return self;
@@ -119,7 +107,7 @@ adw_window_mixin_set_child (AdwWindowMixin *self,
if (child) {
self->child = child;
- gtk_widget_insert_before (child, self->contents, self->outline);
+ gtk_widget_set_parent (child, self->contents);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]