[console/wip/exalm/tab-overview: 40/40] Port to AdwTabOverview




commit 60c3ffe4d873832dcc18e7509ca2fcc161370f31
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Aug 17 00:02:19 2022 +0400

    Port to AdwTabOverview
    
    Drop KgxTabSwitcher and everything related.
    
    Make sure the root and remote styles don't affect overview.
    
    Separate search bar styles to be per-tab rather than per-window, so
    inactive tab can still have them colored correctly if thumbnails are
    invalidated.

 src/icons/scalable/status/tab-counter-symbolic.svg |  69 --
 .../scalable/status/tab-overflow-symbolic.svg      |  41 --
 .../status/tab-switcher-collapse-symbolic.svg      |  61 --
 src/kgx-marshals.list                              |   3 +-
 src/kgx-pages.c                                    |  67 ++
 src/kgx-pages.h                                    |   1 +
 src/kgx-pages.ui                                   |   4 +
 src/kgx-tab-button.c                               | 299 ---------
 src/kgx-tab-button.h                               |  35 -
 src/kgx-tab-button.ui                              |  28 -
 src/kgx-tab-switcher-row.c                         | 399 ------------
 src/kgx-tab-switcher-row.h                         |  39 --
 src/kgx-tab-switcher-row.ui                        |  82 ---
 src/kgx-tab-switcher.c                             | 706 ---------------------
 src/kgx-tab-switcher.h                             |  44 --
 src/kgx-tab-switcher.ui                            |  75 ---
 src/kgx-tab.c                                      |  41 +-
 src/kgx-window.c                                   |  54 +-
 src/kgx-window.h                                   |   3 +-
 src/kgx-window.ui                                  |  17 +-
 src/kgx.gresource.xml.in                           |   6 -
 src/meson.build                                    |   6 -
 src/style.css                                      |  82 +--
 23 files changed, 173 insertions(+), 1989 deletions(-)
---
diff --git a/src/kgx-marshals.list b/src/kgx-marshals.list
index 7f7c1f8..9df70e3 100644
--- a/src/kgx-marshals.list
+++ b/src/kgx-marshals.list
@@ -1,5 +1,4 @@
 OBJECT: VOID
 VOID: ENUM
 VOID: ENUM, STRING, BOOLEAN
