From 4ddc0699afedae39fa27e134bec05330426f2120 Mon Sep 17 00:00:00 2001 From: Dustin Mierau Date: Fri, 22 Dec 2023 17:37:13 -0800 Subject: Some work to get banner images working. Some plumbing to get file transfers working though they don't yet. Moving some code away from async/await. --- Hotline/macOS/NewsView.swift | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'Hotline/macOS/NewsView.swift') diff --git a/Hotline/macOS/NewsView.swift b/Hotline/macOS/NewsView.swift index 33cc03e..45bae68 100644 --- a/Hotline/macOS/NewsView.swift +++ b/Hotline/macOS/NewsView.swift @@ -220,7 +220,7 @@ struct NewsView: View { .background(Color(nsColor: .textBackgroundColor)) } .toolbar { - ToolbarItem(placement:.primaryAction) { + ToolbarItem(placement: .primaryAction) { Button { } label: { @@ -228,13 +228,39 @@ struct NewsView: View { } } - ToolbarItem(placement:.primaryAction) { + ToolbarItem(placement: .primaryAction) { Button { } label: { Image(systemName: "arrowshape.turn.up.left") } } + +// if let bannerImage = model.bannerImage { +// ToolbarItem(placement: .primaryAction) { +//// HStack { +// bannerImage +// .resizable() +// .aspectRatio(contentMode: .fit) +// .clipped() +// .frame(minHeight: 60, alignment: .topLeading +// ) +// .clipped() +// } +// .frame(maxWidth: .infinity) +// .tag(MenuItem(name: "title", image: "", type: .banner)) +// .padding(.bottom, 16) + + // VStack(spacing: 0) { + // bannerImage + // .resizable() + // .aspectRatio(contentMode: .fit) + // .frame(maxWidth: .infinity, minHeight: 60, alignment: .topLeading) + // .clipped() + // } + // .frame(maxWidth: .infinity) +// } +// } } } } -- cgit