emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-posframe 60e1f99 045/195: add variable to customize


From: Feng Shu
Subject: [elpa] externals/ivy-posframe 60e1f99 045/195: add variable to customize ivy-posframe style
Date: Sat, 3 Oct 2020 07:11:42 -0400 (EDT)

branch: externals/ivy-posframe
commit 60e1f99bc131690611e169bd0a4d940a1c57c6e6
Author: Samray <samrayleung@gmail.com>
Commit: Samray <samrayleung@gmail.com>

    add variable to customize ivy-posframe style
---
 ivy-posframe.el | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 6b2ec86..7f49589 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -1,5 +1,6 @@
 ;;; ivy-posframe.el --- Using posframe to show Ivy  -*- lexical-binding: t -*-
 
+
 ;; Copyright (C) 2017-2018 Free Software Foundation, Inc.
 
 ;; Author: Feng Shu
@@ -116,6 +117,25 @@
 When nil, Using current frame's font as fallback."
   :group 'ivy-posframe
   :type 'string)
+(defcustom ivy-posframe-width nil
+  "The width of ivy-posframe."
+  :group 'ivy-posframe
+  :type 'number)
+
+(defcustom ivy-posframe-height nil
+  "The height of ivy-posframe."
+  :group 'ivy-posframe
+  :type 'number)
+
+(defcustom ivy-posframe-min-width nil
+  "The width of ivy-min-posframe."
+  :group 'ivy-posframe
+  :type 'number)
+
+(defcustom ivy-posframe-min-height nil
+  "The height of ivy-min-posframe."
+  :group 'ivy-posframe
+  :type 'number)
 
 (defcustom ivy-posframe-border-width 0
   "The border width used by ivy-posframe.
@@ -168,9 +188,10 @@ This variable is useful for `ivy-posframe-read-action' .")
        :poshandler poshandler
        :background-color (face-attribute 'ivy-posframe :background)
        :foreground-color (face-attribute 'ivy-posframe :foreground)
-       :height ivy-height
-       :min-height 10
-       :min-width 50
+       :height (or ivy-posframe-height ivy-height)
+       :width (or ivy-posframe-width (/ (window-width) 2))
+       :min-height (or ivy-posframe-min-height 10)
+       :min-width (or ivy-posframe-min-width 50)
        :internal-border-width ivy-posframe-border-width
        :override-parameters ivy-posframe-parameters))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]