Skip to content

Commit

Permalink
Fix not being able to drag the app from the top bar (#7315)
Browse files Browse the repository at this point in the history
Do not show in changelog
  • Loading branch information
ClementPasteau authored Jan 16, 2025
1 parent d6c99b2 commit 6242e8c
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions newIDE/app/src/UI/TitleBarSafeMargins.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,19 @@ export const TitleBarRightSafeMargins = ({
}
}

if (rightSideOffset) {
return (
<div
className={DRAGGABLE_PART_CLASS_NAME}
style={{
...titleBarStyles.rightSideArea,
minWidth:
rightSideOffset +
(rightSideAdditionalOffsetToGiveSpaceToDrag ? 30 : 0),
backgroundColor: backgroundColor || 'transparent',
}}
/>
);
}
const draggableMinWidth =
rightSideOffset + (rightSideAdditionalOffsetToGiveSpaceToDrag ? 30 : 0);

// Not on the desktop app, and not in an installed PWA with window controls displayed
// as overlay: no need to display a spacing.
return null;
// Always display this draggable area, as it will take the whole available space
// in the title bar.
return (
<div
className={DRAGGABLE_PART_CLASS_NAME}
style={{
...titleBarStyles.rightSideArea,
minWidth: draggableMinWidth,
backgroundColor: backgroundColor || 'transparent',
}}
/>
);
};

0 comments on commit 6242e8c

Please sign in to comment.