mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-25 04:24:49 -04:00
Fix capsule button styles on macOS Monterey + Ventura
This commit is contained in:
parent
26b84e29c7
commit
94f45e0d00
8 changed files with 15 additions and 122 deletions
|
@ -131,7 +131,6 @@
|
||||||
39FF05FA285985DD00A86670 /* SettingsAboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39FF05F9285985DD00A86670 /* SettingsAboutView.swift */; };
|
39FF05FA285985DD00A86670 /* SettingsAboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39FF05F9285985DD00A86670 /* SettingsAboutView.swift */; };
|
||||||
573A23622A28711C00EC9470 /* Architecture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 573A23612A28711C00EC9470 /* Architecture.swift */; };
|
573A23622A28711C00EC9470 /* Architecture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 573A23612A28711C00EC9470 /* Architecture.swift */; };
|
||||||
573A23642A28791F00EC9470 /* Scene+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 573A23632A28791F00EC9470 /* Scene+Extension.swift */; };
|
573A23642A28791F00EC9470 /* Scene+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 573A23632A28791F00EC9470 /* Scene+Extension.swift */; };
|
||||||
575812B72A372D7200425BAF /* CapsuleButtonStyleType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812B62A372D7200425BAF /* CapsuleButtonStyleType.swift */; };
|
|
||||||
575812BA2A373A4F00425BAF /* FirmwareAlertType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812B92A373A4F00425BAF /* FirmwareAlertType.swift */; };
|
575812BA2A373A4F00425BAF /* FirmwareAlertType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812B92A373A4F00425BAF /* FirmwareAlertType.swift */; };
|
||||||
575812BC2A37406300425BAF /* ListRowDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812BB2A37406300425BAF /* ListRowDetail.swift */; };
|
575812BC2A37406300425BAF /* ListRowDetail.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812BB2A37406300425BAF /* ListRowDetail.swift */; };
|
||||||
575812BE2A3743E300425BAF /* InstallerSheetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812BD2A3743E300425BAF /* InstallerSheetType.swift */; };
|
575812BE2A3743E300425BAF /* InstallerSheetType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812BD2A3743E300425BAF /* InstallerSheetType.swift */; };
|
||||||
|
@ -140,9 +139,7 @@
|
||||||
575812C42A3821A900425BAF /* InstallerVolumeSelectionInformationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812C32A3821A900425BAF /* InstallerVolumeSelectionInformationView.swift */; };
|
575812C42A3821A900425BAF /* InstallerVolumeSelectionInformationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812C32A3821A900425BAF /* InstallerVolumeSelectionInformationView.swift */; };
|
||||||
575812C62A38296A00425BAF /* InstallerVolumeSelectionPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812C52A38296A00425BAF /* InstallerVolumeSelectionPickerView.swift */; };
|
575812C62A38296A00425BAF /* InstallerVolumeSelectionPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 575812C52A38296A00425BAF /* InstallerVolumeSelectionPickerView.swift */; };
|
||||||
5795700B2A31B06F004C7051 /* ButtonStyle+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5795700A2A31B06F004C7051 /* ButtonStyle+Extension.swift */; };
|
5795700B2A31B06F004C7051 /* ButtonStyle+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5795700A2A31B06F004C7051 /* ButtonStyle+Extension.swift */; };
|
||||||
5795700D2A31B081004C7051 /* CapsuleButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5795700C2A31B081004C7051 /* CapsuleButtonStyle.swift */; };
|
5795700D2A31B081004C7051 /* MistActionButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5795700C2A31B081004C7051 /* MistActionButtonStyle.swift */; };
|
||||||
57CF961A2A34B65C008D3B1C /* CapsuleLeading.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57CF96192A34B65C008D3B1C /* CapsuleLeading.swift */; };
|
|
||||||
57CF961C2A34B9E0008D3B1C /* CapsuleTrailing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57CF961B2A34B9E0008D3B1C /* CapsuleTrailing.swift */; };
|
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
@ -284,7 +281,6 @@
|
||||||
39FF05F9285985DD00A86670 /* SettingsAboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsAboutView.swift; sourceTree = "<group>"; };
|
39FF05F9285985DD00A86670 /* SettingsAboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsAboutView.swift; sourceTree = "<group>"; };
|
||||||
573A23612A28711C00EC9470 /* Architecture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Architecture.swift; sourceTree = "<group>"; };
|
573A23612A28711C00EC9470 /* Architecture.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Architecture.swift; sourceTree = "<group>"; };
|
||||||
573A23632A28791F00EC9470 /* Scene+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Scene+Extension.swift"; sourceTree = "<group>"; };
|
573A23632A28791F00EC9470 /* Scene+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Scene+Extension.swift"; sourceTree = "<group>"; };
|
||||||
575812B62A372D7200425BAF /* CapsuleButtonStyleType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CapsuleButtonStyleType.swift; sourceTree = "<group>"; };
|
|
||||||
575812B92A373A4F00425BAF /* FirmwareAlertType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirmwareAlertType.swift; sourceTree = "<group>"; };
|
575812B92A373A4F00425BAF /* FirmwareAlertType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirmwareAlertType.swift; sourceTree = "<group>"; };
|
||||||
575812BB2A37406300425BAF /* ListRowDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListRowDetail.swift; sourceTree = "<group>"; };
|
575812BB2A37406300425BAF /* ListRowDetail.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListRowDetail.swift; sourceTree = "<group>"; };
|
||||||
575812BD2A3743E300425BAF /* InstallerSheetType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstallerSheetType.swift; sourceTree = "<group>"; };
|
575812BD2A3743E300425BAF /* InstallerSheetType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstallerSheetType.swift; sourceTree = "<group>"; };
|
||||||
|
@ -293,9 +289,7 @@
|
||||||
575812C32A3821A900425BAF /* InstallerVolumeSelectionInformationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstallerVolumeSelectionInformationView.swift; sourceTree = "<group>"; };
|
575812C32A3821A900425BAF /* InstallerVolumeSelectionInformationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstallerVolumeSelectionInformationView.swift; sourceTree = "<group>"; };
|
||||||
575812C52A38296A00425BAF /* InstallerVolumeSelectionPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstallerVolumeSelectionPickerView.swift; sourceTree = "<group>"; };
|
575812C52A38296A00425BAF /* InstallerVolumeSelectionPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstallerVolumeSelectionPickerView.swift; sourceTree = "<group>"; };
|
||||||
5795700A2A31B06F004C7051 /* ButtonStyle+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ButtonStyle+Extension.swift"; sourceTree = "<group>"; };
|
5795700A2A31B06F004C7051 /* ButtonStyle+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ButtonStyle+Extension.swift"; sourceTree = "<group>"; };
|
||||||
5795700C2A31B081004C7051 /* CapsuleButtonStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CapsuleButtonStyle.swift; sourceTree = "<group>"; };
|
5795700C2A31B081004C7051 /* MistActionButtonStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MistActionButtonStyle.swift; sourceTree = "<group>"; };
|
||||||
57CF96192A34B65C008D3B1C /* CapsuleLeading.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CapsuleLeading.swift; sourceTree = "<group>"; };
|
|
||||||
57CF961B2A34B9E0008D3B1C /* CapsuleTrailing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CapsuleTrailing.swift; sourceTree = "<group>"; };
|
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
@ -534,10 +528,10 @@
|
||||||
39FF05F12859849200A86670 /* Components */ = {
|
39FF05F12859849200A86670 /* Components */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
575812B82A37330200425BAF /* Capsule */,
|
|
||||||
39252AA2285C3CC400956C74 /* CodesigningPickerView.swift */,
|
39252AA2285C3CC400956C74 /* CodesigningPickerView.swift */,
|
||||||
39252AA4285C463A00956C74 /* DynamicTextView.swift */,
|
39252AA4285C463A00956C74 /* DynamicTextView.swift */,
|
||||||
39252A86285ACE9C00956C74 /* FooterText.swift */,
|
39252A86285ACE9C00956C74 /* FooterText.swift */,
|
||||||
|
5795700C2A31B081004C7051 /* MistActionButtonStyle.swift */,
|
||||||
39252AA0285C2A1600956C74 /* PaddedDivider.swift */,
|
39252AA0285C2A1600956C74 /* PaddedDivider.swift */,
|
||||||
39148CFB28DD55B300011FF5 /* PathControl.swift */,
|
39148CFB28DD55B300011FF5 /* PathControl.swift */,
|
||||||
39252A84285ACDC800956C74 /* ResetToDefaultButton.swift */,
|
39252A84285ACDC800956C74 /* ResetToDefaultButton.swift */,
|
||||||
|
@ -572,17 +566,6 @@
|
||||||
path = Settings;
|
path = Settings;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
575812B82A37330200425BAF /* Capsule */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
57CF96192A34B65C008D3B1C /* CapsuleLeading.swift */,
|
|
||||||
5795700C2A31B081004C7051 /* CapsuleButtonStyle.swift */,
|
|
||||||
575812B62A372D7200425BAF /* CapsuleButtonStyleType.swift */,
|
|
||||||
57CF961B2A34B9E0008D3B1C /* CapsuleTrailing.swift */,
|
|
||||||
);
|
|
||||||
path = Capsule;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
|
@ -799,7 +782,7 @@
|
||||||
398734CE28603D7F00B4C357 /* Chunk.swift in Sources */,
|
398734CE28603D7F00B4C357 /* Chunk.swift in Sources */,
|
||||||
3935F4A2286ACD4D00760AB0 /* InstallerExportViewItem.swift in Sources */,
|
3935F4A2286ACD4D00760AB0 /* InstallerExportViewItem.swift in Sources */,
|
||||||
393F35C228641E1F005B7165 /* HeaderView.swift in Sources */,
|
393F35C228641E1F005B7165 /* HeaderView.swift in Sources */,
|
||||||
5795700D2A31B081004C7051 /* CapsuleButtonStyle.swift in Sources */,
|
5795700D2A31B081004C7051 /* MistActionButtonStyle.swift in Sources */,
|
||||||
3935F4CD286C6A5D00760AB0 /* ProcessKiller.swift in Sources */,
|
3935F4CD286C6A5D00760AB0 /* ProcessKiller.swift in Sources */,
|
||||||
390451BF2856E34700E0B563 /* String+Extension.swift in Sources */,
|
390451BF2856E34700E0B563 /* String+Extension.swift in Sources */,
|
||||||
39CF56242861CA85006FB5D2 /* DiskImageUnmounter.swift in Sources */,
|
39CF56242861CA85006FB5D2 /* DiskImageUnmounter.swift in Sources */,
|
||||||
|
@ -826,7 +809,6 @@
|
||||||
39252ABB285C7D3800956C74 /* SettingsInstallersCatalogsView.swift in Sources */,
|
39252ABB285C7D3800956C74 /* SettingsInstallersCatalogsView.swift in Sources */,
|
||||||
393D8029286EB4D6008AA8E3 /* EmptyCollectionView.swift in Sources */,
|
393D8029286EB4D6008AA8E3 /* EmptyCollectionView.swift in Sources */,
|
||||||
3935F490286976D000760AB0 /* ProgressAlertType.swift in Sources */,
|
3935F490286976D000760AB0 /* ProgressAlertType.swift in Sources */,
|
||||||
575812B72A372D7200425BAF /* CapsuleButtonStyleType.swift in Sources */,
|
|
||||||
39FF05F62859850F00A86670 /* SettingsFirmwaresView.swift in Sources */,
|
39FF05F62859850F00A86670 /* SettingsFirmwaresView.swift in Sources */,
|
||||||
3935F4A6286AD3E100760AB0 /* ActivityHeaderView.swift in Sources */,
|
3935F4A6286AD3E100760AB0 /* ActivityHeaderView.swift in Sources */,
|
||||||
3935F480286551FB00760AB0 /* Double+Extension.swift in Sources */,
|
3935F480286551FB00760AB0 /* Double+Extension.swift in Sources */,
|
||||||
|
@ -863,7 +845,6 @@
|
||||||
39148CFC28DD55B300011FF5 /* PathControl.swift in Sources */,
|
39148CFC28DD55B300011FF5 /* PathControl.swift in Sources */,
|
||||||
3935F4892866C68000760AB0 /* ActivitySectionHeaderView.swift in Sources */,
|
3935F4892866C68000760AB0 /* ActivitySectionHeaderView.swift in Sources */,
|
||||||
39252AB5285C706000956C74 /* URL+Extension.swift in Sources */,
|
39252AB5285C706000956C74 /* URL+Extension.swift in Sources */,
|
||||||
57CF961C2A34B9E0008D3B1C /* CapsuleTrailing.swift in Sources */,
|
|
||||||
390451D828573A2500E0B563 /* ExportListView.swift in Sources */,
|
390451D828573A2500E0B563 /* ExportListView.swift in Sources */,
|
||||||
39FF05EE2859820900A86670 /* AppCommands.swift in Sources */,
|
39FF05EE2859820900A86670 /* AppCommands.swift in Sources */,
|
||||||
39252AA3285C3CC400956C74 /* CodesigningPickerView.swift in Sources */,
|
39252AA3285C3CC400956C74 /* CodesigningPickerView.swift in Sources */,
|
||||||
|
@ -871,7 +852,6 @@
|
||||||
575812C02A37493F00425BAF /* InstallerVolumeSelectionView.swift in Sources */,
|
575812C02A37493F00425BAF /* InstallerVolumeSelectionView.swift in Sources */,
|
||||||
390451C22856E3F500E0B563 /* Hardware.swift in Sources */,
|
390451C22856E3F500E0B563 /* Hardware.swift in Sources */,
|
||||||
39CF56092861AE7F006FB5D2 /* HelperToolCommandRequest.swift in Sources */,
|
39CF56092861AE7F006FB5D2 /* HelperToolCommandRequest.swift in Sources */,
|
||||||
57CF961A2A34B65C008D3B1C /* CapsuleLeading.swift in Sources */,
|
|
||||||
390451C82856E94900E0B563 /* ListRowFirmware.swift in Sources */,
|
390451C82856E94900E0B563 /* ListRowFirmware.swift in Sources */,
|
||||||
390451E528574F0000E0B563 /* CatalogType.swift in Sources */,
|
390451E528574F0000E0B563 /* CatalogType.swift in Sources */,
|
||||||
3935F4852866B64900760AB0 /* MistTaskSection.swift in Sources */,
|
3935F4852866B64900760AB0 /* MistTaskSection.swift in Sources */,
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
extension ButtonStyle where Self == CapsuleButtonStyle {
|
extension ButtonStyle where Self == MistActionButtonStyle {
|
||||||
|
|
||||||
static func capsule(_ type: CapsuleButtonStyleType) -> Self {
|
static var mistAction: Self {
|
||||||
.init(type: type)
|
.init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
//
|
|
||||||
// CapsuleButtonStyleType.swift
|
|
||||||
// Mist
|
|
||||||
//
|
|
||||||
// Created by Nindi Gill on 12/6/2023.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
/// Capsule Button Style Type
|
|
||||||
enum CapsuleButtonStyleType {
|
|
||||||
/// Standard capsule with both leading and trailing edges curved
|
|
||||||
case standard
|
|
||||||
/// Capsule with leading edge curved only
|
|
||||||
case leading
|
|
||||||
/// Capsule with trailing edge curved only
|
|
||||||
case trailing
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
//
|
|
||||||
// CapsuleLeading.swift
|
|
||||||
// Mist
|
|
||||||
//
|
|
||||||
// Created by Nindi Gill on 10/6/2023.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct CapsuleLeading: Shape {
|
|
||||||
|
|
||||||
func path(in rect: CGRect) -> Path {
|
|
||||||
var path: Path = Path()
|
|
||||||
path.move(to: CGPoint(x: rect.maxX, y: rect.minY))
|
|
||||||
path.addLine(to: CGPoint(x: rect.maxX, y: rect.maxY))
|
|
||||||
path.addLine(to: CGPoint(x: rect.height / 2, y: rect.maxY))
|
|
||||||
path.addArc(
|
|
||||||
center: CGPoint(x: rect.height / 2, y: rect.midY),
|
|
||||||
radius: rect.height / 2,
|
|
||||||
startAngle: .degrees(270),
|
|
||||||
endAngle: .degrees(90),
|
|
||||||
clockwise: true
|
|
||||||
)
|
|
||||||
path.addLine(to: CGPoint(x: rect.height / 2, y: rect.minY))
|
|
||||||
path.addLine(to: CGPoint(x: rect.maxX, y: rect.minY))
|
|
||||||
path.closeSubpath()
|
|
||||||
return path
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
//
|
|
||||||
// CapsuleTrailing.swift
|
|
||||||
// Mist
|
|
||||||
//
|
|
||||||
// Created by Nindi Gill on 11/6/2023.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct CapsuleTrailing: Shape {
|
|
||||||
|
|
||||||
func path(in rect: CGRect) -> Path {
|
|
||||||
var path: Path = Path()
|
|
||||||
path.move(to: CGPoint(x: rect.minX, y: rect.minY))
|
|
||||||
path.addLine(to: CGPoint(x: rect.maxX - rect.height / 2, y: rect.minY))
|
|
||||||
path.addArc(
|
|
||||||
center: CGPoint(x: rect.maxX - rect.height / 2, y: rect.midY),
|
|
||||||
radius: rect.height / 2,
|
|
||||||
startAngle: .degrees(90),
|
|
||||||
endAngle: .degrees(270),
|
|
||||||
clockwise: true
|
|
||||||
)
|
|
||||||
path.addLine(to: CGPoint(x: rect.maxX - rect.height / 2, y: rect.maxY))
|
|
||||||
path.addLine(to: CGPoint(x: rect.minX, y: rect.maxY))
|
|
||||||
path.addLine(to: CGPoint(x: rect.minX, y: rect.minY))
|
|
||||||
path.closeSubpath()
|
|
||||||
return path
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// CapsuleButtonStyle.swift
|
// MistActionButtonStyle.swift
|
||||||
// Mist
|
// Mist
|
||||||
//
|
//
|
||||||
// Created by Nindi Gill on 5/6/2023.
|
// Created by Nindi Gill on 5/6/2023.
|
||||||
|
@ -7,28 +7,15 @@
|
||||||
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct CapsuleButtonStyle: ButtonStyle {
|
struct MistActionButtonStyle: ButtonStyle {
|
||||||
|
|
||||||
let type: CapsuleButtonStyleType
|
|
||||||
private let padding: CGFloat = 5
|
private let padding: CGFloat = 5
|
||||||
|
|
||||||
@ViewBuilder
|
|
||||||
func makeBody(configuration: Configuration) -> some View {
|
func makeBody(configuration: Configuration) -> some View {
|
||||||
|
configuration.label
|
||||||
let view: some View = configuration.label
|
|
||||||
.font(.body.bold())
|
.font(.body.bold())
|
||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
.padding(.vertical, padding)
|
.padding(.vertical, padding)
|
||||||
.foregroundColor(.white)
|
.foregroundColor(.white)
|
||||||
.background(Color.accentColor.brightness(configuration.isPressed ? -0.5 : 0))
|
.background(Color.accentColor.brightness(configuration.isPressed ? -0.5 : 0))
|
||||||
|
|
||||||
switch type {
|
|
||||||
case .standard:
|
|
||||||
view.clipShape(Capsule())
|
|
||||||
case .leading:
|
|
||||||
view.clipShape(CapsuleLeading())
|
|
||||||
case .trailing:
|
|
||||||
view.clipShape(CapsuleTrailing())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -53,7 +53,8 @@ struct ListRowFirmware: View {
|
||||||
.font(.body.bold())
|
.font(.body.bold())
|
||||||
}
|
}
|
||||||
.help("Download macOS Firmware")
|
.help("Download macOS Firmware")
|
||||||
.buttonStyle(.capsule(.standard))
|
.buttonStyle(.mistAction)
|
||||||
|
.clipShape(Capsule())
|
||||||
.padding(.trailing, padding)
|
.padding(.trailing, padding)
|
||||||
}
|
}
|
||||||
.alert(isPresented: $showAlert) {
|
.alert(isPresented: $showAlert) {
|
||||||
|
|
|
@ -83,7 +83,7 @@ struct ListRowInstaller: View {
|
||||||
.font(.body.bold())
|
.font(.body.bold())
|
||||||
}
|
}
|
||||||
.help("Download and export macOS Installer")
|
.help("Download and export macOS Installer")
|
||||||
.buttonStyle(.capsule(.leading))
|
.buttonStyle(.mistAction)
|
||||||
Button {
|
Button {
|
||||||
sheetType = .volumeSelection
|
sheetType = .volumeSelection
|
||||||
if installer.compatible { Task { validate() } } else { showCompatibilityWarning() }
|
if installer.compatible { Task { validate() } } else { showCompatibilityWarning() }
|
||||||
|
@ -93,8 +93,9 @@ struct ListRowInstaller: View {
|
||||||
.padding(.vertical, 1)
|
.padding(.vertical, 1)
|
||||||
}
|
}
|
||||||
.help("Create bootable macOS Installer")
|
.help("Create bootable macOS Installer")
|
||||||
.buttonStyle(.capsule(.trailing))
|
.buttonStyle(.mistAction)
|
||||||
}
|
}
|
||||||
|
.clipShape(Capsule())
|
||||||
}
|
}
|
||||||
.alert(isPresented: $showAlert) {
|
.alert(isPresented: $showAlert) {
|
||||||
switch alertType {
|
switch alertType {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue