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

5779 - Setting Display Scale Factor Changing #5889

Conversation

David5i6
Copy link
Contributor

fixes #5779

An if clause is used to return if it's not dragging the slider. MacOS and Windows, seems fixed.

Also a little comment in code and reformating for better readability.


Please I made this change to correct a problem with Pharo 8 and Pharo 9 on Windows 10 and MacOS (not tested on Linux), but I don't have a complete vision of Morphic and Spec, Spec2.

The problem was that when movin the mouse over the slider it changes magically it's position, but not alwas. I saw that there was no "draggin" state, but instead the style of the slider is diferent and determines the state and used it to determine if slider is dragging.

I think adding a "dragging" and "dragging:" messages to set and retrieve the dragging state should be a cleaner way so I added that in a second commit.

… and Windows, seems fixed.

Also a little comment in code and reformating for better readability.
… the current state and act in consecuence.

Using style of the slider was not a clean way to control the state.
@Ducasse
Copy link
Member

Ducasse commented Mar 14, 2020

Thanks this is uper cool that you spend your time fixing such kind of glitches. We are to used to jump over them. Thanks a lot. This is important because there is no little changes not worth.
This is because people give their energy to Pharo that it improves. So thank a lot.

Copy link
Member

@guillep guillep left a comment

Choose a reason for hiding this comment

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

I'd like to know, at least to keep as documentation, a couple of points.
Maybe it could make sense to add some method/class comments?

Anyways, thanks :)

src/Morphic-Widgets-Scrolling/Slider.class.st Outdated Show resolved Hide resolved
src/Morphic-Widgets-Scrolling/Slider.class.st Outdated Show resolved Hide resolved
@David5i6
Copy link
Contributor Author

You're right. Due that the dragging state is now reflected on draggin variable there's no need to make the check against the borderColor.

I'm going to change it. Thanks !

@David5i6
Copy link
Contributor Author

Re-reading the code, there some nonsense things. If mouse is down, It start dragging... but... ¿ It's possible to make the mouse down again without making it up ?

@guillep
Copy link
Member

guillep commented Mar 15, 2020

Thanks, I like the changes :)

@guillep guillep merged commit 9f71118 into pharo-project:Pharo9.0 Mar 15, 2020
@David5i6
Copy link
Contributor Author

sorry, I detected a little very rare cases after that. I'm gouing to send a merge request again with some code guards.

@guillep
Copy link
Member

guillep commented Mar 15, 2020

Sure, thanks for the effort!!

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.

Settings -> Display Scale Factor changing
3 participants