-
Notifications
You must be signed in to change notification settings - Fork 635
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
Dyn 5530 library zoom scaling #13733
Dyn 5530 library zoom scaling #13733
Conversation
get { return preferencesWindow; } | ||
} | ||
|
||
internal event Action OnPreferencesWindowChanged; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The library extension didn't have access to the new PreferencesView object created. So, this event was added to be called after a new preferences window is opened.
|
||
void PreferencesWindowChanged() | ||
{ | ||
this.dynamoView.PreferencesWindow.LibraryZoomScalingSlider.ValueChanged += DynamoSliderValueChanged; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a new PreferencesWindow is created, the value of the slider is subscribed.
Can we have a pointer at 200% as well? I think it will look more natural that way, what do you think @Amoursol @Jingyi-Wen |
Yes please - a consistent spread across would be best. |
@@ -8,6 +8,7 @@ | |||
<ShowCodeBlockLineNumber>false</ShowCodeBlockLineNumber> | |||
<ShowConnector>false</ShowConnector> | |||
<ShowConnectorToolTip>false</ShowConnectorToolTip> | |||
<LibraryZoomScale>2.0361751152073739</LibraryZoomScale> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the value intended to be so long? Can we limit the digit length of the value serialized somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use float instead of double
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me
@@ -42,6 +44,8 @@ public class LibraryViewController : IDisposable | |||
// TODO remove this when we can control the library state from Dynamo more precisely. | |||
private bool disableObserver = false; | |||
|
|||
private static readonly string LibrarSlider = "notificationsButton"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this used?
this.dynamoView.PreferencesWindow.LibraryZoomScalingSlider.ValueChanged -= DynamoSliderValueChanged; | ||
this.dynamoView.OnPreferencesWindowChanged -= PreferencesWindowChanged; | ||
|
||
var dynamoViewWindow = dynamoWindow as DynamoView; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this line here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a couple of comments, would you address those?
I've also added localization for the expander header and adjusted the position of the percentage labels depending on the slider value. |
@RobertGlobant20 With your latest changes, the test WorkspaceContextMenu_TestIfInCanvasSearchHidesOnOpeningContextMenu still fails sporadically. |
Purpose
The purpose of this PR is to add a zoom scale for the Library in the prefence settings.
Declarations
Check these if you believe they are true
*.resx
filesReviewers
@QilongTang @zeusongit
FYIs
@RobertGlobant20