-VOID: UINT, UINT
-VOID: VOID
\ No newline at end of file
+VOID: UINT, UINT
\ No newline at end of file
diff --git a/src/kgx-pages.c b/src/kgx-pages.c
index eeb029e..9ceb2de 100644
--- a/src/kgx-pages.c
+++ b/src/kgx-pages.c
@@ -37,6 +37,8 @@
 
 typedef struct _KgxPagesPrivate KgxPagesPrivate;
 struct _KgxPagesPrivate {
+  KgxSettings          *settings;
+
   GtkWidget            *view;
   char                 *title;
   GFile                *path;
@@ -54,6 +56,7 @@ struct _KgxPagesPrivate {
 
   GSignalGroup         *active_page_signals;
   GBindingGroup        *active_page_binds;
+  GSignalGroup         *settings_signals;
 
   GBinding             *is_active_bind;
 
@@ -66,6 +69,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (KgxPages, kgx_pages, ADW_TYPE_BIN)
 
 enum {
   PROP_0,
+  PROP_SETTINGS,
   PROP_TAB_VIEW,
   PROP_TAB_COUNT,
   PROP_TITLE,
@@ -93,6 +97,8 @@ kgx_pages_dispose (GObject *object)
   KgxPages *self = KGX_PAGES (object);
   KgxPagesPrivate *priv = kgx_pages_get_instance_private (self);
 
+  g_clear_object (&priv->settings);
+
   g_clear_handle_id (&priv->timeout, g_source_remove);
 
   g_clear_pointer (&priv->title, g_free);
@@ -114,6 +120,9 @@ kgx_pages_get_property (GObject    *object,
   KgxPagesPrivate *priv = kgx_pages_get_instance_private (self);
 
   switch (property_id) {
+    case PROP_SETTINGS:
+      g_value_set_object (value, priv->settings);
+      break;
     case PROP_TAB_COUNT:
       g_value_set_uint (value, adw_tab_view_get_n_pages (ADW_TAB_VIEW (priv->view)));
       break;
@@ -155,6 +164,9 @@ kgx_pages_set_property (GObject      *object,
   KgxPagesPrivate *priv = kgx_pages_get_instance_private (self);
 
   switch (property_id) {
+    case PROP_SETTINGS:
+      g_set_object (&priv->settings, g_value_get_object (value));
+      break;
     case PROP_TITLE:
       g_clear_pointer (&priv->title, g_free);
       priv->title = g_value_dup_string (value);
@@ -420,6 +432,23 @@ status_to_icon (GBinding     *binding,
 }
 
 
+static gboolean
+path_to_keyword (GBinding     *binding,
+                 const GValue *from_value,
+                 GValue       *to_value,
+                 gpointer      user_data)
+{
+  GFile *path = g_value_get_object (from_value);
+
+  if (path)
+    g_value_take_string (to_value, g_file_get_path (path));
+  else
+    g_value_set_string (to_value, "");
+
+  return TRUE;
+}
+
+
 static gboolean
 object_accumulator (GSignalInvocationHint *ihint,
                     GValue                *return_value,
@@ -444,6 +473,11 @@ kgx_pages_class_init (KgxPagesClass *klass)
   object_class->get_property = kgx_pages_get_property;
   object_class->set_property = kgx_pages_set_property;
 
+  pspecs[PROP_SETTINGS] =
+    g_param_spec_object ("settings", NULL, NULL,
+                         KGX_TYPE_SETTINGS,
+                         G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
   /**
    * KgxPages:tab-view:
    *
@@ -558,6 +592,7 @@ kgx_pages_class_init (KgxPagesClass *klass)
   gtk_widget_class_bind_template_child_private (widget_class, KgxPages, status_revealer);
   gtk_widget_class_bind_template_child_private (widget_class, KgxPages, active_page_signals);
   gtk_widget_class_bind_template_child_private (widget_class, KgxPages, active_page_binds);
+  gtk_widget_class_bind_template_child_private (widget_class, KgxPages, settings_signals);
 
   gtk_widget_class_bind_template_callback (widget_class, page_attached);
   gtk_widget_class_bind_template_callback (widget_class, page_detached);
@@ -574,6 +609,7 @@ static void
 kgx_pages_init (KgxPages *self)
 {
   KgxPagesPrivate *priv = kgx_pages_get_instance_private (self);
+  AdwStyleManager *style_manager = adw_style_manager_get_default ();
 
   gtk_widget_init_template (GTK_WIDGET (self));
 
@@ -581,6 +617,22 @@ kgx_pages_init (KgxPages *self)
                           "size-changed", G_CALLBACK (size_changed),
                           self);
 
+  g_signal_group_connect_swapped (priv->settings_signals, "notify::theme",
+                                  G_CALLBACK (adw_tab_view_invalidate_thumbnails),
+                                  priv->view);
+
+  g_signal_connect_object (style_manager,
+                           "notify::dark",
+                           G_CALLBACK (adw_tab_view_invalidate_thumbnails),
+                           priv->view,
+                           G_CONNECT_SWAPPED);
+
+  g_signal_connect_object (style_manager,
+                           "notify::high-contrast",
+                           G_CALLBACK (adw_tab_view_invalidate_thumbnails),
+                           priv->view,
+                           G_CONNECT_SWAPPED);
+
   g_binding_group_bind (priv->active_page_binds, "search-mode-enabled",
                         self, "search-mode-enabled",
                         G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
@@ -614,6 +666,8 @@ kgx_pages_add_page (KgxPages *self,
   g_object_bind_property (tab, "needs-attention", page, "needs-attention", G_BINDING_SYNC_CREATE);
   g_object_bind_property_full (tab, "tab-status", page, "icon", G_BINDING_SYNC_CREATE,
                                status_to_icon, NULL, NULL, NULL);
+  g_object_bind_property_full (tab, "tab-path", page, "keyword", G_BINDING_SYNC_CREATE,
+                               path_to_keyword, NULL, NULL, NULL);
 }
 
 
@@ -787,3 +841,16 @@ kgx_pages_detach_page (KgxPages *self)
   new_view = create_window (ADW_TAB_VIEW (priv->view), self);
   adw_tab_view_transfer_page (ADW_TAB_VIEW (priv->view), page, new_view, 0);
 }
+
+
+AdwTabPage *
+kgx_pages_get_selected_page (KgxPages  *self)
+{
+  KgxPagesPrivate *priv;
+
+  g_return_val_if_fail (KGX_IS_PAGES (self), NULL);
+
+  priv = kgx_pages_get_instance_private (self);
+
+  return adw_tab_view_get_selected_page (ADW_TAB_VIEW (priv->view));
+}
diff --git a/src/kgx-pages.h b/src/kgx-pages.h
index 11b58b0..f8c1b13 100644
--- a/src/kgx-pages.h
+++ b/src/kgx-pages.h
@@ -53,5 +53,6 @@ void        kgx_pages_focus_page     (KgxPages   *self,
 KgxStatus   kgx_pages_current_status (KgxPages   *self);
 void        kgx_pages_close_page          (KgxPages  *self);
 void        kgx_pages_detach_page         (KgxPages  *self);
+AdwTabPage *kgx_pages_get_selected_page   (KgxPages  *self);
 
 G_END_DECLS
diff --git a/src/kgx-pages.ui b/src/kgx-pages.ui
index 6db73cf..41d3a9e 100644
--- a/src/kgx-pages.ui
+++ b/src/kgx-pages.ui
@@ -79,4 +79,8 @@
   <object class="GBindingGroup" id="active_page_binds">
     <property name="source" bind-source="KgxPages" bind-property="active-page" bind-flags="sync-create"/>
   </object>
+  <object class="GSignalGroup" id="settings_signals">
+    <property name="target-type">KgxSettings</property>
+    <property name="target" bind-source="KgxPages" bind-property="settings" bind-flags="sync-create"/>
+  </object>
 </interface>
diff --git a/src/kgx-tab.c b/src/kgx-tab.c
index ea06d80..fee9750 100644
--- a/src/kgx-tab.c
+++ b/src/kgx-tab.c
@@ -269,6 +269,34 @@ start_spinner_timeout_cb (KgxTab *self)
 }
 
 
+static void
+set_status (KgxTab    *self,
+            KgxStatus  status)
+{
+  KgxTabPrivate *priv = kgx_tab_get_instance_private (self);
+
+  if (priv->status == status) {
+    return;
+  }
+
+  priv->status = status;
+
+  if (status & KGX_REMOTE) {
+    gtk_widget_add_css_class (GTK_WIDGET (self), KGX_WINDOW_STYLE_REMOTE);
+  } else {
+    gtk_widget_remove_css_class (GTK_WIDGET (self), KGX_WINDOW_STYLE_REMOTE);
+  }
+
+  if (status & KGX_PRIVILEGED) {
+    gtk_widget_add_css_class (GTK_WIDGET (self), KGX_WINDOW_STYLE_ROOT);
+  } else {
+    gtk_widget_remove_css_class (GTK_WIDGET (self), KGX_WINDOW_STYLE_ROOT);
+  }
+
+  g_object_notify_by_pspec (G_OBJECT (self), pspecs[PROP_TAB_STATUS]);
+}
+
+
 static void
 kgx_tab_get_property (GObject    *object,
                       guint       property_id,
@@ -377,7 +405,7 @@ kgx_tab_set_property (GObject      *object,
       g_set_object (&priv->path, g_value_get_object (value));
       break;
     case PROP_TAB_STATUS:
-      priv->status = g_value_get_flags (value);
+      set_status (self, g_value_get_flags (value));
       break;
     case PROP_TAB_TOOLTIP:
       g_clear_pointer (&priv->tooltip, g_free);
@@ -892,10 +920,7 @@ kgx_tab_push_child (KgxTab     *self,
 
   push_type (priv->children, pid, process, context, KGX_NONE);
 
-  if (priv->status != new_status) {
-    priv->status = new_status;
-    g_object_notify_by_pspec (G_OBJECT (self), pspecs[PROP_TAB_STATUS]);
-  }
+  set_status (self, new_status);
 }
 
 
@@ -950,10 +975,7 @@ kgx_tab_pop_child (KgxTab     *self,
   new_status |= pop_type (priv->root, pid, context, KGX_PRIVILEGED);
   pop_type (priv->children, pid, context, KGX_NONE);
 
-  if (priv->status != new_status) {
-    priv->status = new_status;
-    g_object_notify_by_pspec (G_OBJECT (self), pspecs[PROP_TAB_STATUS]);
-  }
+  set_status (self, new_status);
 
   if (!kgx_tab_is_active (self)) {
     g_autoptr (GNotification) noti = NULL;
@@ -1067,3 +1089,4 @@ kgx_tab_set_initial_title (KgxTab     *self,
                 "tab-path", path,
                 NULL);
 }
+
diff --git a/src/kgx-window.c b/src/kgx-window.c
index 8974059..b8839ea 100644
--- a/src/kgx-window.c
+++ b/src/kgx-window.c
@@ -37,8 +37,6 @@
 #include "kgx-application.h"
 #include "kgx-close-dialog.h"
 #include "kgx-pages.h"
-#include "kgx-tab-button.h"
-#include "kgx-tab-switcher.h"
 #include "kgx-theme-switcher.h"
 #include "kgx-watcher.h"
 
@@ -47,6 +45,7 @@ G_DEFINE_TYPE (KgxWindow, kgx_window, ADW_TYPE_APPLICATION_WINDOW)
 enum {
   PROP_0,
   PROP_SETTINGS,
+  PROP_NARROW,
   LAST_PROP
 };
 
@@ -96,6 +95,9 @@ kgx_window_get_property (GObject    *object,
     case PROP_SETTINGS:
       g_value_set_object (value, self->settings);
       break;
+    case PROP_NARROW:
+      g_value_set_boolean (value, self->narrow);
+      break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -112,6 +114,27 @@ close_response (KgxWindow *self)
 }
 
 
+static void
+kgx_window_size_allocate (GtkWidget *widget,
+                          int        width,
+                          int        height,
+                          int        baseline)
+{
+  KgxWindow *self = KGX_WINDOW (widget);
+  gboolean narrow = width < 400;
+
+  if (narrow != self->narrow) {
+    self->narrow = narrow;
+    g_object_notify_by_pspec (G_OBJECT (self), pspecs[PROP_NARROW]);
+
+    if (!narrow)
+      adw_tab_overview_set_open (ADW_TAB_OVERVIEW (self->tab_overview), FALSE);
+  }
+
+  GTK_WIDGET_CLASS (kgx_window_parent_class)->size_allocate (widget, width, height, baseline);
+}
+
+
 static gboolean
 kgx_window_close_request (GtkWindow *window)
 {
@@ -236,11 +259,12 @@ static void new_tab_activated (GSimpleAction *action,
                                gpointer       data);
 
 
-static void
-new_tab_cb (KgxTabSwitcher *switcher,
-            KgxWindow      *self)
+static AdwTabPage *
+create_tab_cb (KgxWindow *self)
 {
   new_tab_activated (NULL, NULL, self);
+
+  return kgx_pages_get_selected_page (KGX_PAGES (self->pages));
 }
 
 
@@ -255,6 +279,8 @@ kgx_window_class_init (KgxWindowClass *klass)
   object_class->set_property = kgx_window_set_property;
   object_class->get_property = kgx_window_get_property;
 
+  widget_class->size_allocate = kgx_window_size_allocate;
+
   window_class->close_request = kgx_window_close_request;
 
   pspecs[PROP_SETTINGS] =
@@ -262,6 +288,11 @@ kgx_window_class_init (KgxWindowClass *klass)
                          KGX_TYPE_SETTINGS,
                          G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
 
+  pspecs[PROP_NARROW] =
+    g_param_spec_boolean ("narrow", NULL, NULL,
+                          FALSE,
+                          G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
   g_object_class_install_properties (object_class, LAST_PROP, pspecs);
 
   gtk_widget_class_set_template_from_resource (widget_class,
@@ -274,7 +305,7 @@ kgx_window_class_init (KgxWindowClass *klass)
   gtk_widget_class_bind_template_child (widget_class, KgxWindow, zoom_level);
   gtk_widget_class_bind_template_child (widget_class, KgxWindow, tab_bar);
   gtk_widget_class_bind_template_child (widget_class, KgxWindow, tab_button);
-  gtk_widget_class_bind_template_child (widget_class, KgxWindow, tab_switcher);
+  gtk_widget_class_bind_template_child (widget_class, KgxWindow, tab_overview);
   gtk_widget_class_bind_template_child (widget_class, KgxWindow, pages);
   gtk_widget_class_bind_template_child (widget_class, KgxWindow, primary_menu);
   gtk_widget_class_bind_template_child (widget_class, KgxWindow, settings_binds);
@@ -285,7 +316,7 @@ kgx_window_class_init (KgxWindowClass *klass)
   gtk_widget_class_bind_template_callback (widget_class, create_tearoff_host);
   gtk_widget_class_bind_template_callback (widget_class, status_changed);
   gtk_widget_class_bind_template_callback (widget_class, extra_drag_drop);
-  gtk_widget_class_bind_template_callback (widget_class, new_tab_cb);
+  gtk_widget_class_bind_template_callback (widget_class, create_tab_cb);
 }
 
 
@@ -404,7 +435,7 @@ tab_switcher_activated (GSimpleAction *action,
 {
   KgxWindow *self = data;
 
-  kgx_tab_switcher_open (KGX_TAB_SWITCHER (self->tab_switcher));
+  adw_tab_overview_set_open (ADW_TAB_OVERVIEW (self->tab_overview), TRUE);
 }
 
 
@@ -487,8 +518,6 @@ kgx_window_init (KgxWindow *self)
   g_autoptr (GPropertyAction) pact = NULL;
   AdwStyleManager *style_manager;
 
-  g_type_ensure (KGX_TYPE_TAB_BUTTON);
-  g_type_ensure (KGX_TYPE_TAB_SWITCHER);
   g_type_ensure (KGX_TYPE_THEME_SWITCHER);
 
   gtk_widget_init_template (GTK_WIDGET (self));
@@ -545,12 +574,15 @@ kgx_window_init (KgxWindow *self)
                           self->tab_button, "view",
                           G_BINDING_SYNC_CREATE);
   g_object_bind_property (self->pages, "tab-view",
-                          self->tab_switcher, "view",
+                          self->tab_overview, "view",
                           G_BINDING_SYNC_CREATE);
 
   adw_tab_bar_setup_extra_drop_target (ADW_TAB_BAR (self->tab_bar),
                                        GDK_ACTION_COPY,
                                        (GType[1]) { G_TYPE_STRING }, 1);
+  adw_tab_overview_setup_extra_drop_target (ADW_TAB_OVERVIEW (self->tab_overview),
+                                            GDK_ACTION_COPY,
+                                            (GType[1]) { G_TYPE_STRING }, 1);
 
   group = gtk_window_group_new ();
   gtk_window_group_add_window (group, GTK_WINDOW (self));
diff --git a/src/kgx-window.h b/src/kgx-window.h
index 31cd6ca..e38c3d6 100644
--- a/src/kgx-window.h
+++ b/src/kgx-window.h
@@ -60,6 +60,7 @@ struct _KgxWindow
   int                   last_rows;
   guint                 timeout;
 
+  gboolean              narrow;
   gboolean              close_anyway;
 
   /* Template widgets */
@@ -70,7 +71,7 @@ struct _KgxWindow
   GtkWidget            *zoom_level;
   GtkWidget            *tab_bar;
   GtkWidget            *tab_button;
-  GtkWidget            *tab_switcher;
+  GtkWidget            *tab_overview;
   GtkWidget            *pages;
   GMenu                *primary_menu;
 
diff --git a/src/kgx-window.ui b/src/kgx-window.ui
index 78087bd..d7b0e9e 100644
--- a/src/kgx-window.ui
+++ b/src/kgx-window.ui
@@ -32,11 +32,15 @@
   <template class="KgxWindow" parent="AdwApplicationWindow">
     <signal name="notify::is-active" handler="active_changed" swapped="no"/>
     <property name="content">
-      <object class="KgxTabSwitcher" id="tab_switcher">
-        <signal name="new-tab" handler="new_tab_cb" swapped="no"/>
+      <object class="AdwTabOverview" id="tab_overview">
+        <property name="enable-new-tab">True</property>
+        <signal name="create-tab" handler="create_tab_cb" swapped="yes"/>
         <property name="child">
           <object class="GtkBox">
             <property name="orientation">vertical</property>
+            <style>
+              <class name="main-box"/>
+            </style>
             <child>
               <object class="GtkHeaderBar" id="header_bar">
                 <property name="title-widget">
@@ -118,14 +122,14 @@
                   </object>
                 </child>
                 <child type="end">
-                  <object class="KgxTabButton" id="tab_button">
-                    <property name="visible" bind-source="tab_switcher" bind-property="narrow" 
bind-flags="sync-create"/>
+                  <object class="AdwTabButton" id="tab_button">
+                    <property name="visible" bind-source="KgxWindow" bind-property="narrow" 
bind-flags="sync-create"/>
                     <property name="action-name">win.tab-switcher</property>
                   </object>
                 </child>
                 <child type="end">
                   <object class="GtkButton">
-                    <property name="visible" bind-source="tab_switcher" bind-property="narrow" 
bind-flags="sync-create|invert-boolean"/>
+                    <property name="visible" bind-source="KgxWindow" bind-property="narrow" 
bind-flags="sync-create|invert-boolean"/>
                     <property name="can-focus">0</property>
                     <property name="receives-default">0</property>
                     <property name="action-name">win.new-tab</property>
@@ -137,7 +141,7 @@
             </child>
             <child>
               <object class="GtkRevealer">
-                <property name="reveal-child" bind-source="tab_switcher" bind-property="narrow" 
bind-flags="sync-create|invert-boolean"/>
+                <property name="reveal-child" bind-source="KgxWindow" bind-property="narrow" 
bind-flags="sync-create|invert-boolean"/>
                 <property name="child">
                   <object class="AdwTabBar" id="tab_bar">
                     <signal name="extra-drag-drop" handler="extra_drag_drop" swapped="no"/>
@@ -147,6 +151,7 @@
             </child>
             <child>
               <object class="KgxPages" id="pages">
+                <property name="settings" bind-source="KgxWindow" bind-property="settings" 
bind-flags="sync-create" />
                 <property name="is-active" bind-source="KgxWindow" bind-property="is-active" 
bind-flags="sync-create" />
                 <signal name="zoom" handler="zoom" swapped="no"/>
                 <signal name="create-tearoff-host" handler="create_tearoff_host" swapped="no"/>
diff --git a/src/kgx.gresource.xml.in b/src/kgx.gresource.xml.in
index 6994231..be2512d 100644
--- a/src/kgx.gresource.xml.in
+++ b/src/kgx.gresource.xml.in
@@ -5,9 +5,6 @@
     <file compressed="true">kgx-close-dialog.ui</file>
     <file compressed="true">kgx-pages.ui</file>
     <file compressed="true">kgx-tab.ui</file>
-    <file compressed="true">kgx-tab-button.ui</file>
-    <file compressed="true">kgx-tab-switcher.ui</file>
-    <file compressed="true">kgx-tab-switcher-row.ui</file>
     <file compressed="true">kgx-theme-switcher.ui</file>
     <file compressed="true">kgx-simple-tab.ui</file>
     <file compressed="true">style.css</file>
@@ -16,9 +13,6 @@
     <file preprocess="xml-stripblanks">icons/scalable/status/status-privileged-symbolic.svg</file>
     <file preprocess="xml-stripblanks">icons/scalable/status/status-regular-symbolic.svg</file>
     <file preprocess="xml-stripblanks">icons/scalable/status/status-remote-symbolic.svg</file>
-    <file preprocess="xml-stripblanks">icons/scalable/status/tab-counter-symbolic.svg</file>
-    <file preprocess="xml-stripblanks">icons/scalable/status/tab-overflow-symbolic.svg</file>
-    <file preprocess="xml-stripblanks">icons/scalable/status/tab-switcher-collapse-symbolic.svg</file>
     <file preprocess="xml-stripblanks">icons/scalable/status/theme-check-symbolic.svg</file>
   </gresource>
   <gresource prefix="@KGX_APPLICATION_PATH_RAW@gtk">
diff --git a/src/meson.build b/src/meson.build
index 04c9b85..4a0f2ad 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -15,12 +15,6 @@ kgx_sources = [
   'kgx-settings.h',
   'kgx-simple-tab.c',
   'kgx-simple-tab.h',
-  'kgx-tab-button.c',
-  'kgx-tab-button.h',
-  'kgx-tab-switcher-row.c',
-  'kgx-tab-switcher-row.h',
-  'kgx-tab-switcher.c',
-  'kgx-tab-switcher.h',
   'kgx-tab.c',
   'kgx-tab.h',
   'kgx-terminal.c',
diff --git a/src/style.css b/src/style.css
index debdd16..ca1d1d6 100644
--- a/src/style.css
+++ b/src/style.css
@@ -4,31 +4,27 @@
 @define-color remote_headerbar_bg_color       shade(@purple_1, 1.27);
 @define-color remote_headerbar_backdrop_color shade(@purple_1, 1.35);
 
-.terminal-window {
-  background: transparent;
-}
-
-.terminal-window.root headerbar,
-.terminal-window.root searchbar > revealer > box,
-.terminal-window.root tabbar > revealer > box {
+.terminal-window.root .main-box headerbar,
+.terminal-window.root .main-box tabbar > revealer > box,
+.tab.root searchbar > revealer > box {
   background-color: @root_headerbar_bg_color;
 }
 
-.terminal-window.root:backdrop headerbar,
-.terminal-window.root:backdrop searchbar > revealer > box,
-.terminal-window.root:backdrop tabbar > revealer > box {
+.terminal-window.root:backdrop .main-box headerbar,
+.terminal-window.root:backdrop .main-box tabbar > revealer > box,
+.tab.root:backdrop searchbar > revealer > box {
   background-color: @root_headerbar_backdrop_color;
 }
 
-.terminal-window.remote headerbar,
-.terminal-window.remote searchbar > revealer > box,
-.terminal-window.remote tabbar > revealer > box {
+.terminal-window.remote .main-box  headerbar,
+.terminal-window.remote .main-box tabbar > revealer > box,
+.tab.remote searchbar > revealer > box {
   background-color: @remote_headerbar_bg_color;
 }
 
-.terminal-window.remote:backdrop headerbar,
-.terminal-window.remote:backdrop searchbar > revealer > box,
-.terminal-window.remote:backdrop tabbar > revealer > box {
+.terminal-window.remote:backdrop .main-box headerbar,
+.terminal-window.remote:backdrop .main-box tabbar > revealer > box,
+.tab.remote:backdrop searchbar > revealer > box {
   background-color: @remote_headerbar_backdrop_color;
 }
 
@@ -98,60 +94,6 @@ window:not(.tiled)
   font-family: monospace;
 }
 
-.tab-button label {
-  font-weight: 800;
-  font-size: 8pt;
-}
-
-.tab-button label.small {
-  font-size: 6pt;
-}
-
-.tab-switcher {
-  min-height: 180px;
-}
-
-.tab-switcher list {
-  padding-top: 48px;
-  padding-bottom: 84px;
-  background-color: @popover_bg_color;
-  color: @popover_fg_color;
-}
-
-.tab-switcher list row {
-  min-height: 40px;
-  padding: 3px;
-}
-
-.tab-switcher list row:dir(ltr) { padding-left: 11px; }
-.tab-switcher list row:dir(rtl) { padding-right: 11px; }
-
-.tab-switcher list row.needs-attention {
-  color: @accent_color;
-}
-
-.tab-switcher list row .close-btn,
-.tab-switcher list row .indicator-btn {
-  min-width: 36px;
-  min-height: 36px;
-  border-radius: 99px;
-  padding: 0;
-}
-
-.tab-switcher .collapse-button {
-  border-radius: 99px;
-  padding: 6px 30px;
-  margin: 6px;
-}
-
-.tab-switcher .new-tab-button {
-  min-width: 48px;
-  min-height: 48px;
-  border-radius: 100%;
-  padding: 0;
-  margin: 18px;
-}
-
 themeswitcher {
   padding: 6px;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]