gerritdevriese / kzones

KDE KWin Script for snapping windows into zones
https://store.kde.org/p/1909220
GNU General Public License v3.0
238 stars 14 forks source link

Zones with 100 height ignore top padding #58

Closed Frosthaven closed 5 months ago

Frosthaven commented 5 months ago

Description:

Zones that do not have zones above or below them snap to the top of the screen, ignoring padding value.

Example:

Screenshot_20240127_140909

Layouts:

[
    {
        "name": "Single Feature",
        "padding": 20,
        "zones": [
            {
                "x": 0,
                "Y": 0,
                "height": 100,
                "width": 25
            },
            {
                "x": 25,
                "Y": 0,
                "height": 100,
                "width": 50
            },
            {
                "x": 75,
                "Y": 0,
                "height": 100,
                "width": 25
            }
        ]
    },
    {
        "name": "Double Feature",
        "padding": 20,
        "zones": [
            {
                "x": 0,
                "Y": 0,
                "height": 100,
                "width": 37
            },
            {
                "x": 37,
                "Y": 0,
                "height": 100,
                "width": 38
            },
            {
                "x": 75,
                "Y": 0,
                "height": 100,
                "width": 25
            }
        ]
    },
    {
        "name": "Columns",
        "padding": 20,
        "zones": [
            {
                "x": 0,
                "Y": 0,
                "height": 100,
                "width": 25
            },
            {
                "x": 25,
                "Y": 0,
                "height": 100,
                "width": 25
            },
            {
                "x": 50,
                "Y": 0,
                "height": 100,
                "width": 25
            },
            {
                "x": 75,
                "Y": 0,
                "height": 100,
                "width": 25
            }
        ]
    },
    {
        "name": "Grid",
        "padding": 20,
        "zones": [
            {
                "x": 0,
                "y": 0,
                "height": 50,
                "width": 25
            },
            {
                "x": 25,
                "y": 0,
                "height": 50,
                "width": 25
            },
            {
                "x": 50,
                "y": 0,
                "height": 50,
                "width": 25
            },
            {
                "x": 75,
                "y": 0,
                "height": 50,
                "width": 25
            },
            {
                "x": 0,
                "y": 50,
                "height": 50,
                "width": 25
            },
            {
                "x": 25,
                "y": 50,
                "height": 50,
                "width": 25
            },
            {
                "x": 50,
                "y": 50,
                "height": 50,
                "width": 25
            },
            {
                "x": 75,
                "y": 50,
                "height": 50,
                "width": 25
            }
        ]
    }
]
gerritdevriese commented 5 months ago

The keys for some of your Y values are uppercase, they need to be lowercase.

Frosthaven commented 5 months ago

The keys for some of your Y values are uppercase, they need to be lowercase.

As someone who uses json pretty much every day, this is an embarrassing catch. Thanks for the quick reply to solve for my lack of proper investigation!

gerritdevriese commented 5 months ago

Happy to help 😄