mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 03:48:12 +08:00
Add a node insertion button and layer renaming from the Properties panel (#2072)
* Add node button * Improve css a bit * Add layer renaming to the Properties panel and move New Layer to that, plus add unpinning to properties sections * Add tooltip * Re-add layer itself in listing * Final code review --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
3c839ffd2b
commit
5aa6716910
@@ -1116,6 +1116,10 @@ export class NumberInput extends WidgetProps {
|
||||
minWidth!: number;
|
||||
}
|
||||
|
||||
export class NodeCatalog extends WidgetProps {
|
||||
disabled!: boolean;
|
||||
}
|
||||
|
||||
export class PopoverButton extends WidgetProps {
|
||||
style!: PopoverButtonStyle | undefined;
|
||||
|
||||
@@ -1293,6 +1297,7 @@ const widgetSubTypes = [
|
||||
{ value: IconButton, name: "IconButton" },
|
||||
{ value: IconLabel, name: "IconLabel" },
|
||||
{ value: ImageLabel, name: "ImageLabel" },
|
||||
{ value: NodeCatalog, name: "NodeCatalog" },
|
||||
{ value: NumberInput, name: "NumberInput" },
|
||||
{ value: ParameterExposeButton, name: "ParameterExposeButton" },
|
||||
{ value: PivotInput, name: "PivotInput" },
|
||||
@@ -1425,7 +1430,7 @@ export function isWidgetSpanRow(layoutRow: LayoutGroup): layoutRow is WidgetSpan
|
||||
return Boolean((layoutRow as WidgetSpanRow)?.rowWidgets);
|
||||
}
|
||||
|
||||
export type WidgetSection = { name: string; visible: boolean; id: bigint; layout: LayoutGroup[] };
|
||||
export type WidgetSection = { name: string; visible: boolean; pinned: boolean; id: bigint; layout: LayoutGroup[] };
|
||||
export function isWidgetSection(layoutRow: LayoutGroup): layoutRow is WidgetSection {
|
||||
return Boolean((layoutRow as WidgetSection)?.layout);
|
||||
}
|
||||
@@ -1468,6 +1473,7 @@ function createLayoutGroup(layoutGroup: any): LayoutGroup {
|
||||
const result: WidgetSection = {
|
||||
name: layoutGroup.section.name,
|
||||
visible: layoutGroup.section.visible,
|
||||
pinned: layoutGroup.section.pinned,
|
||||
id: layoutGroup.section.id,
|
||||
layout: layoutGroup.section.layout.map(createLayoutGroup),
|
||||
};
|
||||
@@ -1502,8 +1508,6 @@ export class UpdateMenuBarLayout extends JsMessage {
|
||||
|
||||
export class UpdateNodeGraphBarLayout extends WidgetDiffUpdate {}
|
||||
|
||||
export class UpdatePropertyPanelOptionsLayout extends WidgetDiffUpdate {}
|
||||
|
||||
export class UpdatePropertyPanelSectionsLayout extends WidgetDiffUpdate {}
|
||||
|
||||
export class UpdateToolOptionsLayout extends WidgetDiffUpdate {}
|
||||
@@ -1594,7 +1598,6 @@ export const messageMakers: Record<string, MessageMaker> = {
|
||||
UpdateNodeThumbnail,
|
||||
UpdateNodeTypes,
|
||||
UpdateOpenDocumentsList,
|
||||
UpdatePropertyPanelOptionsLayout,
|
||||
UpdatePropertyPanelSectionsLayout,
|
||||
UpdateToolOptionsLayout,
|
||||
UpdateToolShelfLayout,
|
||||
|
||||
Reference in New Issue
Block a user