mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 18:22:09 +02:00
If a border width in pts is non-zero have it result in a minimum 1px border
Change the default to 0.5pt instead of 1px
This commit is contained in:
@@ -11,7 +11,7 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
does not display a box around active windows.
|
does not display a box around active windows.
|
||||||
|
|
||||||
- Allow specifying border sizes in either pts or pixels. Change the default to
|
- Allow specifying border sizes in either pts or pixels. Change the default to
|
||||||
1px borders as this works best with the new minimal border style.
|
0.5pt borders as this works best with the new minimal border style.
|
||||||
|
|
||||||
- Add support for displaying correct colors with non-sRGB PNG files (Adds a
|
- Add support for displaying correct colors with non-sRGB PNG files (Adds a
|
||||||
dependency on liblcms2)
|
dependency on liblcms2)
|
||||||
|
|||||||
@@ -683,7 +683,7 @@ def window_border_width(x: Union[str, int, float]) -> Tuple[float, str]:
|
|||||||
return max(0, val), unit
|
return max(0, val), unit
|
||||||
|
|
||||||
|
|
||||||
o('window_border_width', '1px', option_type=window_border_width, long_text=_('''
|
o('window_border_width', '0.5pt', option_type=window_border_width, long_text=_('''
|
||||||
The width of window borders. Can be either in pixels (px) or pts (pt). Values
|
The width of window borders. Can be either in pixels (px) or pts (pt). Values
|
||||||
in pts will be rounded to the nearest number of pixels based on screen
|
in pts will be rounded to the nearest number of pixels based on screen
|
||||||
resolution. If not specified the unit is assumed to be pts.
|
resolution. If not specified the unit is assumed to be pts.
|
||||||
|
|||||||
@@ -332,7 +332,7 @@ class Window:
|
|||||||
def effective_border(self) -> int:
|
def effective_border(self) -> int:
|
||||||
val, unit = self.opts.window_border_width
|
val, unit = self.opts.window_border_width
|
||||||
if unit == 'pt':
|
if unit == 'pt':
|
||||||
val = pt_to_px(val, self.os_window_id)
|
val = max(1 if val > 0 else 0, pt_to_px(val, self.os_window_id))
|
||||||
else:
|
else:
|
||||||
val = round(val)
|
val = round(val)
|
||||||
return int(val)
|
return int(val)
|
||||||
|
|||||||
Reference in New Issue
Block a user