-
-
Notifications
You must be signed in to change notification settings - Fork 779
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4732 from wikimedia/native-editor-design-review
Native Editor - Design review feedback
- Loading branch information
Showing
20 changed files
with
185 additions
and
167 deletions.
There are no files selected for viewing
15 changes: 0 additions & 15 deletions
15
Components/Sources/Components/Assets.xcassets/separator.imageset/Contents.json
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-3.77 KB
Components/Sources/Components/Assets.xcassets/separator.imageset/separator.pdf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 73 additions & 61 deletions
134
...nts/Editors/Common Views/Input Accessory Views/Expanding/WKEditorToolbarExpandingView.xib
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 0 additions & 33 deletions
33
Components/Sources/Components/Components/Editors/Common Views/WKToolbarSeparatorView.swift
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
Components/Sources/Components/Extensions/UIImage+Extensions.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Foundation | ||
import UIKit | ||
|
||
public extension UIImage { | ||
static func roundedRectImage(with color: UIColor, cornerRadius: CGFloat, width: CGFloat? = nil, height: CGFloat? = nil) -> UIImage? { | ||
let minDimension = 2 * cornerRadius + 1 | ||
let rect = CGRect(x: 0, y: 0, width: width ?? minDimension, height: height ?? minDimension) | ||
let scale = UIScreen.main.scale | ||
UIGraphicsBeginImageContextWithOptions(rect.size, false, scale) | ||
guard let context = UIGraphicsGetCurrentContext() else { | ||
return nil | ||
} | ||
context.setFillColor(color.cgColor) | ||
let path = UIBezierPath(roundedRect: rect, cornerRadius: cornerRadius) | ||
path.fill() | ||
let capInsets = UIEdgeInsets(top: cornerRadius, left: cornerRadius, bottom: cornerRadius, right: cornerRadius) | ||
let image = UIGraphicsGetImageFromCurrentImageContext()?.resizableImage(withCapInsets: capInsets) | ||
UIGraphicsEndImageContext() | ||
return image | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.