Content-Length: 362134 | pFad | http://github.com/slint-ui/slint/pull/7859/commits/0f28e9cae76d284c83e45ca0604083da1f49211f

8A Add a brush widgets into the live-preview by hunger · Pull Request #7859 · slint-ui/slint · GitHub
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

Add a brush widgets into the live-preview #7859

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
live-preview: janitor work: Split up the property-widgets.slint file
It got *WAY* to big.
  • Loading branch information
hunger committed Mar 14, 2025
commit 0f28e9cae76d284c83e45ca0604083da1f49211f
70 changes: 70 additions & 0 deletions tools/lsp/ui/components/expandable-group.slint
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

import { Palette } from "std-widgets.slint";

import { BodyStrongText } from "../components/body-strong-text.slint";
import { StateLayer } from "../components/state-layer.slint";

import { EditorAnimationSettings, EditorSizeSettings, EditorSpaceSettings, Icons } from "../components/styling.slint";

export component ExpandableGroup {
in property <bool> enabled;
in property <string> text;
in property <length> panel-width;

in-out property <bool> open: true;

group-layer := Rectangle {
content-layer := VerticalLayout {
if text != "": Rectangle {
touch-area := TouchArea {
clicked => {
root.open = !root.open;
}
}

state-layer := StateLayer {
width: panel-width;
height: group-layer.height;
y: group-layer.y;
has-hover: touch-area.has-hover;
pressed: touch-area.pressed;
}

HorizontalLayout {
spacing: EditorSpaceSettings.default-spacing / 2;
height: t.preferred-height;

icon-image := Image {
width: EditorSizeSettings.default-icon-width;
colorize: Palette.alternate-foreground.transparentize(0.7);
source: Icons.chevron-down;
rotation-origen-x: self.width / 2;
rotation-origen-y: self.height / 2;
states [
closed when !root.open: {
rotation-angle: -0.25turn;
}
]

animate rotation-angle { duration: EditorAnimationSettings.rotation-duration; }
}

t := BodyStrongText {
text: root.text;
}
}
}

Rectangle {
height: root.open ? self.preferred-height : 0px;
clip: true;

@children

animate height { duration: EditorAnimationSettings.resize-duration; }
}
}
}
}
217 changes: 0 additions & 217 deletions tools/lsp/ui/components/gradient.slint

This file was deleted.

Loading
Oops, something went wrong.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/slint-ui/slint/pull/7859/commits/0f28e9cae76d284c83e45ca0604083da1f49211f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy