From 446c32228aa17ccbf302b2f0e037be0e21dac394 Mon Sep 17 00:00:00 2001 From: sundialrise Date: Tue, 21 Jul 2026 15:56:51 -0400 Subject: [PATCH 1/3] Limit leading space so it cannot move elements left off page Working on #25799 --- src/engraving/rendering/score/horizontalspacing.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/engraving/rendering/score/horizontalspacing.cpp b/src/engraving/rendering/score/horizontalspacing.cpp index 5b504a2e504eb..3fb6a0cb52baa 100644 --- a/src/engraving/rendering/score/horizontalspacing.cpp +++ b/src/engraving/rendering/score/horizontalspacing.cpp @@ -32,6 +32,7 @@ #include "dom/glissando.h" #include "dom/lyrics.h" #include "dom/note.h" +#include "dom/page.h" #include "dom/rest.h" #include "dom/score.h" #include "dom/stemslash.h" @@ -290,6 +291,11 @@ std::vector HorizontalSpacing::spaceSegments double leadingSpace = curSeg->extraLeadingSpace().toAbsolute(ctx.spatium); placedSegments.back().xPosInSystemCoords += leadingSpace; + Page* page = toPage(ctx.system->parent()); + if (page) { + double pageLeftEdge = -page->lm(); + placedSegments.back().xPosInSystemCoords = std::max(placedSegments.back().xPosInSystemCoords, pageLeftEdge); + } if (curSeg->isChordRestType()) { bool isFirstCROfSystem = curSeg->rtick().isZero() && curSeg->measure()->isFirstInSystem(); From a343ded56a3bcc1971a987d6dfd60aaa70cb6dd7 Mon Sep 17 00:00:00 2001 From: sundialrise Date: Tue, 28 Jul 2026 15:43:17 -0400 Subject: [PATCH 2/3] Set limits to beam, staff line, and barline thickness Working on #25799 --- .../NotationScene/styledialog/BeamsPage.qml | 2 +- src/notationscene/widgets/editstyle.ui | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/notationscene/qml/MuseScore/NotationScene/styledialog/BeamsPage.qml b/src/notationscene/qml/MuseScore/NotationScene/styledialog/BeamsPage.qml index 30edd612ed6e7..5fd1e71201e20 100644 --- a/src/notationscene/qml/MuseScore/NotationScene/styledialog/BeamsPage.qml +++ b/src/notationscene/qml/MuseScore/NotationScene/styledialog/BeamsPage.qml @@ -101,7 +101,7 @@ StyledFlickable { currentValue: beamsPageModel.beamWidth.value minValue: 0 - maxValue: 99 + maxValue: 1 step: 0.01 decimals: 2 measureUnitsSymbol: qsTrc("global", "sp") diff --git a/src/notationscene/widgets/editstyle.ui b/src/notationscene/widgets/editstyle.ui index e1a83721f5568..ae63935c0ec3b 100644 --- a/src/notationscene/widgets/editstyle.ui +++ b/src/notationscene/widgets/editstyle.ui @@ -459,6 +459,9 @@ sp + + 1.000000000000000 + 0.100000000000000 @@ -4967,6 +4970,9 @@ 0.010000000000000 + + 2.000000000000000 + @@ -5036,6 +5042,9 @@ 0.010000000000000 + + 2.000000000000000 + @@ -5181,6 +5190,9 @@ 0.010000000000000 + + 2.000000000000000 + From a7120444205868e3880e68909c05860d23dda706 Mon Sep 17 00:00:00 2001 From: sundialrise Date: Fri, 31 Jul 2026 20:12:54 -0400 Subject: [PATCH 3/3] Don't waste time allocating a variable for page margin Working on #25799 --- src/engraving/rendering/score/horizontalspacing.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/engraving/rendering/score/horizontalspacing.cpp b/src/engraving/rendering/score/horizontalspacing.cpp index 3fb6a0cb52baa..a3a69d61a3eaa 100644 --- a/src/engraving/rendering/score/horizontalspacing.cpp +++ b/src/engraving/rendering/score/horizontalspacing.cpp @@ -293,8 +293,7 @@ std::vector HorizontalSpacing::spaceSegments placedSegments.back().xPosInSystemCoords += leadingSpace; Page* page = toPage(ctx.system->parent()); if (page) { - double pageLeftEdge = -page->lm(); - placedSegments.back().xPosInSystemCoords = std::max(placedSegments.back().xPosInSystemCoords, pageLeftEdge); + placedSegments.back().xPosInSystemCoords = std::max(placedSegments.back().xPosInSystemCoords, -page->lm()); } if (curSeg->isChordRestType()) {