if button have only image, change position to .imageonly

This commit is contained in:
2018-04-30 19:19:33 +01:00
parent f65e72faed
commit 9c970aff63
+5
View File
@@ -215,6 +215,11 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
let button = item.button!
button.imageScaling = .scaleProportionallyDown
button.imagePosition = .imageLeading
if (button.title == "") {
button.imagePosition = .imageOnly
}
button.imageHugsTitle = true
button.cell?.image = source.image
button.bezelColor = .clear