Comments (5)
I got it working by changing telephone-line-separator-render-image
to this:
(cl-defmethod telephone-line-separator-render-image ((obj telephone-line-separator) foreground background)
"Find cached pbm of OBJ in FOREGROUND and BACKGROUND.
If it doesn't exist, create and cache it."
(let* ((height (or telephone-line-height (frame-char-height)))
(hash-key (format "%s_%s_%s" background foreground height)))
;; Return cached image if we have it.
(or (gethash hash-key (oref obj image-cache))
(puthash hash-key
(telephone-line-propertize-image
(telephone-line--create-pbm-image
(telephone-line-separator-create-body obj)
background foreground))
(oref obj image-cache)))))
but now I get a small render defect in one of the monitors, see the attach.
(Also I think I should use something else to get the height, there's already a method define in utils
to get the height but I was just testing :))
from telephone-line.
Strangely at work with 3 completely different resolutions (4K, retina-like, and laptop), it renders perfectly in all screens!
from telephone-line.
Oh, hey, adding font height to the cache key is a great idea.
from telephone-line.
Awesome. I have another PR in the pipeline (that as per another issue, could convert to a Wiki entry rather than MOAR SEGMENTS, up to you).
I won't add this to the same PR as they are completely different issues, but will submit one right after. Also, I think I need to call one of the methods defined instead of repeating the "height selection" logic.
from telephone-line.
This was merged in #104, closing the issue. Thank you!
from telephone-line.
Related Issues (20)
- Customize problems
- Feature request (and sample solution): Evil-like indicator for buffer modified state HOT 1
- Separator not rendering correctly when window is inactive. HOT 2
- Org-clock segment possible? HOT 1
- Rendering errors HOT 1
- Gap after airline segment HOT 3
- Optionally don't render segments if they are empty? HOT 1
- The mode line cannot display color
- hud segment rendering errors in terminal Emacs HOT 1
- Add support for project.el ? HOT 5
- Looking to apply airline-theme colors using telephone-line
- How can suppress the smiley face (`: )`) on the right corner?
- I'm too dumb: passing arguments to segments? HOT 3
- Some `mode-line` elements do not respect `telephone-line-accent-active`
- Error during redisplay: (eval (telephone-line-separator-render telephone-line-gradient
- Support for colors when using meow
- Right margin incorrect for proportional-width fonts
- Telephone line is slow to update HOT 1
- `(fn FACE)"]) telephone-line-tan-hollow-right 'evil)) signaled (wrong-type-argument number-or-marker-p nil)`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telephone-line.