From f074caa49afbcb9cef8cfa80606d4d3a19c59793 Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Mon, 15 Sep 2025 11:08:56 +0200 Subject: [PATCH] Add a burger button to open the side menu --- .../list.imageset/Contents.json | 21 +++++++++++++++++++ .../Assets.xcassets/list.imageset/list.svg | 1 + Linphone/UI/Main/ContentView.swift | 13 +++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 Linphone/Assets.xcassets/list.imageset/Contents.json create mode 100644 Linphone/Assets.xcassets/list.imageset/list.svg diff --git a/Linphone/Assets.xcassets/list.imageset/Contents.json b/Linphone/Assets.xcassets/list.imageset/Contents.json new file mode 100644 index 000000000..bba768a9b --- /dev/null +++ b/Linphone/Assets.xcassets/list.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "list.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/list.imageset/list.svg b/Linphone/Assets.xcassets/list.imageset/list.svg new file mode 100644 index 000000000..5241a77dc --- /dev/null +++ b/Linphone/Assets.xcassets/list.imageset/list.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Linphone/UI/Main/ContentView.swift b/Linphone/UI/Main/ContentView.swift index b2ab6caf6..7b61f1cea 100644 --- a/Linphone/UI/Main/ContentView.swift +++ b/Linphone/UI/Main/ContentView.swift @@ -405,6 +405,17 @@ struct ContentView: View { VStack(spacing: 0) { if searchIsActive == false { HStack { + Button { + openMenu() + } label: { + Image("list") + .renderingMode(.template) + .resizable() + .foregroundStyle(.white) + .frame(width: 25, height: 25, alignment: .leading) + .padding(.all, 5) + } + if let index = accountProfileViewModel.defaultAccountModelIndex, index < coreContext.accounts.count { @@ -473,7 +484,7 @@ struct ContentView: View { Text(String(localized: sharedMainViewModel.indexView == 0 ? "bottom_navigation_contacts_label" : (sharedMainViewModel.indexView == 1 ? "bottom_navigation_calls_label" : (sharedMainViewModel.indexView == 2 ? "bottom_navigation_conversations_label" : "bottom_navigation_meetings_label")))) .default_text_style_white_800(styleSize: 20) - .padding(.leading, 10) + .padding(.leading, 2) Spacer()