Skip to content

Commit

Permalink
css changes for list and tree components
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Dec 6, 2024
1 parent a4e6116 commit cc0a139
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
1 change: 1 addition & 0 deletions packages/eez-studio-ui/_stylesheets/app.less
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,7 @@ button.EezStudio_Action {
display: flex;
white-space: nowrap;
position: relative;
border-radius: 3px;

&.drag-source {
background-color: @dragSourceBackgroundColor;
Expand Down
2 changes: 1 addition & 1 deletion packages/eez-studio-ui/_stylesheets/project-editor.less
Original file line number Diff line number Diff line change
Expand Up @@ -3822,5 +3822,5 @@
color: rgb(238, 238, 238);
background-color: var(--bs-secondary);
white-space: nowrap;
border-radius: var(--bs-border-radius);
border-radius: 4px;
}
30 changes: 19 additions & 11 deletions packages/project-editor/features/variable/variable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ import {
IMessage,
PropertyInfo,
getProperty,
PropertyProps
PropertyProps,
isPropertyDisabled
} from "project-editor/core/object";
import {
getChildOfObject,
Message,
propertyNotSetMessage,
createObject,
isEezObjectArray,
getAncestorOfType
getAncestorOfType,
findPropertyByNameInObject
} from "project-editor/store";
import {
isDashboardProject,
Expand Down Expand Up @@ -470,7 +472,8 @@ export class Variable extends EezObject {
ProjectEditor.getProjectStore(variable),
variable.type
)?.editConstructorParams) ||
variable.type == "object:TCPSocket"
variable.type == "object:TCPSocket",
checkboxStyleSwitch: true
},
{
name: "persistedValue",
Expand All @@ -487,8 +490,6 @@ export class Variable extends EezObject {
],
icon: VARIABLE_ICON,
listLabel: (variable: Variable) => {
const projectStore = getProjectStore(variable);

return (
<>
<span>{variable.name}</span>
Expand All @@ -498,17 +499,24 @@ export class Variable extends EezObject {
>
{variable.type}
</em>
{projectStore.projectTypeTraits.hasFlowSupport &&
{!isPropertyDisabled(
variable,
findPropertyByNameInObject(variable, "native")!
) &&
variable.native && (
<span className="EezStudio_ListLabel_Badge">
NATIVE
</span>
)}
{variable.persistent && (
<span className="EezStudio_ListLabel_Badge">
PERSISTENT
</span>
)}
{!isPropertyDisabled(
variable,
findPropertyByNameInObject(variable, "persistent")!
) &&
variable.persistent && (
<span className="EezStudio_ListLabel_Badge">
PERSISTENT
</span>
)}
</>
);
},
Expand Down
3 changes: 2 additions & 1 deletion packages/project-editor/lvgl/widgets/Label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ export class LVGLLabelWidget extends LVGLWidget {
{
name: "recolor",
type: PropertyType.Boolean,
propertyGridGroup: specificGroup
propertyGridGroup: specificGroup,
checkboxStyleSwitch: true
}
],

Expand Down

0 comments on commit cc0a139

Please sign in to comment.