14.7: Canvas Only, Toggle Fullscreen on F and Escape

This commit is contained in:
ZacharyZhang-NY committed 2026-10-11 05:38:35 -04:00
1 parent 56f444b1ad
commit e1207281a4
19 files changed
+416 -16

No files matched your search

+18
View File
@@ -361,6 +361,24 @@ void EditorSession::zoomKeyboard(int step)
notify();
}
void EditorSession::setCanvasOnly(bool only)
{
m_canvasOnly = only;
notify();
}
bool EditorSession::escapeHasNothingToCancel() const
{
return !m_textDraft && !m_levels && !m_brushStroke && !m_warpStroke && !m_lassoDraft && !m_shapeDraft && !m_gradientEdit && !m_cropRect
&& !m_guideDrag && !m_transformEdit && !m_pixelMove;
}
bool EditorSession::canToggleCanvasOnly() const
{
return m_document && !m_textDraft && !m_filterEdit && !m_hueSaturation && !m_levels && !m_colorPicker && !adjustmentEditingID() && !m_effectsEditing
&& !m_colorRange && !selectionAmountOperation();
}
void EditorSession::setShowsPixelGrid(bool shows)
{
m_showsPixelGrid = shows;
+8
View File
@@ -243,6 +243,13 @@ public:
// The View menu's grid, shown from 800%.
bool showsPixelGrid() const { return m_showsPixelGrid; }
void setShowsPixelGrid(bool shows);
// F: the canvas alone on black, panels and bars away.
bool canvasOnly() const { return m_canvasOnly; }
void setCanvasOnly(bool only);
// Nothing in progress for Escape to cancel: it leaves fullscreen.
bool escapeHasNothingToCancel() const;
// A canvas, and no text or dialog for an F.
bool canToggleCanvasOnly() const;
// Swift's alias of View › Snap: moves, crops, drawing.
bool snappingEnabled() const { return m_snapEnabled; }
// The Eyedropper's ring: the sampled colour over the original.
@@ -344,6 +351,7 @@ private:
std::optional<QUuid> m_renamingLayerID;
std::optional<QString> m_projectPath;
bool m_showsPixelGrid = ToolDefaults::boolean(QStringLiteral("pixelGrid"), true);
bool m_canvasOnly = false;
// The layout grid starts off; guides show; rulers hide.
bool m_showsGrid = ToolDefaults::boolean(QStringLiteral("grid"), false);
LayoutGrid m_layoutGrid = LayoutGrid::stored();