From 21ab1ea9efd8218b50d04b927a66ac5647cfad55 Mon Sep 17 00:00:00 2001 From: Erik Gomez Date: Tue, 8 Jun 2021 15:36:28 -0500 Subject: [PATCH] move to some more swiftui 5.5 syntax --- Nudge/UI/SimpleMode/SimpleMode.swift | 2 +- Nudge/UI/StandardMode/DeviceInfo.swift | 2 +- Nudge/UI/StandardMode/LeftSide.swift | 4 ++-- Nudge/UI/StandardMode/RightSide.swift | 4 ++-- Nudge/UI/StandardMode/ScreenShotZoom.swift | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Nudge/UI/SimpleMode/SimpleMode.swift b/Nudge/UI/SimpleMode/SimpleMode.swift index e7c7f155..24f63978 100644 --- a/Nudge/UI/SimpleMode/SimpleMode.swift +++ b/Nudge/UI/SimpleMode/SimpleMode.swift @@ -102,7 +102,7 @@ struct SimpleMode: View { .foregroundColor(.secondary) } ) - .buttonStyle(PlainButtonStyle()) + .buttonStyle(.plain) .help("Click for more information about the security update".localized(desiredLanguage: getDesiredLanguage())) .onHover { inside in if inside { diff --git a/Nudge/UI/StandardMode/DeviceInfo.swift b/Nudge/UI/StandardMode/DeviceInfo.swift index f8f8bd4b..3b556230 100644 --- a/Nudge/UI/StandardMode/DeviceInfo.swift +++ b/Nudge/UI/StandardMode/DeviceInfo.swift @@ -30,7 +30,7 @@ struct DeviceInfo: View { .frame(width: 20, height: 20) .foregroundColor(.red) } - .buttonStyle(PlainButtonStyle()) + .buttonStyle(.plain) .help("Click to close".localized(desiredLanguage: getDesiredLanguage())) .onHover { inside in if inside { diff --git a/Nudge/UI/StandardMode/LeftSide.swift b/Nudge/UI/StandardMode/LeftSide.swift index 895015ba..1fdbc398 100644 --- a/Nudge/UI/StandardMode/LeftSide.swift +++ b/Nudge/UI/StandardMode/LeftSide.swift @@ -36,7 +36,7 @@ struct StandardModeLeftSide: View { }) { Image(systemName: "questionmark.circle") } - .buttonStyle(PlainButtonStyle()) + .buttonStyle(.plain) .padding(.top, -25.0) .padding(.leading, 5.0) // TODO: This is broken because of the padding @@ -135,7 +135,7 @@ struct StandardModeLeftSide: View { .foregroundColor(.secondary) } ) - .buttonStyle(PlainButtonStyle()) + .buttonStyle(.plain) .help("Click for more information about the security update".localized(desiredLanguage: getDesiredLanguage())) .onHover { inside in if inside { diff --git a/Nudge/UI/StandardMode/RightSide.swift b/Nudge/UI/StandardMode/RightSide.swift index 5f00d6a8..78035e81 100644 --- a/Nudge/UI/StandardMode/RightSide.swift +++ b/Nudge/UI/StandardMode/RightSide.swift @@ -157,7 +157,7 @@ struct StandardModeRightSide: View { .aspectRatio(contentMode: .fit) .frame(maxHeight: 120) } - .buttonStyle(PlainButtonStyle()) + .buttonStyle(.plain) .help("Click to zoom into screenshot".localized(desiredLanguage: getDesiredLanguage())) .sheet(isPresented: $showSSDetail) { ScreenShotZoom() @@ -179,7 +179,7 @@ struct StandardModeRightSide: View { .aspectRatio(contentMode: .fit) .frame(maxHeight: 120) } - .buttonStyle(PlainButtonStyle()) + .buttonStyle(.plain) .hidden() .help("Click to zoom into screenshot".localized(desiredLanguage: getDesiredLanguage())) .sheet(isPresented: $showSSDetail) { diff --git a/Nudge/UI/StandardMode/ScreenShotZoom.swift b/Nudge/UI/StandardMode/ScreenShotZoom.swift index b776a5a3..0991e0fa 100644 --- a/Nudge/UI/StandardMode/ScreenShotZoom.swift +++ b/Nudge/UI/StandardMode/ScreenShotZoom.swift @@ -27,7 +27,7 @@ struct ScreenShotZoom: View { .frame(width: 20, height: 20) .foregroundColor(.red) } - .buttonStyle(PlainButtonStyle()) + .buttonStyle(.plain) .help("Click to close".localized(desiredLanguage: getDesiredLanguage())) .onHover { inside in if inside { @@ -59,7 +59,7 @@ struct ScreenShotZoom: View { } } ) - .buttonStyle(PlainButtonStyle()) + .buttonStyle(.plain) .help("Click to close".localized(desiredLanguage: getDesiredLanguage())) .onHover { inside in if inside {