Skip to content

Conversation

@sbonaime
Copy link
Contributor

Description of Change(s)

Adjust horizontal centering spacing for rest

Fixes Issue(s)

Fix #540

@cameronwhite
Copy link
Member

Thanks for looking at this!

While doing some testing I noticed that the new spacing didn't look as good for some durations like half rests, so perhaps the alignment needs some different settings per type

Screenshot 2025-11-22 at 10 18 24 PM

@sbonaime
Copy link
Contributor Author

sbonaime commented Nov 24, 2025

Maybe we should takie into account the width and height of each symbol before placing them. Or maybe at the drawing stage ?
Few examples were symbol width is important :

Tremolo picking
Capture d’écran 2025-11-24 à 10 59 30

Vibrato
Capture d’écran 2025-11-24 à 10 59 42

Large Vibrato and vibrato
Capture d’écran 2025-11-24 à 11 01 01

@cameronwhite
Copy link
Member

Yeah, there should ideally be some adjustments depending on the symbol

I recall it being hard to get accurate information about the width of each symbol from the Qt font info classes, which is why there are a lot of hardcoded scale factors in the layout code.

Copilot AI review requested due to automatic review settings January 16, 2026 09:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the horizontal centering spacing for rest symbols in the music notation renderer to fix issue #540. The change reduces the width allocation for rest centering from 1.25× to 1× the position spacing.

Changes:

  • Modified the horizontal centering width calculation for rest symbols to use exactly the position spacing width instead of 1.25× the width

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sbonaime
Copy link
Contributor Author

I made some changes :

  • rest at the correct position
  • TremoloPicking at the correct position


if (symbolGroup.getSymbolType() == SymbolGroup::TremoloPicking)
{
renderedSymbol->setY(yPos);
Copy link
Member

Choose a reason for hiding this comment

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

I'm not clear how these changes affect the layout

The tremolo picking symbol does this in the case statement above

renderedSymbol->setX(layout.getPositionX(symbolGroup.getLeftPosition()));

which looks equivalent to how the X position is set below in the generic case for other symbols?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rest position

2 participants