From 1dae45c58d7eabeda21ef490d712915890bf6cff Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 17 Jun 2024 09:16:28 +0300 Subject: Refactor layout to fractional-logical Lets borders, gaps, and everything else stay pixel-perfect even with fractional scale. Allows setting fractional border widths, gaps, struts. See the new wiki .md for more details. --- wiki/Configuration:-Layout.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'wiki/Configuration:-Layout.md') diff --git a/wiki/Configuration:-Layout.md b/wiki/Configuration:-Layout.md index a16dcb79..e27d0ef7 100644 --- a/wiki/Configuration:-Layout.md +++ b/wiki/Configuration:-Layout.md @@ -48,6 +48,10 @@ layout { Set gaps around (inside and outside) windows in logical pixels. +Since: 0.1.7 You can use fractional values. +The value will be rounded to physical pixels according to the scale factor of every output. +For example, `gaps 0.5` on an output with `scale 2` will result in one physical-pixel wide gaps. + ``` layout { gaps 16 @@ -170,6 +174,22 @@ layout { } ``` +#### Width + +Set the thickness of the border in logical pixels. + +Since: 0.1.7 You can use fractional values. +The value will be rounded to physical pixels according to the scale factor of every output. +For example, `width 0.5` on an output with `scale 2` will result in one physical-pixel thick borders. + +``` +layout { + border { + width 2 + } +} +``` + #### Colors Colors can be set in a variety of ways: @@ -227,6 +247,10 @@ They are set in logical pixels. Left and right struts will cause the next window to the side to always peek out slightly. Top and bottom struts will simply add outer gaps in addition to the area occupied by layer-shell panels and regular gaps. +Since: 0.1.7 You can use fractional values. +The value will be rounded to physical pixels according to the scale factor of every output. +For example, `top 0.5` on an output with `scale 2` will result in one physical-pixel wide top strut. + ``` layout { struts { -- cgit