Closed CeleritasCelery closed 5 years ago
In my opinion, we just add a function ivy-posframe-return-size, to return width and height really used, if user want to hack, he just override ivy-posframe-return-size
I have add a simpler approach, just try it
(defcustom ivy-posframe-size-function #'ivy-posframe-get-size
"The function which is used to deal with posframe's size."
:group 'ivy-posframe
:type 'function)
Touché. That is a much simpler solution and I like it.
I have been thinking about a solution that closes #31. I think the best solution is to give the option to the user as to how they want to handle this. This PR adds options
ivy-posframe-dynamic-width
andivy-posframe-dynamic-height
which allow the frame to be resized in those directions. I also allow the user to define their own function for setting the height and width. Currently if the user wants to set the width to 50% of the frame instead of the default 62%, they have no way to do that.I removed the customization for the min dimension because it only comes into play when setting the the size dynamically. In that case we can just use
ivy-posframe-height
andivy-posframe-width
.I feel like this makes more sense and gives more power to the user for how they want to the posframe to behave. Let me know what you think.