1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-11 17:38:38 +00:00

if button have only image, change position to .imageonly

This commit is contained in:
Toxblh 2018-04-30 19:19:33 +01:00
parent f65e72faed
commit 9c970aff63

View File

@ -215,6 +215,11 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
let button = item.button! let button = item.button!
button.imageScaling = .scaleProportionallyDown button.imageScaling = .scaleProportionallyDown
button.imagePosition = .imageLeading button.imagePosition = .imageLeading
if (button.title == "") {
button.imagePosition = .imageOnly
}
button.imageHugsTitle = true button.imageHugsTitle = true
button.cell?.image = source.image button.cell?.image = source.image
button.bezelColor = .clear button.bezelColor = .clear