diff --git a/.bartycrouch.toml b/.bartycrouch.toml index 4ee80aa..278293d 100644 --- a/.bartycrouch.toml +++ b/.bartycrouch.toml @@ -32,4 +32,4 @@ sortByKeys = true [lint] paths = ["."] duplicateKeys = true -emptyValues = true +emptyValues = false diff --git a/MonitorControl.xcodeproj/project.pbxproj b/MonitorControl.xcodeproj/project.pbxproj index dcc6ae4..317e774 100644 --- a/MonitorControl.xcodeproj/project.pbxproj +++ b/MonitorControl.xcodeproj/project.pbxproj @@ -342,6 +342,7 @@ buildPhases = ( 28D1DE0C227FCFAF004CB494 /* [Format] Run SwiftFormat */, F03A8DF01FFB9D4C0034DC27 /* [Lint] Run SwiftLint */, + 6CB1BDB2253C7EBE00B52124 /* [Localization] Run BartyCrouch */, 56754EA71D9A4016007BCDC5 /* Sources */, 56754EA81D9A4016007BCDC5 /* Frameworks */, 56754EA91D9A4016007BCDC5 /* Resources */, @@ -505,6 +506,24 @@ shellPath = "/bin/bash -euo pipefail"; shellScript = "version_number=\"$(/usr/libexec/PlistBuddy -c \"Print CFBundleShortVersionString\" \"${INFOPLIST_FILE/Helper/}\")\"\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString ${version_number}\" \"${INFOPLIST_FILE/Helper/}\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString ${version_number}\" \"${INFOPLIST_FILE}\"\n"; }; + 6CB1BDB2253C7EBE00B52124 /* [Localization] Run BartyCrouch */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "[Localization] Run BartyCrouch"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if which bartycrouch > /dev/null; then\n bartycrouch update -x\n bartycrouch lint -x\nelse\n echo \"warning: BartyCrouch not installed, download it from https://github.com/Flinesoft/BartyCrouch\"\nfi\n"; + }; F03A8DF01FFB9D4C0034DC27 /* [Lint] Run SwiftLint */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/MonitorControl/Model/Display.swift b/MonitorControl/Model/Display.swift index c2f138d..53e606e 100644 --- a/MonitorControl/Model/Display.swift +++ b/MonitorControl/Model/Display.swift @@ -69,7 +69,7 @@ class Display { if roundChiclet { let osdChiclet = OSDUtils.chiclet(fromValue: Float(value), maxValue: Float(maxValue)) - + filledChiclets = Int(round(osdChiclet)) totalChiclets = 16 } else {