Skip to content

Commit

Permalink
Merge branch 'develop' into diffable
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Bert <[email protected]>
  • Loading branch information
timbms authored Aug 26, 2024
2 parents b7f463a + ac12d85 commit fcc8093
Show file tree
Hide file tree
Showing 20 changed files with 366 additions and 583 deletions.
4 changes: 0 additions & 4 deletions OpenHABCore/Sources/OpenHABCore/Util/UIColorExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
135 changes: 68 additions & 67 deletions openHAB.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions openHAB.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand All @@ -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)
}
48 changes: 0 additions & 48 deletions openHAB/DynamicButtonStyleBell.swift

This file was deleted.

77 changes: 0 additions & 77 deletions openHAB/DynamicButtonStyleGear.swift

This file was deleted.

Loading

0 comments on commit fcc8093

Please sign in to comment.