Skip to content

Commit b5e8c89

Browse files
author
Isaac
committed
Update
1 parent 7364be9 commit b5e8c89

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

submodules/TelegramUI/Components/GlassBackgroundComponent/Sources/GlassBackgroundComponent.swift

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -701,15 +701,19 @@ public extension GlassBackgroundView {
701701
let context = ctx.cgContext
702702

703703
context.setFillColor(fillColor.cgColor)
704-
context.fill(CGRect(origin: CGPoint(), size: size).insetBy(dx: inset, dy: inset).insetBy(dx: 0.1, dy: 0.1))
704+
context.fill(CGRect(origin: CGPoint(), size: size))
705705

706706
if let image = UIImage(bundleImageName: "Item List/GlassEdge40x40") {
707-
if s <= 0.3 && !isDark {
708-
image.draw(in: CGRect(origin: CGPoint(), size: size).insetBy(dx: inset, dy: inset), blendMode: .normal, alpha: 0.7)
707+
let imageInset = (image.size.width - 40.0) * 0.5
708+
709+
if s == 0.0 && abs(a - 0.7) < 0.1 && !isDark {
710+
image.draw(in: CGRect(origin: CGPoint(), size: size).insetBy(dx: inset - imageInset, dy: inset - imageInset), blendMode: .normal, alpha: 1.0)
711+
} else if s <= 0.3 && !isDark {
712+
image.draw(in: CGRect(origin: CGPoint(), size: size).insetBy(dx: inset - imageInset, dy: inset - imageInset), blendMode: .normal, alpha: 0.7)
709713
} else if b >= 0.2 {
710-
image.draw(in: CGRect(origin: CGPoint(), size: size).insetBy(dx: inset, dy: inset), blendMode: .plusLighter, alpha: 0.7)
714+
image.draw(in: CGRect(origin: CGPoint(), size: size).insetBy(dx: inset - imageInset, dy: inset - imageInset), blendMode: .plusLighter, alpha: 0.7)
711715
} else {
712-
image.draw(in: CGRect(origin: CGPoint(), size: size).insetBy(dx: inset, dy: inset), blendMode: .normal, alpha: 0.5)
716+
image.draw(in: CGRect(origin: CGPoint(), size: size).insetBy(dx: inset - imageInset, dy: inset - imageInset), blendMode: .normal, alpha: 0.5)
713717
}
714718
}
715719
}
5.31 KB
Loading
10.5 KB
Loading

submodules/TelegramUI/Images.xcassets/Item List/GlassEdge40x40.imageset/Contents.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
{
22
"images" : [
33
{
4-
"filename" : "iOS 28.pdf",
5-
"idiom" : "universal"
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "[email protected]",
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"filename" : "[email protected]",
14+
"idiom" : "universal",
15+
"scale" : "3x"
616
}
717
],
818
"info" : {
Binary file not shown.

0 commit comments

Comments
 (0)