Misc Fix #18

Merged
tr1xem merged 14 commits from macos into macos 2025-08-03 12:58:42 +00:00
tr1xem commented 2025-08-03 07:45:19 +00:00 (Migrated from github.com)

Description

Linked Issues

Additional context

<!-- DO NOT IGNORE THE TEMPLATE! Thank you for contributing! Before submitting the PR, please make sure you do the following: - Read the [Contributing Guide](https://github.com/S4NKALP/.github/blob/main/CONTRIBUTING.md). - Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate. - Provide a description in this PR that addresses **what** the PR is solving, or reference the issue that it solves (e.g. `fixes #123`). - Ideally, include relevant tests that fail without this PR but pass with it. --> ### Description <!-- Please insert your description here and provide especially info about the "what" this PR is solving --> ### Linked Issues ### Additional context <!-- e.g. is there anything you'd like reviewers to focus on? -->
S4NKALP (Migrated from github.com) requested changes 2025-08-03 12:53:28 +00:00
S4NKALP (Migrated from github.com) left a comment
class Deskwidgets(Window):
    def __init__(self, **kwargs):
        top_left = Window(
            anchor="top left",
            orientation="h",
            layer="bottom",
            child=Box(
                name="desktop-widgets-container",
                children=[
                    Box(
                        orientation="v",
                        name="box-widget",
                        v_expand=True,
                        v_align="center",
                        h_align="center",
                        children=[Date()],
                    ),
                    WeatherContainer(),
                ],
            ),
        )

        bottom_left = Window(
            anchor="bottom left",
            orientation="h",
            layer="bottom",
            child=Box(),
        )

        container = Box(
            orientation="v",
            children=[
                top_left,
                bottom_left,
            ],
        )

        super().__init__(
            name="desktop",
            layer="bottom",
            title="desktop-widgets",
            orientation="v",
            exclusivity="none",
            child=container,
            **kwargs,
        )```
        
        
        use this for the warning::
        
(main.py:17491): Gtk-WARNING **: 18:35:03.574: Attempting to add a widget with type widgets+wayland+WaylandWindow to a modules+widget+Deskwidgets, but as a GtkBin subclass a modules+widget+Deskwidgets can only contain one widget at a time; it already contains a widget of type widgets+wayland+WaylandWindow
``` class Deskwidgets(Window): def __init__(self, **kwargs): top_left = Window( anchor="top left", orientation="h", layer="bottom", child=Box( name="desktop-widgets-container", children=[ Box( orientation="v", name="box-widget", v_expand=True, v_align="center", h_align="center", children=[Date()], ), WeatherContainer(), ], ), ) bottom_left = Window( anchor="bottom left", orientation="h", layer="bottom", child=Box(), ) container = Box( orientation="v", children=[ top_left, bottom_left, ], ) super().__init__( name="desktop", layer="bottom", title="desktop-widgets", orientation="v", exclusivity="none", child=container, **kwargs, )``` use this for the warning:: (main.py:17491): Gtk-WARNING **: 18:35:03.574: Attempting to add a widget with type widgets+wayland+WaylandWindow to a modules+widget+Deskwidgets, but as a GtkBin subclass a modules+widget+Deskwidgets can only contain one widget at a time; it already contains a widget of type widgets+wayland+WaylandWindow
Sign in to join this conversation.