Skip to content

Commit

Permalink
live-preview: Print properties set in an element in bold
Browse files Browse the repository at this point in the history
  • Loading branch information
hunger committed Sep 18, 2024
1 parent ddfbd18 commit 33afbe7
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions tools/lsp/ui/views/property-view.slint
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ component ResetButton inherits Button {
}

component NameLabel inherits HorizontalLayout {
in property <string> property-name;
in property <ElementInformation> element-information;
in property <PropertyInformation> property-information;

horizontal-stretch: 0;

Expand All @@ -57,8 +58,9 @@ component NameLabel inherits HorizontalLayout {

BodyText {
min-width: EditorSizeSettings.min-prefix-text-width;
text: root.property-name;
text: root.property-information.name;
font-size: 1rem;
font-weight: property-information.value.code != "" ? EditorFontSettings.bold-font-weight : EditorFontSettings.light-font-weight;
overflow: elide;
}
}
Expand All @@ -74,7 +76,8 @@ component FloatWidget inherits HorizontalLayout {
width: 100%;

NameLabel {
property-name: property-information.name;
property-information: root.property-information;
element-information: root.element-information;
}

HorizontalLayout {
Expand Down Expand Up @@ -138,7 +141,8 @@ component ColorWidget inherits HorizontalLayout {
width: 100%;

NameLabel {
property-name: property-information.name;
property-information: root.property-information;
element-information: root.element-information;
}

HorizontalLayout {
Expand Down Expand Up @@ -298,7 +302,8 @@ component ExpandableGroup {
spacing: EditorSpaceSettings.default-spacing;

NameLabel {
property-name: property.name;
property-information: property;
element-information: root.element-information;
}

CheckBox {
Expand All @@ -325,7 +330,8 @@ component ExpandableGroup {
padding-top: 2px;

NameLabel {
property-name: property.name;
property-information: property;
element-information: root.element-information;
}

if property.value.code == "": HorizontalLayout {
Expand All @@ -349,7 +355,8 @@ component ExpandableGroup {
spacing: EditorSpaceSettings.default-spacing;

NameLabel {
property-name: property.name;
property-information: property;
element-information: root.element-information;
}

HorizontalLayout {
Expand Down Expand Up @@ -378,7 +385,8 @@ component ExpandableGroup {
spacing: EditorSpaceSettings.default-spacing;

NameLabel {
property-name: property.name;
property-information: property;
element-information: root.element-information;
}

LineEdit {
Expand All @@ -400,7 +408,8 @@ component ExpandableGroup {
spacing: EditorSpaceSettings.default-spacing;

NameLabel {
property-name: property.name;
property-information: property;
element-information: root.element-information;
}

LineEdit {
Expand Down

0 comments on commit 33afbe7

Please sign in to comment.