Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live Preview and SlintPad hide "Style" even when imported .slint file contains std-widgets #7172

Open
tasuku-suzuki-signalslot opened this issue Dec 19, 2024 · 0 comments
Labels
a:live preview The Live preview of slintpad or the LSP (mT,bO) bug Something isn't working need triaging Issue that the owner of the area still need to triage

Comments

@tasuku-suzuki-signalslot

Bug Description

image

In tools/lsp/preview.rs, the existence of the import from std-widgets.slint is checked only for the opened file itself. However, if the opened file imports another .slint file that, in turn, includes an import from std-widgets.slint, the style should also be changable accordingly.

Reproducible Code (if applicable)

// main.slint
import {Sub} from "sub.slint";

export component Demo inherits Sub {
}

// sub.slint
import { AboutSlint, Button, VerticalBox } from "std-widgets.slint";

export component Sub {
    VerticalBox {
        alignment: start;
        Text {
            text: "Hello World!";
            font-size: 24px;
            horizontal-alignment: center;
        }
        AboutSlint {
            preferred-height: 150px;
        }
        HorizontalLayout { alignment: center; Button { text: "OK!"; } }
    }
}

Environment Details

  • Slint Version:
  • Platform/OS:
  • Programming Language:
  • Backend/Renderer:

Product Impact

No response

@tasuku-suzuki-signalslot tasuku-suzuki-signalslot added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Dec 19, 2024
@ogoffart ogoffart added the a:live preview The Live preview of slintpad or the LSP (mT,bO) label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:live preview The Live preview of slintpad or the LSP (mT,bO) bug Something isn't working need triaging Issue that the owner of the area still need to triage
Projects
None yet
Development

No branches or pull requests

2 participants