Stepped keyboard zoom and a steady tab strip (12.9b)
This commit is contained in:
1 parent
fdb62978c5
commit
9ac3b1b81c
17 files changed
+533
-38
No files matched your search
@@ -315,6 +315,17 @@ void EditorSession::zoom(double value, std::optional<QPointF> anchor)
|
||||
notify();
|
||||
}
|
||||
|
||||
void EditorSession::zoomKeyboard(int step)
|
||||
{
|
||||
if (!m_document)
|
||||
return;
|
||||
const double target = viewport.keyboardZoomTarget(step);
|
||||
if (target == viewport.zoom())
|
||||
return;
|
||||
viewport.setZoom(target, viewport.center(), m_document->size());
|
||||
notify();
|
||||
}
|
||||
|
||||
void EditorSession::setShowsPixelGrid(bool shows)
|
||||
{
|
||||
m_showsPixelGrid = shows;
|
||||
|
||||
@@ -253,6 +253,8 @@ public:
|
||||
void createDocument(int width, int height, bool emptyLayer = false);
|
||||
void fit();
|
||||
void zoom(double value, std::optional<QPointF> anchor = std::nullopt);
|
||||
// Swift's stepped keyboard zoom about the view's centre.
|
||||
void zoomKeyboard(int step);
|
||||
// The View menu's grid, shown from 800%.
|
||||
bool showsPixelGrid() const { return m_showsPixelGrid; }
|
||||
void setShowsPixelGrid(bool shows);
|
||||
|
||||
Reference in new issue
Block a user