Allow specifying border sizes in either pt or px

Change the default to 1px borders as this works best with the new minimal border style.
This commit is contained in:
Kovid Goyal
2020-08-30 14:17:47 +05:30
parent 31d9f663fc
commit 3d60724651
3 changed files with 28 additions and 4 deletions

View File

@@ -330,7 +330,12 @@ class Window:
self.update_effective_padding()
def effective_border(self) -> int:
return pt_to_px(self.opts.window_border_width, self.os_window_id)
val, unit = self.opts.window_border_width
if unit == 'pt':
val = pt_to_px(val, self.os_window_id)
else:
val = round(val)
return int(val)
@property
def title(self) -> str: