Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit the automation-editor scaled-level tooltip to the grid #4308

Merged
merged 6 commits into from Apr 26, 2018

Conversation

Projects
None yet
3 participants
@Sawuare
Copy link
Member

Sawuare commented Apr 21, 2018

Fixes #3746.

@zonkmachine

This comment has been minimized.

Copy link
Member

zonkmachine commented Apr 21, 2018

Here is another issue that sounds AutomationEditor::drawCross() related: #2714

@@ -173,6 +173,7 @@ protected slots:

// some constants...
static const int SCROLLBAR_SIZE = 12;
static const int LEFT_MARGIN = 63;

This comment has been minimized.

@PhysSong

PhysSong Apr 22, 2018

Member

I guess you can calculate the left margin using VALUES_WIDTH.

This comment has been minimized.

@Sawuare

Sawuare Apr 22, 2018

Author Member

As in using VALUES_WIDTH instead of LEFT_MARGIN in drawCross()?

This comment has been minimized.

@PhysSong

PhysSong Apr 22, 2018

Member

Yes, though it doesn't need to be simple replacing.

This comment has been minimized.

@Sawuare

Sawuare Apr 22, 2018

Author Member

Done in 19b0342.

QToolTip::showText( tt_pos, QString::number( scaledLevel ), this );

// Limit the scaled-level tooltip to the grid
if( mouse_pos.x() > LEFT_MARGIN &&

This comment has been minimized.

@PhysSong

PhysSong Apr 22, 2018

Member

Why did you put a tab inside parentheses instead of a space?

This comment has been minimized.

@Sawuare

Sawuare Apr 22, 2018

Author Member

Mistake. Fixed in d1dfe32.

Hussam Eddin Alhomsi

@Sawuare Sawuare added the in progress label Apr 22, 2018

Hussam Eddin Alhomsi

@Sawuare Sawuare removed the in progress label Apr 22, 2018

@@ -1099,8 +1098,8 @@ inline void AutomationEditor::drawCross( QPainter & p )
float scaledLevel = m_pattern->firstObject()->scaledValue( level );

// Limit the scaled-level tooltip to the grid
if( mouse_pos.x() > LEFT_MARGIN &&
mouse_pos.x() < right_margin &&
if( mouse_pos.x() > VALUES_WIDTH - 1 && // left_margin

This comment has been minimized.

@PhysSong

PhysSong Apr 23, 2018

Member

I think VALUES_WIDTH would be better, because it matches the limit area to where you can edit points.

This comment has been minimized.

@Sawuare

Sawuare Apr 23, 2018

Author Member

At VALUES_WIDTH - 1, the cross' vertical line is visible, so the scaled-level tooltip should show there.

@Sawuare

This comment has been minimized.

Copy link
Member Author

Sawuare commented Apr 24, 2018

Here is another issue that sounds AutomationEditor::drawCross() related: #2714

It is. It can be fixed with similar checks, so I will do it here.

@Sawuare Sawuare added the in progress label Apr 24, 2018

@Sawuare

This comment has been minimized.

Copy link
Member Author

Sawuare commented Apr 24, 2018

@zonkmachine After some thinking, I don't think d127517 is the best way to fix #2714. It feels clunky, and it's somewhat out of scope. I will try to fix it in a different way, but not here.
That being said, I will finish this tomorrow.

Hussam Eddin Alhomsi added some commits Apr 25, 2018

@Sawuare Sawuare removed the in progress label Apr 25, 2018

@Sawuare Sawuare merged commit 386c471 into LMMS:stable-1.2 Apr 26, 2018

1 of 2 checks passed

ci/circleci No test commands were found
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Sawuare Sawuare deleted the Sawuare:fix/AE-drawCross branch Jun 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.