Skip to content

Commit 2f880fa

Browse files
committed
Fix missing artboard layer icon
1 parent 415d4b5 commit 2f880fa

File tree

6 files changed

+12
-14
lines changed

6 files changed

+12
-14
lines changed

editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2714,6 +2714,7 @@ impl NodeGraphMessageHandler {
27142714
let clippable = layer.can_be_clipped(network_interface.document_metadata());
27152715
let data = LayerPanelEntry {
27162716
id: node_id,
2717+
reference: network_interface.reference(&node_id, &[]).and_then(|x| x.as_ref()).cloned().unwrap_or_default(),
27172718
alias: network_interface.display_name(&node_id, &[]),
27182719
in_selected_network: selection_network_path.is_empty(),
27192720
children_allowed,

editor/src/messages/portfolio/document/utility_types/nodes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ impl serde::Serialize for JsRawBuffer {
3434
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq, specta::Type)]
3535
pub struct LayerPanelEntry {
3636
pub id: NodeId,
37+
pub reference: String,
3738
pub alias: String,
3839
#[serde(rename = "inSelectedNetwork")]
3940
pub in_selected_network: bool,

editor/src/messages/tool/utility_types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ impl DocumentToolData {
134134
LayoutGroup::Row {
135135
widgets: vec![
136136
IconButton::new("SwapVertical", 16)
137-
.tooltip_label("Swap")
137+
.tooltip_label("Swap Working Colors")
138138
.tooltip_shortcut(action_shortcut!(ToolMessageDiscriminant::SwapColors))
139139
.on_update(|_| ToolMessage::SwapColors.into())
140140
.widget_instance(),
141141
IconButton::new("WorkingColors", 16)
142-
.tooltip_label("Reset")
142+
.tooltip_label("Reset Working Colors")
143143
.tooltip_shortcut(action_shortcut!(ToolMessageDiscriminant::ResetColors))
144144
.on_update(|_| ToolMessage::ResetColors.into())
145145
.widget_instance(),

frontend/src/components/panels/Layers.svelte

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,15 +644,15 @@
644644
{@html $nodeGraph.thumbnails.get(listing.entry.id)}
645645
{/if}
646646
</div>
647-
{#if listing.entry.name === "Artboard"}
648-
<IconLabel icon="Artboard" class="layer-type-icon" />
647+
{#if listing.entry.reference === "Artboard"}
648+
<IconLabel icon="Artboard" class="layer-type-icon" tooltipLabel="Artboard" />
649649
{/if}
650650
<LayoutRow class="layer-name" on:dblclick={() => onEditLayerName(listing)}>
651651
<input
652652
data-text-input
653653
type="text"
654654
value={listing.entry.alias}
655-
placeholder={listing.entry.name}
655+
placeholder={listing.entry.reference}
656656
disabled={!listing.editingName}
657657
on:blur={() => onEditLayerNameDeselect(listing)}
658658
on:keydown={(e) => e.key === "Escape" && onEditLayerNameDeselect(listing)}
@@ -842,7 +842,6 @@
842842
}
843843
844844
.layer-type-icon {
845-
flex: 0 0 auto;
846845
margin-left: 8px;
847846
margin-right: -4px;
848847
}

frontend/src/components/widgets/inputs/NumberInput.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -745,10 +745,6 @@
745745

746746
<style lang="scss" global>
747747
.number-input {
748-
input {
749-
text-align: center;
750-
}
751-
752748
&.narrow {
753749
--widget-height: 20px;
754750
}
@@ -973,5 +969,9 @@
973969
}
974970
}
975971
}
972+
973+
input {
974+
text-align: center;
975+
}
976976
}
977977
</style>

frontend/src/messages.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -827,13 +827,10 @@ export class UpdateDocumentLayerDetails extends JsMessage {
827827
export class LayerPanelEntry {
828828
id!: bigint;
829829

830-
name!: string;
830+
reference!: string;
831831

832832
alias!: string;
833833

834-
@Transform(({ value }: { value: string }) => value || undefined)
835-
debugLayerIdTooltip!: string | undefined;
836-
837834
inSelectedNetwork!: boolean;
838835

839836
childrenAllowed!: boolean;

0 commit comments

Comments
 (0)