Option to size window margin (blank area outside window borders)

Defaults to zero
This commit is contained in:
Kovid Goyal
2017-06-05 22:27:47 +05:30
parent b4d4ed718f
commit bbc6b2d86a
5 changed files with 30 additions and 17 deletions
+7
View File
@@ -37,6 +37,13 @@ def wcwidth(c: str) -> int:
return wcwidth_impl(ord(c[0]))
@lru_cache()
def pt_to_px(pts):
dpix, dpiy = get_dpi()['logical']
dpi = (dpix + dpiy) / 2
return round(pts * dpi / 72)
@contextmanager
def timeit(name, do_timing=False):
if do_timing: