diff --git a/Cargo.toml b/Cargo.toml
index 3f6141a..163c662 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,7 +29,7 @@ serde = { version = "1.0.196", features = ["derive"] }
once_cell = "1.13.0"
async-channel = "2.1.1"
-glib = { version = "^0.18" }
+glib = { version = "^0.18", features = ["v2_74"]}
gio = { version = "^0.18" }
pango = { version = "^0.18" }
gdk = { package = "gdk4", version = "^0.7", features = ["v4_12"] }
diff --git a/data/resources/resources.gresource.xml b/data/resources/resources.gresource.xml
index 3bb59fe..06fc63b 100644
--- a/data/resources/resources.gresource.xml
+++ b/data/resources/resources.gresource.xml
@@ -18,7 +18,6 @@
../../src/components/terminal_tab/terminal_tab.ui
../../src/components/search_toolbar/search_toolbar.ui
../../src/components/style_switcher/style_switcher.ui
- ../../src/components/zoom_controls/zoom_controls.ui
svg/theme-thumbnail.svg
@@ -31,4 +30,7 @@
../icons/io.github.vhdirk.Terms.Devel.svg
../icons/io.github.vhdirk.Terms-symbolic.svg
+
+ ../../src/tile/zoom_controls/zoom_controls.ui
+
diff --git a/data/resources/style.css b/data/resources/style.css
index 1a9f452..3f08211 100644
--- a/data/resources/style.css
+++ b/data/resources/style.css
@@ -17,6 +17,11 @@ window:not(.about) headerbar,
background-color: @window_bg_color;
}
+#terms_tab_bar.integrated {
+ margin-top: -6px;
+ margin-bottom: -6px;
+}
+
/* #terms_main_window.context-root .custom-headerbar {
background-color: @root_context_color;
}
@@ -28,7 +33,8 @@ window:not(.about) headerbar,
/* .custom-headerbar windowhandle>box {
padding-top: 0;
padding-bottom: 0;
-}
+} */
+/*
.custom-headerbar windowcontrols:not(.empty).start {
margin-right: 6px;
diff --git a/src/application.rs b/src/application.rs
index 28d3053..6901d5d 100644
--- a/src/application.rs
+++ b/src/application.rs
@@ -171,7 +171,9 @@ mod imp {
let app = self.obj();
info!("Window init args: {:?} {:?} {:?}", command, directory, env);
- let window = Window::new(&*app, command, directory, env);
+
+ let window = Window::new(&*app);
+ window.new_tab(command, directory, env);
info!("Add window");
app.add_window(&window);
diff --git a/src/components/header_bar/header_bar.rs b/src/components/header_bar/header_bar.rs
index baa1399..b0d1412 100644
--- a/src/components/header_bar/header_bar.rs
+++ b/src/components/header_bar/header_bar.rs
@@ -7,8 +7,8 @@ use gtk::prelude::*;
use tracing::info;
use crate::components::StyleSwitcher;
-use crate::components::ZoomControls;
use crate::settings::Settings;
+use crate::tile::ZoomControls;
#[derive(Debug, Default, gtk::CompositeTemplate, Properties)]
#[template(resource = "/io/github/vhdirk/Terms/gtk/header_bar.ui")]
@@ -148,15 +148,16 @@ impl HeaderBar {
fn set_integrated_tab_bar(&self) {
let tab_bar = self.tab_bar.borrow();
- tab_bar.unparent();
-
- if self.settings.headerbar_integrated_tabbar() && tab_bar.view().map_or(false, |view| view.n_pages() > 1) {
- self.header_bar.set_title_widget(Some(&*tab_bar));
+ if self.settings.headerbar_integrated_tabbar() {
+ if self.header_bar.title_widget() != Some(tab_bar.clone().into()) {
+ tab_bar.unparent();
+ self.header_bar.set_title_widget(Some(&*tab_bar));
+ }
tab_bar.set_halign(gtk::Align::Fill);
tab_bar.set_hexpand(true);
tab_bar.set_autohide(false);
tab_bar.set_can_focus(false);
- tab_bar.set_css_classes(&["inline"]);
+ tab_bar.set_css_classes(&["inline", "integrated"]);
} else {
self.header_bar.set_title_widget(Some(&*self.title_widget));
self.header_box.append(&*tab_bar);
diff --git a/src/components/header_bar/header_bar.ui b/src/components/header_bar/header_bar.ui
index 4bc4d2c..0d6018f 100644
--- a/src/components/header_bar/header_bar.ui
+++ b/src/components/header_bar/header_bar.ui
@@ -4,7 +4,6 @@
-