Skip to content

Commit

Permalink
Unified design and improve accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
martenrebane committed Nov 14, 2023
1 parent ab12530 commit 2bb0a16
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 120 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"colors" : [
{
"idiom" : "universal",
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0x8C",
"alpha" : "1.000",
"blue" : "0x68",
"green" : "0xC3"
"blue" : "0x35",
"green" : "0x7C",
"red" : "0x4F"
}
}
},
"idiom" : "universal"
}
]
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 3 additions & 3 deletions MoppApp/MoppApp/Assets.xcassets/Colors/Others/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
}

This file was deleted.

45 changes: 22 additions & 23 deletions MoppApp/MoppApp/Container.storyboard

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions MoppApp/MoppApp/ContainerSignatureCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ class ContainerSignatureCell: UITableViewCell {
let signatureStatusText = translationPrefix + " " + translationSufix
let signatureStatus = NSMutableAttributedString(string: signatureStatusText)
let mainColor: UIColor
if(valid){
mainColor = UIColor.moppSuccessTextDarker
}else{
if (valid) {
mainColor = UIColor.moppSuccess
} else{
mainColor = UIColor.moppError
}
signatureStatus.addAttribute(NSAttributedString.Key.foregroundColor, value: mainColor, range: NSRange(location:0,length:translationPrefix.count))
Expand Down
13 changes: 1 addition & 12 deletions MoppApp/MoppApp/Extensions/UIColor+Additions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ extension UIColor {
class var moppSuccess: UIColor {
return UIColor(named: "MoppSuccess")!
}

class var moppSuccessText: UIColor {
return UIColor(named: "MoppSuccessText")!
}

class var moppWarning: UIColor {
return UIColor(named: "MoppWarning")!
Expand Down Expand Up @@ -129,17 +125,10 @@ extension UIColor {
return UIColor(named: "MoppLabelBackgroundDarker")!
}

class var moppSuccessTextDarker: UIColor {
return UIColor(named: "MoppSuccessTextDarker")!
}

class var moppSuccessDarker: UIColor {
return UIColor(named: "MoppSuccessDarker")!
}

class var moppDetailText: UIColor {
return UIColor(named: "MoppDetailText")!
}

class var moppDetailValue: UIColor {
return UIColor(named: "MoppDetailValue")!
}
Expand Down
2 changes: 1 addition & 1 deletion MoppApp/MoppApp/MyeIDInfoManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class MyeIDInfoManager {
if isValid {
let certValidText = capitalized ? L(.myEidCertValid).capitalized : L(.myEidCertValid)
let validText = NSAttributedString(string: certValidText, attributes:
[.foregroundColor : UIColor.moppSuccessTextDarker])
[.foregroundColor : UIColor.moppSuccess])
attrText.append(validText)
} else {
let certExpiredText = capitalized ? L(.myEidCertExpired).capitalized : L(.myEidCertExpired)
Expand Down
6 changes: 3 additions & 3 deletions MoppApp/MoppApp/Settings.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -604,17 +604,17 @@
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="25" translatesAutoresizingMaskIntoConstraints="NO" id="2nF-ky-2K3">
<rect key="frame" x="16" y="643" width="327" height="89"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="vra-Lf-d6I">
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="vra-Lf-d6I">
<rect key="frame" x="0.0" y="0.0" width="327" height="31"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="Enable one-time log generation" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="7bH-3u-clw" customClass="ScaledLabel" customModule="MoppApp" customModuleProvider="target">
<rect key="frame" x="0.0" y="6" width="280.5" height="19.5"/>
<rect key="frame" x="0.0" y="6" width="273" height="19.5"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="751" verticalHuggingPriority="750" horizontalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="vjc-8d-DZD" customClass="SwitchButton" customModule="MoppApp" customModuleProvider="target">
<rect key="frame" x="285.5" y="0.0" width="43.5" height="31"/>
<rect key="frame" x="278" y="0.0" width="51" height="31"/>
<connections>
<action selector="fileLoggingSwitchChanged:" destination="B8K-Cg-QcU" eventType="valueChanged" id="843-Jb-vWY"/>
</connections>
Expand Down
6 changes: 6 additions & 0 deletions MoppApp/MoppApp/SwitchButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@ class SwitchButton: UISwitch {

override init(frame: CGRect) {
super.init(frame: frame)
setDefaultOnColor()
setDefaultOffColor()
}

required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
setDefaultOnColor()
setDefaultOffColor()
}

private func setDefaultOnColor() {
self.onTintColor = UIColor.moppSuccess
}

private func setDefaultOffColor() {
self.offColor = UIColor.moppLabel
}
Expand Down
8 changes: 4 additions & 4 deletions MoppApp/MoppApp/TokenFlow.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="YH8-us-1Zw" customClass="MoppButton" customModule="MoppApp" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="160" height="32"/>
<color key="backgroundColor" red="0.0" green="0.43137254899999999" blue="0.70980392160000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" name="MoppError"/>
<fontDescription key="fontDescription" name="RobotoCondensed-Regular" family="Roboto Condensed" pointSize="17"/>
<state key="normal">
<color key="titleColor" red="0.9630651563" green="0.9630651563" blue="0.9630651563" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
Expand Down Expand Up @@ -514,7 +514,7 @@
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3Oa-qq-zja" customClass="MoppButton" customModule="MoppApp" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="166.5" height="32"/>
<color key="backgroundColor" red="0.0" green="0.43137254899999999" blue="0.70980392160000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" name="MoppError"/>
<accessibility key="accessibilityConfiguration" identifier="IdCardCancelButton"/>
<fontDescription key="fontDescription" name="RobotoCondensed-Regular" family="Roboto Condensed" pointSize="17"/>
<state key="normal">
Expand Down Expand Up @@ -811,7 +811,7 @@
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zrW-Cm-87h" customClass="ScaledButton" customModule="MoppApp" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="144" height="32"/>
<color key="backgroundColor" red="0.0" green="0.43137254899999999" blue="0.70980392160000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" name="MoppError"/>
<fontDescription key="fontDescription" name="RobotoCondensed-Regular" family="Roboto Condensed" pointSize="17"/>
<state key="normal">
<color key="titleColor" red="0.9630651563" green="0.9630651563" blue="0.9630651563" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
Expand Down Expand Up @@ -1191,7 +1191,7 @@
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x1X-cW-HvC" customClass="ScaledButton" customModule="MoppApp" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="160" height="40"/>
<color key="backgroundColor" red="0.0" green="0.43137254899999999" blue="0.70980392160000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" name="MoppError"/>
<fontDescription key="fontDescription" name="RobotoCondensed-Regular" family="Roboto Condensed" pointSize="17"/>
<state key="normal" title="CANCEL">
<color key="titleColor" red="0.9630651563" green="0.9630651563" blue="0.9630651563" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
Expand Down

0 comments on commit 2bb0a16

Please sign in to comment.