diff --git a/Ice/Settings/SettingsPanes/MenuBarSettingsPane/MenuBarSettingsPane.swift b/Ice/Settings/SettingsPanes/MenuBarSettingsPane/MenuBarSettingsPane.swift index d09b9383..df0cf834 100644 --- a/Ice/Settings/SettingsPanes/MenuBarSettingsPane/MenuBarSettingsPane.swift +++ b/Ice/Settings/SettingsPanes/MenuBarSettingsPane/MenuBarSettingsPane.swift @@ -10,14 +10,10 @@ struct MenuBarSettingsPane: View { var body: some View { CustomTabView(selection: $selection) { - CustomTab { - Text("Appearance") - } content: { + CustomTab("Appearance") { MenuBarAppearanceTab() } - CustomTab { - Text("Layout") - } content: { + CustomTab("Layout") { MenuBarLayoutTab() } } diff --git a/Ice/UI/Views/CustomTabView/CustomTab.swift b/Ice/UI/Views/CustomTabView/CustomTab.swift index bc59bc1e..6f91f89c 100644 --- a/Ice/UI/Views/CustomTabView/CustomTab.swift +++ b/Ice/UI/Views/CustomTabView/CustomTab.swift @@ -22,4 +22,12 @@ struct CustomTab { self.label = AnyView(label()) self.content = AnyView(content()) } + + /// Creates a tab with the given label and content view. + init( + _ labelKey: LocalizedStringKey, + @ViewBuilder content: () -> Content + ) { + self.init(label: { Text(labelKey) }, content: content) + } }