mirror of
https://github.com/ThisIsBenny/iOS-Widgets.git
synced 2025-06-07 05:57:41 +00:00
fix color issue
Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
This commit is contained in:
parent
e3da7b9b00
commit
1ff280ef54
1 changed files with 10 additions and 6 deletions
|
@ -120,15 +120,19 @@ if (config.widgetFamily === 'small') {
|
||||||
let backColor = new Color('D32D1F')
|
let backColor = new Color('D32D1F')
|
||||||
let backColor2 = new Color('93291E')
|
let backColor2 = new Color('93291E')
|
||||||
let textColor = new Color('EDEDED')
|
let textColor = new Color('EDEDED')
|
||||||
let strokeColor = new Color('EDEDED')
|
let strokeColor = new Color('B0B0B0')
|
||||||
let fillColor = new Color('B0B0B0')
|
let fillColor = new Color('EDEDED')
|
||||||
|
let strokeColorProgressbar = new Color('EDEDED')
|
||||||
|
let fillColorProgressbar = new Color('B0B0B0')
|
||||||
|
|
||||||
if (darkModeSupport) {
|
if (darkModeSupport) {
|
||||||
backColor = Color.dynamic(backColor, new Color('111111'))
|
backColor = Color.dynamic(backColor, new Color('111111'))
|
||||||
backColor2 = Color.dynamic(backColor2, new Color('222222'))
|
backColor2 = Color.dynamic(backColor2, new Color('222222'))
|
||||||
textColor = Color.dynamic(textColor, new Color('EDEDED'))
|
textColor = Color.dynamic(textColor, new Color('EDEDED'))
|
||||||
strokeColor = Color.dynamic(strokeColor, new Color('EDEDED'))
|
strokeColor = Color.dynamic(strokeColor, new Color('111111'))
|
||||||
fillColor = Color.dynamic(fillColor, new Color('111111'))
|
fillColor = Color.dynamic(fillColor, new Color('EDEDED'))
|
||||||
|
strokeColorProgressbar = Color.dynamic(strokeColorProgressbar, new Color('EDEDED'))
|
||||||
|
fillColorProgressbar = Color.dynamic(fillColorProgressbar, new Color('111111'))
|
||||||
}
|
}
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -139,14 +143,14 @@ function creatProgress(total, havegone) {
|
||||||
context.respectScreenScale = false
|
context.respectScreenScale = false
|
||||||
|
|
||||||
// Background Path
|
// Background Path
|
||||||
context.setFillColor(fillColor)
|
context.setFillColor(fillColorProgressbar)
|
||||||
const path = new Path()
|
const path = new Path()
|
||||||
path.addRoundedRect(new Rect(0, 0, width, h), 3, 2)
|
path.addRoundedRect(new Rect(0, 0, width, h), 3, 2)
|
||||||
context.addPath(path)
|
context.addPath(path)
|
||||||
context.fillPath()
|
context.fillPath()
|
||||||
|
|
||||||
// Progress Path
|
// Progress Path
|
||||||
context.setFillColor(strokeColor)
|
context.setFillColor(strokeColorProgressbar)
|
||||||
const path1 = new Path()
|
const path1 = new Path()
|
||||||
const path1width = (width * (havegone / total) > width) ? width : width * (havegone / total)
|
const path1width = (width * (havegone / total) > width) ? width : width * (havegone / total)
|
||||||
path1.addRoundedRect(new Rect(0, 0, path1width, h), 3, 2)
|
path1.addRoundedRect(new Rect(0, 0, path1width, h), 3, 2)
|
||||||
|
|
Loading…
Add table
Reference in a new issue