Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2bd0789
Make new document with doubleclicking on empty tab space
partg952 Sep 26, 2025
866749f
fixed linting error
partg952 Sep 26, 2025
b5835bb
added another LayoutRow and added the double click event to that cont…
partg952 Sep 29, 2025
9867930
added another LayoutRow and added the double click event to that cont…
partg952 Sep 29, 2025
0ce356b
Merge branch 'GraphiteEditor:master' into master
partg952 Sep 29, 2025
63c734c
Merge branch 'master' into master
partg952 Oct 2, 2025
cf08916
Merge branch 'GraphiteEditor:master' into master
partg952 Oct 4, 2025
f834eb5
passed the double click function as a prop
partg952 Oct 4, 2025
adde82e
removed debug changes
partg952 Oct 4, 2025
a3feae2
Merge branch 'master' into master
partg952 Oct 7, 2025
5568699
Merge branch 'master' into master
partg952 Oct 15, 2025
8f3c8d8
Delete docs/svelte-rust-connection.md
partg952 Oct 15, 2025
566d0f5
Update pen_tool.rs
partg952 Oct 15, 2025
f6e7ce9
Merge branch 'master' into master
partg952 Oct 16, 2025
c598d95
Fix formatting in Panel.svelte
partg952 Oct 16, 2025
f95323c
Update Panel.svelte
partg952 Oct 16, 2025
1d39b8e
Update Panel.svelte
partg952 Oct 16, 2025
95f7e3f
Update Panel.svelte
partg952 Oct 16, 2025
083a0de
Merge branch 'master' into master
partg952 Oct 17, 2025
a212292
Update Panel.svelte
partg952 Oct 18, 2025
ccd48d4
Fix formatting of dblclickEmptySpaceAction function
partg952 Oct 18, 2025
88f88de
Merge branch 'master' into master
partg952 Oct 19, 2025
316c05d
Merge branch 'master' into master
partg952 Oct 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions editor/src/messages/tool/tool_messages/pen_tool.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove theses debug changes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've committed more things by accident. In the future before you ping with comment please check yourself if the changes in the File Changes tab of the pr only include what you what to be part of the pr.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really sorry , the pr got quite messy I will make sure of it in the coming pull requests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. :)

Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ impl PenToolData {
}

fn add_point(&mut self, point: LastPoint) {
log::debug!("{:?}" , point);
self.point_index = (self.point_index + 1).min(self.latest_points.len());
self.latest_points.truncate(self.point_index);
self.latest_points.push(point);
Expand Down Expand Up @@ -662,7 +663,7 @@ impl PenToolData {
let Some(pos) = vector.point_domain.position_from_id(id) else { continue };
let transformed_distance_between_squared = transform.transform_point2(pos).distance_squared(transform.transform_point2(self.next_point));
let snap_point_tolerance_squared = crate::consts::SNAP_POINT_TOLERANCE.powi(2);

log::debug!("path closed");
if transformed_distance_between_squared < snap_point_tolerance_squared {
self.update_handle_type(TargetHandle::PreviewInHandle);
self.handle_end_offset = None;
Expand All @@ -684,6 +685,7 @@ impl PenToolData {
let document = snap_data.document;
let next_handle_start = self.next_handle_start;
let handle_start = self.latest_point()?.handle_start;

let mouse = snap_data.input.mouse.position;
self.handle_swapped = false;
self.handle_end_offset = None;
Expand Down Expand Up @@ -1450,6 +1452,8 @@ impl Fsm for PenToolFsmState {
tool_options: &Self::ToolOptions,
responses: &mut VecDeque<Message>,
) -> Self {

log::debug!("transition happening , {:?}" , self);
let ToolActionMessageContext {
document,
global_tool_data,
Expand Down Expand Up @@ -1478,7 +1482,7 @@ impl Fsm for PenToolFsmState {
match (self, event) {
(PenToolFsmState::PlacingAnchor | PenToolFsmState::GRSHandle, PenToolMessage::GRS { grab, rotate, scale }) => {
let Some(layer) = layer else { return PenToolFsmState::PlacingAnchor };

log::debug!("placing anchor");
let Some(latest) = tool_data.latest_point() else { return PenToolFsmState::PlacingAnchor };
if latest.handle_start == latest.pos {
return PenToolFsmState::PlacingAnchor;
Expand Down
13 changes: 10 additions & 3 deletions frontend/src/components/window/workspace/Panel.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
export let panelType: PanelType | undefined = undefined;
export let clickAction: ((index: number) => void) | undefined = undefined;
export let closeAction: ((index: number) => void) | undefined = undefined;
export let dblclickEmptySpaceAction : (() => void) | undefined = undefined;

let className = "";
export { className as class };
Expand Down Expand Up @@ -100,7 +101,8 @@
</script>

<LayoutCol on:pointerdown={() => panelType && editor.handle.setActivePanel(panelType)} class={`panel ${className}`.trim()} {classes} style={styleName} {styles}>
<LayoutRow class="tab-bar" classes={{ "min-widths": tabMinWidths }}>
<LayoutRow class="tab-bar" classes={{ "min-widths": tabMinWidths }} >

<LayoutRow class="tab-group" scrollableX={true}>
{#each tabLabels as tabLabel, tabIndex}
<LayoutRow
Expand Down Expand Up @@ -148,11 +150,14 @@
{/if}
</LayoutRow>
{/each}
<LayoutRow class="tab-group-empty-space" on:dblclick={dblclickEmptySpaceAction}></LayoutRow>
</LayoutRow>

<!-- <PopoverButton style="VerticalEllipsis">
<TextLabel bold={true}>Panel Options</TextLabel>
<TextLabel multiline={true}>Coming soon</TextLabel>
</PopoverButton> -->

</LayoutRow>
<LayoutCol class="panel-body">
{#if panelType}
Expand Down Expand Up @@ -218,13 +223,15 @@
background: var(--color-1-nearblack);
border-radius: 6px;
overflow: hidden;

.tab-bar {
height: 28px;
min-height: auto;
background: var(--color-1-nearblack); // Needed for the viewport hole punch on desktop
flex-shrink: 0;

.tab-group-empty-space {
width: 100%;
}
&.min-widths .tab-group .tab {
min-width: 120px;
max-width: 360px;
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/window/workspace/Workspace.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
tabCloseButtons={true}
tabMinWidths={true}
tabLabels={documentTabLabels}
dblclickEmptySpaceAction={()=>editor.handle.newDocumentDialog()}
clickAction={(tabIndex) => editor.handle.selectDocument($portfolio.documents[tabIndex].id)}
closeAction={(tabIndex) => editor.handle.closeDocumentWithConfirmation($portfolio.documents[tabIndex].id)}
tabActiveIndex={$portfolio.activeDocumentIndex}
Expand Down