From df978f6a898f4639a98a5269f14039e5e9e07fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20=C5=9Apiewak?= Date: Wed, 11 Dec 2024 12:09:12 +0100 Subject: [PATCH 1/5] Allow BrowsingMenuButton to size itself based on label content --- .../BrowsingMenu/BrowsingMenuButton.xib | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/DuckDuckGo/BrowsingMenu/BrowsingMenuButton.xib b/DuckDuckGo/BrowsingMenu/BrowsingMenuButton.xib index 6936ad96a9..358b28ef66 100644 --- a/DuckDuckGo/BrowsingMenu/BrowsingMenuButton.xib +++ b/DuckDuckGo/BrowsingMenu/BrowsingMenuButton.xib @@ -1,39 +1,36 @@ - + - + - - + + - + - + - From 6128bf2c629a72fbc122a2e75ef46fd8f09c7de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20=C5=9Apiewak?= Date: Wed, 11 Dec 2024 12:09:51 +0100 Subject: [PATCH 2/5] Restrict menu maximum width to container width --- .../BrowsingMenuViewController.storyboard | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard b/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard index c15ecff942..b0fd4e093a 100644 --- a/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard +++ b/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard @@ -1,9 +1,9 @@ - + - + @@ -28,10 +28,10 @@ - + - + @@ -39,43 +39,44 @@ - + - + - + - + + - + - + - + - + @@ -87,7 +88,7 @@ - + @@ -133,20 +134,20 @@ - + - + - + - + @@ -203,6 +204,7 @@ + From 1b0d0cbba930257bf3674c478e66c94bfd3b9f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20=C5=9Apiewak?= Date: Wed, 18 Dec 2024 12:13:45 +0100 Subject: [PATCH 3/5] Set margins and spacing for top browsing menu items --- .../BrowsingMenu/BrowsingMenuViewController.storyboard | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard b/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard index b0fd4e093a..e1f2e706c7 100644 --- a/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard +++ b/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard @@ -44,18 +44,18 @@ - - + + - + - + From 8ede61bb445e7e2eb0a11a8dda95eddf87e3fb31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20=C5=9Apiewak?= Date: Wed, 18 Dec 2024 12:14:14 +0100 Subject: [PATCH 4/5] Prevent adding separator in browsing menu if there are no items above --- DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift b/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift index fe6b117e86..4dc0613771 100644 --- a/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift +++ b/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift @@ -128,7 +128,10 @@ extension TabViewController { })) } - entries.append(.separator) + // Do not add separator if there are no entries so far + if entries.count > 0 { + entries.append(.separator) + } let shortcutsEntries = buildShortcutsEntries(includeBookmarks: false) entries.append(contentsOf: shortcutsEntries) From c8d055aa9eaf1dad889e99a854b9c7859afd5f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20=C5=9Apiewak?= Date: Thu, 19 Dec 2024 09:25:13 +0100 Subject: [PATCH 5/5] Use safe area guides --- .../BrowsingMenuViewController.storyboard | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard b/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard index e1f2e706c7..9b439b5901 100644 --- a/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard +++ b/DuckDuckGo/BrowsingMenu/BrowsingMenuViewController.storyboard @@ -1,9 +1,10 @@ - + + @@ -12,10 +13,6 @@ - - - - @@ -197,19 +194,20 @@ + - + - - + + - + - - + +