Skip to content

Truly independent web browser

UI/Qt: Even out the spacing around the tabs and the omnibox

Andreas Kling41a222a28a1e
diff --git a/UI/Qt/BrowserWindow.cpp b/UI/Qt/BrowserWindow.cpp
index 04010af35d7..2ed18782b98 100644
--- a/UI/Qt/BrowserWindow.cpp
+++ b/UI/Qt/BrowserWindow.cpp
@@ -60,7 +60,7 @@ static constexpr int WINDOW_RESIZE_BORDER_WIDTH = 6;
static constexpr int WINDOW_RESIZE_CORNER_WIDTH = WINDOW_RESIZE_BORDER_WIDTH * 2;
#if defined(AK_OS_MACOS)
static constexpr int NATIVE_WINDOW_CONTROL_X_OFFSET = 6;
-static constexpr int NATIVE_WINDOW_CONTROL_Y_OFFSET = 6;
+static constexpr int NATIVE_WINDOW_CONTROL_Y_OFFSET = 4;
#endif
static int visible_browser_window_count()
diff --git a/UI/Qt/ChromeLayout.h b/UI/Qt/ChromeLayout.h
index 6c4a1c1ac45..17050f5b577 100644
--- a/UI/Qt/ChromeLayout.h
+++ b/UI/Qt/ChromeLayout.h
@@ -33,7 +33,7 @@ static constexpr BrowserChromeLayoutPolicy browser_chrome_layout_policy()
return {
.expanded_sidebar_width = 232,
.collapsed_sidebar_width = 52,
- .toolbar_height = 40,
+ .toolbar_height = 41,
};
}
diff --git a/UI/Qt/TabBar.cpp b/UI/Qt/TabBar.cpp
index 7d87a77fdeb..4fae6d29fd5 100644
--- a/UI/Qt/TabBar.cpp
+++ b/UI/Qt/TabBar.cpp
@@ -62,7 +62,7 @@
namespace Ladybird {
static constexpr auto LADYBIRD_TAB_MIME_TYPE = "application/x-ladybird-tab";
-static constexpr int HORIZONTAL_TAB_STRIP_HEIGHT = 42;
+static constexpr int HORIZONTAL_TAB_STRIP_HEIGHT = 40;
static constexpr int HORIZONTAL_TAB_HEIGHT = 36;
static constexpr int HORIZONTAL_TAB_MIN_WIDTH = 128;
static constexpr int HORIZONTAL_TAB_MAX_WIDTH = 232;
@@ -501,7 +501,7 @@ TabBar::TabBar(TabWidget* tab_widget)
setAcceptDrops(true);
setFocusPolicy(Qt::NoFocus);
setIconSize({ 16, 16 });
- setMinimumHeight(39);
+ setMinimumHeight(HORIZONTAL_TAB_HEIGHT);
recreate_icons();
m_tab_preview_timer = new QTimer(this);
@@ -2148,12 +2148,12 @@ void TabWidget::rebuild_layout_for_horizontal_tabs()
if constexpr (use_native_macos_window_controls()) {
m_tab_bar_row_layout->addWidget(m_window_controls, 0, Qt::AlignVCenter);
- m_tab_bar_row_layout->addWidget(m_tab_bar);
- m_tab_bar_row_layout->addWidget(m_new_tab_button, 0, Qt::AlignVCenter);
+ m_tab_bar_row_layout->addWidget(m_tab_bar, 0, Qt::AlignTop);
+ m_tab_bar_row_layout->addWidget(m_new_tab_button, 0, Qt::AlignTop);
m_tab_bar_row_layout->addStretch(1);
} else {
- m_tab_bar_row_layout->addWidget(m_tab_bar);
- m_tab_bar_row_layout->addWidget(m_new_tab_button, 0, Qt::AlignVCenter);
+ m_tab_bar_row_layout->addWidget(m_tab_bar, 0, Qt::AlignTop);
+ m_tab_bar_row_layout->addWidget(m_new_tab_button, 0, Qt::AlignTop);
m_tab_bar_row_layout->addStretch(1);
m_tab_bar_row_layout->addWidget(m_window_controls);
}