From 51f543143d836a23dffb8ad6c06cf17ea25fa62c Mon Sep 17 00:00:00 2001 From: yggverse Date: Sun, 3 Nov 2024 22:44:48 +0200 Subject: [PATCH] use any widget for child --- src/app/browser/window/tab/item/widget.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/browser/window/tab/item/widget.rs b/src/app/browser/window/tab/item/widget.rs index 65b6c711..356ece09 100644 --- a/src/app/browser/window/tab/item/widget.rs +++ b/src/app/browser/window/tab/item/widget.rs @@ -3,7 +3,7 @@ mod database; use database::Database; use adw::{TabPage, TabView}; -use gtk::Box; +use gtk::prelude::IsA; use sqlite::Transaction; use std::sync::Arc; @@ -18,15 +18,15 @@ impl Widget { pub fn new_arc( keyword: &str, // ID tab_view: &TabView, - page: &Box, + child: &impl IsA, title: Option<&str>, position: Option, is_pinned: bool, is_selected: bool, ) -> Arc { let gobject = match position { - Some(number) => tab_view.insert(page, number), - None => tab_view.append(page), + Some(number) => tab_view.insert(child, number), + None => tab_view.append(child), }; gobject.set_keyword(keyword);