diff --git a/OpenHABCore/Sources/OpenHABCore/Util/UIColorExtension.swift b/OpenHABCore/Sources/OpenHABCore/Util/UIColorExtension.swift index 3e5a76c5..cef98fc5 100644 --- a/OpenHABCore/Sources/OpenHABCore/Util/UIColorExtension.swift +++ b/OpenHABCore/Sources/OpenHABCore/Util/UIColorExtension.swift @@ -80,10 +80,6 @@ public extension UIColor { return .white } - class var ohHightlightStrokeColor: UIColor { - OHInterfaceStyle.current == .light ? .black : .white - } - // standard colors class var ohMaroon: UIColor { OHInterfaceStyle.current == .light ? UIColor(hex: "#800000") : UIColor(hex: "#800000") diff --git a/openHAB.xcodeproj/project.pbxproj b/openHAB.xcodeproj/project.pbxproj index f681e12c..c7b20a77 100644 --- a/openHAB.xcodeproj/project.pbxproj +++ b/openHAB.xcodeproj/project.pbxproj @@ -8,8 +8,6 @@ /* Begin PBXBuildFile section */ 1224F78F228A89FD00750965 /* WatchMessageService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1224F78D228A89FC00750965 /* WatchMessageService.swift */; }; - 286F556F22EA062700AECC5C /* DynamicButtonStyleBell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 286F556E22EA062700AECC5C /* DynamicButtonStyleBell.swift */; }; - 286F557122EA3D4E00AECC5C /* DynamicButtonStyleGear.swift in Sources */ = {isa = PBXBuildFile; fileRef = 286F557022EA3D4E00AECC5C /* DynamicButtonStyleGear.swift */; }; 4D6470DA2561F935007B03FC /* openHABIntents.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 4D6470D32561F935007B03FC /* openHABIntents.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 653B54C0285C0AC700298ECD /* OpenHABRootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653B54BF285C0AC700298ECD /* OpenHABRootViewController.swift */; }; 653B54C2285E714900298ECD /* OpenHABViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 653B54C1285E714900298ECD /* OpenHABViewController.swift */; }; @@ -67,7 +65,6 @@ 93F8063527AE6C620035A6B0 /* FirebaseCrashlytics in Frameworks */ = {isa = PBXBuildFile; productRef = 93F8063427AE6C620035A6B0 /* FirebaseCrashlytics */; }; 93F8064727AE7A050035A6B0 /* SwiftMessages in Frameworks */ = {isa = PBXBuildFile; productRef = 93F8064627AE7A050035A6B0 /* SwiftMessages */; }; 93F8064A27AE7A2E0035A6B0 /* FlexColorPicker in Frameworks */ = {isa = PBXBuildFile; productRef = 93F8064927AE7A2E0035A6B0 /* FlexColorPicker */; }; - 93F8064D27AE7A4D0035A6B0 /* DynamicButton in Frameworks */ = {isa = PBXBuildFile; productRef = 93F8064C27AE7A4D0035A6B0 /* DynamicButton */; }; 93F8065027AE7A830035A6B0 /* SideMenu in Frameworks */ = {isa = PBXBuildFile; productRef = 93F8064F27AE7A830035A6B0 /* SideMenu */; }; 93F8065327AE7B580035A6B0 /* SVGKit in Frameworks */ = {isa = PBXBuildFile; productRef = 93F8065227AE7B580035A6B0 /* SVGKit */; }; A07ED02E2402EE6E006588FE /* OpenHABWatchTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = A07ED02D2402EE6E006588FE /* OpenHABWatchTracker.swift */; }; @@ -95,6 +92,8 @@ DA2E0AA423DC96E9009B0A99 /* EncircledIconWithAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA2E0AA323DC96E9009B0A99 /* EncircledIconWithAction.swift */; }; DA2E0B0E23DCC153009B0A99 /* MapView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA2E0B0D23DCC152009B0A99 /* MapView.swift */; }; DA2E0B1023DCC439009B0A99 /* MapViewRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA2E0B0F23DCC439009B0A99 /* MapViewRow.swift */; }; + DA3B75AE2C59741800E219AB /* SFSafeSymbols in Frameworks */ = {isa = PBXBuildFile; productRef = DA3B75AD2C59741800E219AB /* SFSafeSymbols */; }; + DA3B75B02C59742A00E219AB /* SFSafeSymbols in Frameworks */ = {isa = PBXBuildFile; productRef = DA3B75AF2C59742A00E219AB /* SFSafeSymbols */; }; DA4D4DB5233F9ACB00B37E37 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = DA4D4DB4233F9ACB00B37E37 /* README.md */; }; DA50C7BD2B0A51BD0009F716 /* SliderWithSwitchSupportRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA50C7BC2B0A51BD0009F716 /* SliderWithSwitchSupportRow.swift */; }; DA50C7BF2B0A65300009F716 /* SliderWithSwitchSupportUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA50C7BE2B0A652F0009F716 /* SliderWithSwitchSupportUITableViewCell.swift */; }; @@ -123,6 +122,9 @@ DAEAA89B21E2611000267EA3 /* OpenHABNotificationsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAEAA89A21E2611000267EA3 /* OpenHABNotificationsViewController.swift */; }; DAEAA89D21E6B06400267EA3 /* ReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAEAA89C21E6B06300267EA3 /* ReusableView.swift */; }; DAEAA89F21E6B16600267EA3 /* UITableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAEAA89E21E6B16600267EA3 /* UITableView.swift */; }; + DAF0A28B2C56E3A300A14A6A /* RollershutterCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF0A28A2C56E3A300A14A6A /* RollershutterCell.swift */; }; + DAF0A28D2C56EF8900A14A6A /* SetpointCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF0A28C2C56EF8900A14A6A /* SetpointCell.swift */; }; + DAF0A28F2C56F1EE00A14A6A /* ColorPickerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF0A28E2C56F1EE00A14A6A /* ColorPickerCell.swift */; }; DAF231D227BB6EEA00AB916C /* OpenHABSVGTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF231D127BB6EEA00AB916C /* OpenHABSVGTests.swift */; }; DAF231D827BB702500AB916C /* valid_xmlns.svg in Resources */ = {isa = PBXBuildFile; fileRef = DAF231D527BB702400AB916C /* valid_xmlns.svg */; }; DAF231D927BB702500AB916C /* invalid_xmlns.svg in Resources */ = {isa = PBXBuildFile; fileRef = DAF231D627BB702500AB916C /* invalid_xmlns.svg */; }; @@ -142,7 +144,6 @@ DAF4581E23DC60020018B495 /* ImageRawRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF4581D23DC60020018B495 /* ImageRawRow.swift */; }; DAF4F6C0222734D300C24876 /* NewImageUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAF4F6BF222734D200C24876 /* NewImageUITableViewCell.swift */; }; DF05EF121D00696200DD646D /* DrawerUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF05EF111D00696200DD646D /* DrawerUITableViewCell.swift */; }; - DF05FF2018965B5400FF2F9B /* RollershutterUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF05FF1F18965B5400FF2F9B /* RollershutterUITableViewCell.swift */; }; DF05FF231896BD2D00FF2F9B /* SelectionUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF05FF221896BD2D00FF2F9B /* SelectionUITableViewCell.swift */; }; DF06F1F618FE7A160011E7B9 /* OpenHABSelectionCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF06F1F518FE7A160011E7B9 /* OpenHABSelectionCollectionViewController.swift */; }; DF06F1F918FEA8420011E7B9 /* ColorPickerUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF06F1F818FEA8420011E7B9 /* ColorPickerUITableViewCell.swift */; }; @@ -155,7 +156,6 @@ DF4B84131886DAC400F34902 /* FrameUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4B84121886DAC400F34902 /* FrameUITableViewCell.swift */; }; DF4B84161886EACA00F34902 /* GenericUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF4B84151886EACA00F34902 /* GenericUITableViewCell.swift */; }; DFA13CB418872EBD006355C3 /* SwitchUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFA13CB318872EBD006355C3 /* SwitchUITableViewCell.swift */; }; - DFA16EB818883CF300EDB0BB /* SetpointUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFA16EB718883CF300EDB0BB /* SetpointUITableViewCell.swift */; }; DFA16EBB18883DE500EDB0BB /* SliderUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFA16EBA18883DE500EDB0BB /* SliderUITableViewCell.swift */; }; DFA16EC118898A8400EDB0BB /* SegmentedUITableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFA16EC018898A8400EDB0BB /* SegmentedUITableViewCell.swift */; }; DFB2622B18830A3600D3244D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DFB2622A18830A3600D3244D /* Foundation.framework */; }; @@ -258,8 +258,6 @@ /* Begin PBXFileReference section */ 1224F78D228A89FC00750965 /* WatchMessageService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WatchMessageService.swift; sourceTree = ""; }; - 286F556E22EA062700AECC5C /* DynamicButtonStyleBell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicButtonStyleBell.swift; sourceTree = ""; }; - 286F557022EA3D4E00AECC5C /* DynamicButtonStyleGear.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DynamicButtonStyleGear.swift; sourceTree = ""; }; 4D38D951256897490039DA6E /* SetNumberValueIntentHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetNumberValueIntentHandler.swift; sourceTree = ""; }; 4D38D959256897770039DA6E /* SetStringValueIntentHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetStringValueIntentHandler.swift; sourceTree = ""; }; 4D38D9612568978E0039DA6E /* SetColorValueIntentHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetColorValueIntentHandler.swift; sourceTree = ""; }; @@ -421,6 +419,9 @@ DAEAA89A21E2611000267EA3 /* OpenHABNotificationsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenHABNotificationsViewController.swift; sourceTree = ""; }; DAEAA89C21E6B06300267EA3 /* ReusableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReusableView.swift; sourceTree = ""; }; DAEAA89E21E6B16600267EA3 /* UITableView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITableView.swift; sourceTree = ""; }; + DAF0A28A2C56E3A300A14A6A /* RollershutterCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RollershutterCell.swift; sourceTree = ""; }; + DAF0A28C2C56EF8900A14A6A /* SetpointCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetpointCell.swift; sourceTree = ""; }; + DAF0A28E2C56F1EE00A14A6A /* ColorPickerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorPickerCell.swift; sourceTree = ""; }; DAF231D127BB6EEA00AB916C /* OpenHABSVGTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenHABSVGTests.swift; sourceTree = ""; }; DAF231D527BB702400AB916C /* valid_xmlns.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = valid_xmlns.svg; sourceTree = ""; }; DAF231D627BB702500AB916C /* invalid_xmlns.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = invalid_xmlns.svg; sourceTree = ""; }; @@ -438,7 +439,6 @@ DAF4581D23DC60020018B495 /* ImageRawRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageRawRow.swift; sourceTree = ""; }; DAF4F6BF222734D200C24876 /* NewImageUITableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewImageUITableViewCell.swift; sourceTree = ""; }; DF05EF111D00696200DD646D /* DrawerUITableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DrawerUITableViewCell.swift; sourceTree = ""; }; - DF05FF1F18965B5400FF2F9B /* RollershutterUITableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RollershutterUITableViewCell.swift; sourceTree = ""; }; DF05FF221896BD2D00FF2F9B /* SelectionUITableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SelectionUITableViewCell.swift; sourceTree = ""; }; DF06F1F518FE7A160011E7B9 /* OpenHABSelectionCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenHABSelectionCollectionViewController.swift; sourceTree = ""; }; DF06F1F818FEA8420011E7B9 /* ColorPickerUITableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorPickerUITableViewCell.swift; sourceTree = ""; }; @@ -451,7 +451,6 @@ DF4B84121886DAC400F34902 /* FrameUITableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FrameUITableViewCell.swift; sourceTree = ""; }; DF4B84151886EACA00F34902 /* GenericUITableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GenericUITableViewCell.swift; sourceTree = ""; }; DFA13CB318872EBD006355C3 /* SwitchUITableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwitchUITableViewCell.swift; sourceTree = ""; }; - DFA16EB718883CF300EDB0BB /* SetpointUITableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SetpointUITableViewCell.swift; sourceTree = ""; }; DFA16EBA18883DE500EDB0BB /* SliderUITableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SliderUITableViewCell.swift; sourceTree = ""; }; DFA16EC018898A8400EDB0BB /* SegmentedUITableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SegmentedUITableViewCell.swift; sourceTree = ""; }; DFB2622718830A3600D3244D /* openHAB.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = openHAB.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -480,6 +479,7 @@ 934E592728F16EBA00162004 /* Kingfisher in Frameworks */, 937E4473270B36DD00A98C26 /* OpenHABCore in Frameworks */, 934E592B28F16EBA00162004 /* Alamofire in Frameworks */, + DA3B75B02C59742A00E219AB /* SFSafeSymbols in Frameworks */, 934E592528F16EBA00162004 /* OpenHABCore in Frameworks */, 93F8062F27AE63620035A6B0 /* Alamofire in Frameworks */, 937E448E270B37D200A98C26 /* DeviceKit in Frameworks */, @@ -538,7 +538,7 @@ DFB2622D18830A3600D3244D /* CoreGraphics.framework in Frameworks */, 93F8063527AE6C620035A6B0 /* FirebaseCrashlytics in Frameworks */, 937E4488270B37A600A98C26 /* Kingfisher in Frameworks */, - 93F8064D27AE7A4D0035A6B0 /* DynamicButton in Frameworks */, + DA3B75AE2C59741800E219AB /* SFSafeSymbols in Frameworks */, 937E4471270B36D000A98C26 /* OpenHABCore in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -879,17 +879,17 @@ DF4B84101886DA9900F34902 /* Widgets */ = { isa = PBXGroup; children = ( - DF06F1F818FEA8420011E7B9 /* ColorPickerUITableViewCell.swift */, + DAF0A28E2C56F1EE00A14A6A /* ColorPickerCell.swift */, DF06F1FB18FEC2020011E7B9 /* ColorPickerViewController.swift */, DF4B84121886DAC400F34902 /* FrameUITableViewCell.swift */, DF4B84151886EACA00F34902 /* GenericUITableViewCell.swift */, DAF4F6BF222734D200C24876 /* NewImageUITableViewCell.swift */, B7D5ECE021499E55001B0EC6 /* MapViewTableViewCell.swift */, DAA42BA721DC97DF00244B2A /* NotificationTableViewCell.swift */, - DF05FF1F18965B5400FF2F9B /* RollershutterUITableViewCell.swift */, + DAF0A28A2C56E3A300A14A6A /* RollershutterCell.swift */, DFA16EC018898A8400EDB0BB /* SegmentedUITableViewCell.swift */, DF05FF221896BD2D00FF2F9B /* SelectionUITableViewCell.swift */, - DFA16EB718883CF300EDB0BB /* SetpointUITableViewCell.swift */, + DAF0A28C2C56EF8900A14A6A /* SetpointCell.swift */, DFA16EBA18883DE500EDB0BB /* SliderUITableViewCell.swift */, DA50C7BE2B0A652F0009F716 /* SliderWithSwitchSupportUITableViewCell.swift */, DFA13CB318872EBD006355C3 /* SwitchUITableViewCell.swift */, @@ -1005,8 +1005,6 @@ children = ( 938EDCE022C4FEB800661CA1 /* ScaleAspectFitImageView.swift */, DFFD8FD018EDBD4F003B502A /* UICircleButton.swift */, - 286F556E22EA062700AECC5C /* DynamicButtonStyleBell.swift */, - 286F557022EA3D4E00AECC5C /* DynamicButtonStyleGear.swift */, 938BF9C524EFCC0700E6B52F /* UILabel+Localization.swift */, 938BF9D224EFD0B700E6B52F /* UIViewController+Localization.swift */, 935B484525342B8E00E44CF0 /* URL+Static.swift */, @@ -1096,6 +1094,7 @@ 934E592628F16EBA00162004 /* Kingfisher */, 934E592828F16EBA00162004 /* DeviceKit */, 934E592A28F16EBA00162004 /* Alamofire */, + DA3B75AF2C59742A00E219AB /* SFSafeSymbols */, ); productName = openHABWatchSwift2; productReference = DA0775152346705D0086C685 /* openHABWatch.app */; @@ -1123,7 +1122,6 @@ isa = PBXNativeTarget; buildConfigurationList = DFB2625C18830A3600D3244D /* Build configuration list for PBXNativeTarget "openHAB" */; buildPhases = ( - 93685A772ADE69850077A9A6 /* Run Build Tools */, DFB2622318830A3600D3244D /* Sources */, DFB2622418830A3600D3244D /* Frameworks */, DFB2622518830A3600D3244D /* Resources */, @@ -1131,6 +1129,7 @@ 93F38C4C23803499001B1451 /* Embed Frameworks */, 4D6470DE2561F935007B03FC /* Embed Foundation Extensions */, 93F8063627AE76AF0035A6B0 /* Crashlytics Run Script */, + DAF0A2902C56FE9F00A14A6A /* Run Build Tools */, ); buildRules = ( ); @@ -1149,10 +1148,10 @@ 93F8063427AE6C620035A6B0 /* FirebaseCrashlytics */, 93F8064627AE7A050035A6B0 /* SwiftMessages */, 93F8064927AE7A2E0035A6B0 /* FlexColorPicker */, - 93F8064C27AE7A4D0035A6B0 /* DynamicButton */, 93F8064F27AE7A830035A6B0 /* SideMenu */, 93F8065227AE7B580035A6B0 /* SVGKit */, 6557AF912C039D140094D0C8 /* FirebaseMessaging */, + DA3B75AD2C59741800E219AB /* SFSafeSymbols */, ); productName = openHAB; productReference = DFB2622718830A3600D3244D /* openHAB.app */; @@ -1236,9 +1235,9 @@ 93F8063327AE6C620035A6B0 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */, 93F8064527AE7A050035A6B0 /* XCRemoteSwiftPackageReference "SwiftMessages" */, 93F8064827AE7A2E0035A6B0 /* XCRemoteSwiftPackageReference "FlexColorPicker" */, - 93F8064B27AE7A4D0035A6B0 /* XCRemoteSwiftPackageReference "DynamicButton" */, 93F8064E27AE7A820035A6B0 /* XCRemoteSwiftPackageReference "SideMenu" */, 93F8065127AE7B580035A6B0 /* XCRemoteSwiftPackageReference "SVGKit" */, + DA3B75AC2C59729200E219AB /* XCRemoteSwiftPackageReference "SFSafeSymbols" */, ); productRefGroup = DFB2622818830A3600D3244D /* Products */; projectDirPath = ""; @@ -1326,7 +1325,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 93685A772ADE69850077A9A6 /* Run Build Tools */ = { + 93F8063627AE76AF0035A6B0 /* Crashlytics Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -1336,18 +1335,17 @@ ); inputPaths = ( ); - name = "Run Build Tools"; + name = "Crashlytics Run Script"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd BuildTools\nSDKROOT=(xcrun --sdk macosx --show-sdk-path)\n\nswift package plugin --allow-writing-to-package-directory --allow-writing-to-directory \"$SRCROOT\" swiftformat \"$SRCROOT\" --config ./.swiftformat --cache /private/tmp/\nswift package plugin --allow-writing-to-package-directory --allow-writing-to-directory ../ swiftlint --cache-path /private/tmp/\n"; + shellScript = "${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\n"; }; - 93F8063627AE76AF0035A6B0 /* Crashlytics Run Script */ = { + DAF0A2902C56FE9F00A14A6A /* Run Build Tools */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -1355,14 +1353,14 @@ ); inputPaths = ( ); - name = "Crashlytics Run Script"; + name = "Run Build Tools"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "${BUILD_DIR%Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run\n"; + shellScript = "cd BuildTools\nSDKROOT=(xcrun --sdk macosx --show-sdk-path)\n\nswift package plugin --allow-writing-to-package-directory --allow-writing-to-directory \"$SRCROOT\" swiftformat \"$SRCROOT\" --config ./.swiftformat --cache /private/tmp/\nswift package plugin --allow-writing-to-package-directory --allow-writing-to-directory ../ swiftlint --cache-path /private/tmp/\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -1467,8 +1465,8 @@ 93B7B33128018301009EB296 /* Intents.intentdefinition in Sources */, DA7E1E4B2233986E002AEFD8 /* PlayerView.swift in Sources */, DA7E1E492230227E002AEFD8 /* OpenHABTracker.swift in Sources */, - DF06F1F918FEA8420011E7B9 /* ColorPickerUITableViewCell.swift in Sources */, 65570A7D2476D16A00D524EA /* OpenHABWebViewController.swift in Sources */, + DAF0A28B2C56E3A300A14A6A /* RollershutterCell.swift in Sources */, DF06F1FC18FEC2020011E7B9 /* ColorPickerViewController.swift in Sources */, 1224F78F228A89FD00750965 /* WatchMessageService.swift in Sources */, DAA42BAC21DC984A00244B2A /* WebUITableViewCell.swift in Sources */, @@ -1492,20 +1490,18 @@ 938BF9D324EFD0B700E6B52F /* UIViewController+Localization.swift in Sources */, DF06F1F618FE7A160011E7B9 /* OpenHABSelectionCollectionViewController.swift in Sources */, DAA42BA821DC97E000244B2A /* NotificationTableViewCell.swift in Sources */, + DAF0A28F2C56F1EE00A14A6A /* ColorPickerCell.swift in Sources */, 6595667E28E0BE8E00E8A53B /* MulticastDelegate.swift in Sources */, - 286F556F22EA062700AECC5C /* DynamicButtonStyleBell.swift in Sources */, DFDEE3FD18831099008B26AC /* OpenHABSettingsViewController.swift in Sources */, 938EDCE122C4FEB800661CA1 /* ScaleAspectFitImageView.swift in Sources */, DAEAA89F21E6B16600267EA3 /* UITableView.swift in Sources */, DABA07542B0F9E7A00708281 /* UICollectionViewCellRegistrationExtension.swift in Sources */, DFB2624418830A3600D3244D /* OpenHABSitemapViewController.swift in Sources */, - DF05FF2018965B5400FF2F9B /* RollershutterUITableViewCell.swift in Sources */, 653B54C2285E714900298ECD /* OpenHABViewController.swift in Sources */, - 286F557122EA3D4E00AECC5C /* DynamicButtonStyleGear.swift in Sources */, DFA16EC118898A8400EDB0BB /* SegmentedUITableViewCell.swift in Sources */, + DAF0A28D2C56EF8900A14A6A /* SetpointCell.swift in Sources */, DAEAA89D21E6B06400267EA3 /* ReusableView.swift in Sources */, DF05FF231896BD2D00FF2F9B /* SelectionUITableViewCell.swift in Sources */, - DFA16EB818883CF300EDB0BB /* SetpointUITableViewCell.swift in Sources */, DFA16EBB18883DE500EDB0BB /* SliderUITableViewCell.swift in Sources */, DFA13CB418872EBD006355C3 /* SwitchUITableViewCell.swift in Sources */, DFFD8FD118EDBD4F003B502A /* UICircleButton.swift in Sources */, @@ -1621,7 +1617,7 @@ CODE_SIGN_ENTITLEMENTS = openHABIntents/openHABIntents.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1635,7 +1631,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.openHABIntents; @@ -1664,7 +1660,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = PBAPXHRAM9; @@ -1678,7 +1674,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.openHABIntents; @@ -1705,7 +1701,7 @@ CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -1724,7 +1720,7 @@ "@executable_path/../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.NotificationService; @@ -1752,7 +1748,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = PBAPXHRAM9; @@ -1771,7 +1767,7 @@ "@executable_path/../../Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.NotificationService; @@ -1798,7 +1794,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1810,7 +1806,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openHABUITests; @@ -1845,7 +1841,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1857,7 +1853,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = es.spaphone.openHABUITests; @@ -1891,7 +1887,7 @@ CODE_SIGN_ENTITLEMENTS = "openHABWatch Extension/openHABWatch Extension.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = "compiler-default"; @@ -1902,7 +1898,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.watchkitapp; @@ -1937,7 +1933,7 @@ "CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; "DEVELOPMENT_TEAM[sdk=watchos*]" = PBAPXHRAM9; @@ -1949,7 +1945,7 @@ "@executable_path/Frameworks", "@executable_path/../../Frameworks", ); - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app.watchkitapp; @@ -1981,7 +1977,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -1993,7 +1989,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.reg-labs.openHABTestsSwift"; @@ -2025,7 +2021,7 @@ "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -2037,7 +2033,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "com.reg-labs.openHABTestsSwift"; @@ -2185,7 +2181,7 @@ CODE_SIGN_ENTITLEMENTS = openHAB/openHAB.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEVELOPMENT_TEAM = PBAPXHRAM9; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "openHAB/openHAB-Prefix.pch"; @@ -2201,7 +2197,7 @@ "@loader_path/../../Frameworks", ); LIBRARY_SEARCH_PATHS = "$(inherited)"; - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; OTHER_SWIFT_FLAGS = "$(inherited) -DDEBUG -Xfrontend -warn-long-expression-type-checking=200 -Xfrontend -warn-long-function-bodies=200"; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -2230,7 +2226,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 10; DEVELOPMENT_TEAM = PBAPXHRAM9; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = PBAPXHRAM9; GCC_PRECOMPILE_PREFIX_HEADER = YES; @@ -2247,7 +2243,7 @@ "@loader_path/../../Frameworks", ); LIBRARY_SEARCH_PATHS = "$(inherited)"; - MARKETING_VERSION = 3.0.3; + MARKETING_VERSION = 3.0.4; PRODUCT_BUNDLE_IDENTIFIER = org.openhab.app; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; @@ -2390,14 +2386,6 @@ minimumVersion = 1.0.0; }; }; - 93F8064B27AE7A4D0035A6B0 /* XCRemoteSwiftPackageReference "DynamicButton" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/yannickl/DynamicButton.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 6.0.0; - }; - }; 93F8064E27AE7A820035A6B0 /* XCRemoteSwiftPackageReference "SideMenu" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/jonkykong/SideMenu.git"; @@ -2414,6 +2402,14 @@ kind = branch; }; }; + DA3B75AC2C59729200E219AB /* XCRemoteSwiftPackageReference "SFSafeSymbols" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/SFSafeSymbols/SFSafeSymbols"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 5.3.0; + }; + }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ @@ -2512,11 +2508,6 @@ package = 93F8064827AE7A2E0035A6B0 /* XCRemoteSwiftPackageReference "FlexColorPicker" */; productName = FlexColorPicker; }; - 93F8064C27AE7A4D0035A6B0 /* DynamicButton */ = { - isa = XCSwiftPackageProductDependency; - package = 93F8064B27AE7A4D0035A6B0 /* XCRemoteSwiftPackageReference "DynamicButton" */; - productName = DynamicButton; - }; 93F8064F27AE7A830035A6B0 /* SideMenu */ = { isa = XCSwiftPackageProductDependency; package = 93F8064E27AE7A820035A6B0 /* XCRemoteSwiftPackageReference "SideMenu" */; @@ -2527,6 +2518,16 @@ package = 93F8065127AE7B580035A6B0 /* XCRemoteSwiftPackageReference "SVGKit" */; productName = SVGKit; }; + DA3B75AD2C59741800E219AB /* SFSafeSymbols */ = { + isa = XCSwiftPackageProductDependency; + package = DA3B75AC2C59729200E219AB /* XCRemoteSwiftPackageReference "SFSafeSymbols" */; + productName = SFSafeSymbols; + }; + DA3B75AF2C59742A00E219AB /* SFSafeSymbols */ = { + isa = XCSwiftPackageProductDependency; + package = DA3B75AC2C59729200E219AB /* XCRemoteSwiftPackageReference "SFSafeSymbols" */; + productName = SFSafeSymbols; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = DFB2621F18830A3600D3244D /* Project object */; diff --git a/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved b/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved index 51628d7f..6a0027af 100644 --- a/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -55,15 +55,6 @@ "version": "4.9.0" } }, - { - "package": "DynamicButton", - "repositoryURL": "https://github.com/yannickl/DynamicButton.git", - "state": { - "branch": null, - "revision": "4fbd60e46a548e77fd118483bbb4e58d3c11c5ed", - "version": "6.2.1" - } - }, { "package": "Firebase", "repositoryURL": "https://github.com/firebase/firebase-ios-sdk.git", @@ -172,6 +163,15 @@ "version": "2.4.0" } }, + { + "package": "SFSafeSymbols", + "repositoryURL": "https://github.com/SFSafeSymbols/SFSafeSymbols", + "state": { + "branch": null, + "revision": "e2e28f4e56e1769c2ec3c61c9355fc64eb7a535a", + "version": "5.3.0" + } + }, { "package": "SideMenu", "repositoryURL": "https://github.com/jonkykong/SideMenu.git", diff --git a/openHAB/ColorPickerUITableViewCell.swift b/openHAB/ColorPickerCell.swift similarity index 64% rename from openHAB/ColorPickerUITableViewCell.swift rename to openHAB/ColorPickerCell.swift index 99517efc..4a60ec34 100644 --- a/openHAB/ColorPickerUITableViewCell.swift +++ b/openHAB/ColorPickerCell.swift @@ -9,24 +9,23 @@ // // SPDX-License-Identifier: EPL-2.0 -import DynamicButton import OpenHABCore import os.log import UIKit -protocol ColorPickerUITableViewCellDelegate: NSObjectProtocol { - func didPressColorButton(_ cell: ColorPickerUITableViewCell?) +protocol ColorPickerCellDelegate: NSObjectProtocol { + func didPressColorButton(_ cell: ColorPickerCell?) } -class ColorPickerUITableViewCell: GenericUITableViewCell { - weak var delegate: ColorPickerUITableViewCellDelegate? +class ColorPickerCell: GenericUITableViewCell { + weak var delegate: ColorPickerCellDelegate? - @IBOutlet private var upButton: DynamicButton! + @IBOutlet private var downButton: UIButton! + @IBOutlet private var upButton: UIButton! @IBOutlet private var colorButton: UICircleButton! - @IBOutlet private var downButton: DynamicButton! required init?(coder: NSCoder) { - os_log("ColorPickerUITableViewCell initWithCoder", log: OSLog.viewCycle, type: .info) + os_log("ColorPickerCell initWithCoder", log: OSLog.viewCycle, type: .info) super.init(coder: coder) @@ -46,15 +45,10 @@ class ColorPickerUITableViewCell: GenericUITableViewCell { } override func displayWidget() { - downButton.setStyle(.caretDown, animated: false) - upButton.setStyle(.caretUp, animated: false) - customTextLabel?.text = widget.labelText colorButton?.backgroundColor = widget.item?.stateAsUIColor() upButton?.addTarget(self, action: .upButtonPressed, for: .touchUpInside) downButton?.addTarget(self, action: .downButtonPressed, for: .touchUpInside) - downButton?.highlightStokeColor = .ohHightlightStrokeColor - upButton?.highlightStokeColor = .ohHightlightStrokeColor } @objc @@ -71,6 +65,6 @@ class ColorPickerUITableViewCell: GenericUITableViewCell { } private extension Selector { - static let upButtonPressed = #selector(ColorPickerUITableViewCell.upButtonPressed) - static let downButtonPressed = #selector(ColorPickerUITableViewCell.downButtonPressed) + static let upButtonPressed = #selector(ColorPickerCell.upButtonPressed) + static let downButtonPressed = #selector(ColorPickerCell.downButtonPressed) } diff --git a/openHAB/DynamicButtonStyleBell.swift b/openHAB/DynamicButtonStyleBell.swift deleted file mode 100644 index 82a3c73f..00000000 --- a/openHAB/DynamicButtonStyleBell.swift +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2010-2024 Contributors to the openHAB project -// -// See the NOTICE file(s) distributed with this work for additional -// information. -// -// This program and the accompanying materials are made available under the -// terms of the Eclipse Public License 2.0 which is available at -// http://www.eclipse.org/legal/epl-2.0 -// -// SPDX-License-Identifier: EPL-2.0 - -import DynamicButton -import UIKit - -/// Bell symbol style: 🔔 -struct DynamicButtonStyleBell: DynamicButtonBuildableStyle { - /// "Bell" style. - static var styleName: String { - "Bell" - } - - let pathVector: DynamicButtonPathVector - - init(center: CGPoint, size: CGFloat, offset: CGPoint, lineWidth: CGFloat) { - let gongRadius = size / 7 - let gongCenter = CGPoint(x: center.x, y: size - gongRadius - lineWidth) - - let startAngle = CGFloat.pi - let endAngle = startAngle + CGFloat.pi - let gongPath = UIBezierPath(arcCenter: gongCenter, radius: gongRadius, startAngle: startAngle, endAngle: endAngle, clockwise: false) - - let bellHeight = gongCenter.y - (lineWidth / 2.0) - - let bellTop = UIBezierPath() - bellTop.move(to: CGPoint(x: 0, y: 26)) - bellTop.addCurve(to: CGPoint(x: 6, y: 12), controlPoint1: CGPoint(x: 0, y: 26), controlPoint2: CGPoint(x: 4.5, y: 22)) - bellTop.addCurve(to: CGPoint(x: 16, y: 2), controlPoint1: CGPoint(x: 6, y: 6), controlPoint2: CGPoint(x: 10.5, y: 2)) - bellTop.addCurve(to: CGPoint(x: 26, y: 12), controlPoint1: CGPoint(x: 21.5, y: 2), controlPoint2: CGPoint(x: 26, y: 6)) - bellTop.addCurve(to: CGPoint(x: 32, y: 26), controlPoint1: CGPoint(x: 27.5, y: 22), controlPoint2: CGPoint(x: 32, y: 26)) - bellTop.apply(CGAffineTransform(scaleX: size / 32.0, y: bellHeight / 26.0)) - - let bellBottom = UIBezierPath() - bellBottom.move(to: CGPoint(x: 0, y: bellHeight)) - bellBottom.addLine(to: CGPoint(x: size, y: bellHeight)) - - pathVector = DynamicButtonPathVector(p1: bellTop.cgPath, p2: bellBottom.cgPath, p3: bellBottom.cgPath, p4: gongPath.cgPath) - } -} diff --git a/openHAB/DynamicButtonStyleGear.swift b/openHAB/DynamicButtonStyleGear.swift deleted file mode 100644 index 80388c27..00000000 --- a/openHAB/DynamicButtonStyleGear.swift +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2010-2024 Contributors to the openHAB project -// -// See the NOTICE file(s) distributed with this work for additional -// information. -// -// This program and the accompanying materials are made available under the -// terms of the Eclipse Public License 2.0 which is available at -// http://www.eclipse.org/legal/epl-2.0 -// -// SPDX-License-Identifier: EPL-2.0 - -import DynamicButton -import UIKit - -/// Gear symbol style: ⚙ -struct DynamicButtonStyleGear: DynamicButtonBuildableStyle { - /// "Gear" style. - static var styleName: String { - "Gear" - } - - let pathVector: DynamicButtonPathVector - - init(center: CGPoint, size: CGFloat, offset: CGPoint, lineWidth: CGFloat) { - let shape = UIBezierPath() - shape.move(to: CGPoint(x: 19.4, y: 13)) - shape.addCurve(to: CGPoint(x: 19.5, y: 12), controlPoint1: CGPoint(x: 19.4, y: 12.7), controlPoint2: CGPoint(x: 19.5, y: 12.3)) - shape.addCurve(to: CGPoint(x: 19.4, y: 11), controlPoint1: CGPoint(x: 19.5, y: 11.7), controlPoint2: CGPoint(x: 19.5, y: 11.3)) - shape.addLine(to: CGPoint(x: 21.5, y: 9.5)) - shape.addCurve(to: CGPoint(x: 21.6, y: 8.8), controlPoint1: CGPoint(x: 21.7, y: 9.4), controlPoint2: CGPoint(x: 21.8, y: 9.1)) - shape.addLine(to: CGPoint(x: 19.6, y: 5.3)) - shape.addCurve(to: CGPoint(x: 19, y: 5), controlPoint1: CGPoint(x: 19.5, y: 5), controlPoint2: CGPoint(x: 19.2, y: 4.9)) - shape.addLine(to: CGPoint(x: 16.6, y: 6.1)) - shape.addCurve(to: CGPoint(x: 14.8, y: 5.1), controlPoint1: CGPoint(x: 16.1, y: 5.7), controlPoint2: CGPoint(x: 15.4, y: 5.3)) - shape.addLine(to: CGPoint(x: 14.5, y: 2.5)) - shape.addCurve(to: CGPoint(x: 14, y: 2), controlPoint1: CGPoint(x: 14.5, y: 2.2), controlPoint2: CGPoint(x: 14.3, y: 2)) - shape.addLine(to: CGPoint(x: 10, y: 2)) - shape.addCurve(to: CGPoint(x: 9.5, y: 2.5), controlPoint1: CGPoint(x: 9.7, y: 2), controlPoint2: CGPoint(x: 9.5, y: 2.2)) - shape.addLine(to: CGPoint(x: 9.2, y: 5)) - shape.addCurve(to: CGPoint(x: 7.4, y: 6), controlPoint1: CGPoint(x: 8.5, y: 5.3), controlPoint2: CGPoint(x: 7.9, y: 5.6)) - shape.addLine(to: CGPoint(x: 5, y: 5)) - shape.addCurve(to: CGPoint(x: 4.4, y: 5.2), controlPoint1: CGPoint(x: 4.8, y: 4.9), controlPoint2: CGPoint(x: 4.5, y: 5)) - shape.addLine(to: CGPoint(x: 2.4, y: 8.7)) - shape.addCurve(to: CGPoint(x: 2.5, y: 9.4), controlPoint1: CGPoint(x: 2.2, y: 9), controlPoint2: CGPoint(x: 2.2, y: 9.3)) - shape.addLine(to: CGPoint(x: 4.6, y: 11)) - shape.addCurve(to: CGPoint(x: 4.5, y: 12), controlPoint1: CGPoint(x: 4.6, y: 11.3), controlPoint2: CGPoint(x: 4.5, y: 11.7)) - shape.addCurve(to: CGPoint(x: 4.6, y: 13), controlPoint1: CGPoint(x: 4.5, y: 12.3), controlPoint2: CGPoint(x: 4.5, y: 12.7)) - shape.addLine(to: CGPoint(x: 2.5, y: 14.5)) - shape.addCurve(to: CGPoint(x: 2.4, y: 15.2), controlPoint1: CGPoint(x: 2.3, y: 14.6), controlPoint2: CGPoint(x: 2.2, y: 14.9)) - shape.addLine(to: CGPoint(x: 4.4, y: 18.7)) - shape.addCurve(to: CGPoint(x: 5, y: 19), controlPoint1: CGPoint(x: 4.5, y: 19), controlPoint2: CGPoint(x: 4.8, y: 19.1)) - shape.addLine(to: CGPoint(x: 7.4, y: 17.9)) - shape.addCurve(to: CGPoint(x: 9.2, y: 18.9), controlPoint1: CGPoint(x: 7.9, y: 18.3), controlPoint2: CGPoint(x: 8.6, y: 18.7)) - shape.addLine(to: CGPoint(x: 9.5, y: 21.5)) - shape.addCurve(to: CGPoint(x: 10, y: 22), controlPoint1: CGPoint(x: 9.5, y: 21.8), controlPoint2: CGPoint(x: 9.7, y: 22)) - shape.addLine(to: CGPoint(x: 14, y: 22)) - shape.addCurve(to: CGPoint(x: 14.5, y: 21.5), controlPoint1: CGPoint(x: 14.3, y: 22), controlPoint2: CGPoint(x: 14.5, y: 21.8)) - shape.addLine(to: CGPoint(x: 14.8, y: 18.9)) - shape.addCurve(to: CGPoint(x: 16.6, y: 17.9), controlPoint1: CGPoint(x: 15.5, y: 18.6), controlPoint2: CGPoint(x: 16.1, y: 18.3)) - shape.addLine(to: CGPoint(x: 19, y: 19)) - shape.addCurve(to: CGPoint(x: 19.6, y: 18.8), controlPoint1: CGPoint(x: 19.2, y: 19.1), controlPoint2: CGPoint(x: 19.5, y: 19)) - shape.addLine(to: CGPoint(x: 21.6, y: 15.3)) - shape.addCurve(to: CGPoint(x: 21.5, y: 14.6), controlPoint1: CGPoint(x: 21.7, y: 15.1), controlPoint2: CGPoint(x: 21.7, y: 14.8)) - shape.addLine(to: CGPoint(x: 19.4, y: 13)) - shape.close() - - shape.apply(CGAffineTransform(scaleX: (size - 2 * lineWidth) / 21.6, y: (size - 2 * lineWidth) / 21.6)) - - let radius = size / 4.8 - lineWidth - - let path = CGMutablePath() - path.move(to: CGPoint(x: center.x + radius, y: center.y)) - path.addArc(center: CGPoint(x: center.x, y: center.y), radius: radius, startAngle: 0, endAngle: 2 * .pi, clockwise: false) - - pathVector = DynamicButtonPathVector(p1: shape.cgPath, p2: shape.cgPath, p3: path, p4: path) - } -} diff --git a/openHAB/Main.storyboard b/openHAB/Main.storyboard index 05a77d15..49182702 100644 --- a/openHAB/Main.storyboard +++ b/openHAB/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -53,11 +53,11 @@ - +