Skip to content

Commit

Permalink
added faded sidebars on out-of-date preview
Browse files Browse the repository at this point in the history
  • Loading branch information
szecket authored and hunger committed Dec 10, 2024
1 parent 0f15a26 commit 9780984
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions tools/lsp/ui/main.slint
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export component PreviewUi inherits Window {
property <bool> show-left-sidebar;
property <bool> show-right-sidebar;


title: "Slint Live-Preview";
icon: @image-url("assets/slint-logo-small-light.png");

Expand All @@ -40,7 +39,6 @@ export component PreviewUi inherits Window {
component-factory: Api.preview-area;
}
}

}
if Api.show-preview-ui: Rectangle {
VerticalLayout {
Expand All @@ -65,7 +63,6 @@ export component PreviewUi inherits Window {
}
}


HorizontalLayout {
spacing: EditorSpaceSettings.default-spacing;

Expand Down Expand Up @@ -98,6 +95,7 @@ export component PreviewUi inherits Window {
}

if root.show-right-sidebar: PropertyView {
opacity: preview.preview-is-current ? 1.0 : 0.3;
enabled: preview.preview-is-current;
}
}
Expand Down
1 change: 1 addition & 0 deletions tools/lsp/ui/views/library-view.slint
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export component LibraryView {
side-bar := Group {
width: 100%;
height: 100%;
opacity: root.preview-area-is-current ? 1 : 0.3;

GroupHeader {
title: @tr("Library");
Expand Down

0 comments on commit 9780984

Please sign in to comment.