-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Scrollbar size settings are "dendrified" #11732
Scrollbar size settings are "dendrified" #11732
Comments
The reason those settings are not applied is that those values are currently hard-coded in theia/packages/monaco/src/browser/monaco-editor.ts Lines 136 to 143 in 205193d
In my earlier PR, I chose not to modify that in case there was a good reason for having those values set that way, but either removing the hard-coded values or switching the spread to the end of the object would allow those preference values to take effect in new editors. Moving the spread to the bottom is probably the best approach. |
Hey @colin-grant-work can you give me a bit more idea on what changes are you expecting? I am a complete beginner and would like to up the issue. |
@ravitejasssihl, basically, at the moment, we're spreading the user-supplied options, then providing defaults. That means that anywhere the defaults conflict with user options, the defaults win, which isn't desirable. Switching the code here to something like this would allow the user options to win out: const combinedOptions = {
lightbulb: { enabled: true },
fixedOverflowWidgets: true,
...options,
scrollbar: {
useShadows: false,
verticalHasArrows: false,
horizontalHasArrows: false,
verticalScrollbarSize: 10,
horizontalScrollbarSize: 10,
...options?.scrollbar,
}
} as IStandaloneEditorConstructionOptions; |
@svenefftinge I see you were the one who set the scrollbar widths to this nonstandard size they are now locked to: #852 Would you be able to clear up @colin-grant-work's doubt about whether the locking of the setting was done intentionally:
|
Bug Description:
When a non-default value is set for the
editor.scrollbar.horizontalScrollbarSize
oreditor.scrollbar.verticalScrollbarSize
settings, the default value is still used for all new editors/windows.Steps to Reproduce:
editor.scrollbar.horizontalScrollbarSize
andeditor.scrollbar.verticalScrollbarSize
settings to 50:🙂 The horizontal and vertical scrollbar "troughs" are sized according to the custom setting.
❗ There is an unrelated bug that causes the "thumbs" to remain at the default size.
🐛 The horizontal and vertical scrollbar "troughs" are sized according to the default setting (14).
Additional Information
Related: #11709
The text was updated successfully, but these errors were encountered: