Finished the tooltip for the notes app ๐
It took longer than expected, but that's because I had trouble with the tooltip being displayed below other elements.
I also had a problem with the scale and opacity animation. It seems like views will by default animate from the center of the window in a `ZStack`. Not literally be positioned at the center, but the initial position of the tooltip was skewed towards the center point of the window.
It turns out that I should not conditionally remove the wrapper, but instead keep it always (the wrapper is used to calculate where tooltips should be relative to the button). Otherwise it will not have time to calculate the coordinates for the tooltip, which means it will fly in from center and then to its final position. Now I'm just keeping the position wrapper always, and then conditionally rendering the tooltips.
#dev #macOS #SwiftUI #AppKit
I think the task for today will be to implement a custom tooltip.
Perhaps I could also start working on "tab search". Basically, click on the selected tab, and it will then show an overlay that allows the user to quickly search and open a different file in the same tab.
Yesterday I fixed the text object in the canvas scaling in a way that was causing pixelation. The problem was that I used the `.scaleEffect`, so I replaced that with a more sophisticated approach where I am scaling the font size instead when zooming in and out.
The reason why I was using a `.scaleEffect` was because I had issues with text wrapping when I changed the font size. This is why I opted for a simpler approach - just as a temporary solution.
But it seems like I finally found a solution to the word wrapping issue... #dev
View quoted note โ
View quoted note →