Skip to content

Commit 1990b5a

Browse files
committed
Max height and hidden vertical scrollbar
1 parent 833507b commit 1990b5a

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

src/vs/base/browser/ui/findinput/findInput.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export interface IFindInputOptions extends IFindInputStyles {
2424
readonly validation?: IInputValidator;
2525
readonly label: string;
2626
readonly flexibleHeight?: boolean;
27+
readonly flexibleMaxHeight?: number;
2728

2829
readonly appendCaseSensitiveLabel?: string;
2930
readonly appendWholeWordsLabel?: string;
@@ -119,6 +120,7 @@ export class FindInput extends Widget {
119120
const appendRegexLabel = options.appendRegexLabel || '';
120121
const history = options.history || [];
121122
const flexibleHeight = !!options.flexibleHeight;
123+
const flexibleMaxHeight = options.flexibleMaxHeight;
122124

123125
this.domNode = document.createElement('div');
124126
dom.addClass(this.domNode, 'monaco-findInput');
@@ -142,7 +144,8 @@ export class FindInput extends Widget {
142144
inputValidationErrorForeground: this.inputValidationErrorForeground,
143145
inputValidationErrorBorder: this.inputValidationErrorBorder,
144146
history,
145-
flexibleHeight
147+
flexibleHeight,
148+
flexibleMaxHeight
146149
}));
147150

148151
this.regex = this._register(new RegexCheckbox({

src/vs/editor/contrib/find/findWidget.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@
120120
width: 100%;
121121
}
122122

123+
.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical,
124+
.monaco-editor .find-widget .replace-input .monaco-scrollable-element .scrollbar.vertical {
125+
/* Hide vertical scrollbar */
126+
opacity: 0;
127+
}
128+
123129
.monaco-editor .find-widget .matchesCount {
124130
display: flex;
125131
display: -webkit-flex;

src/vs/editor/contrib/find/findWidget.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
888888
return { content: e.message };
889889
}
890890
},
891-
flexibleHeight: true
891+
flexibleHeight: true,
892+
flexibleMaxHeight: 118
892893
}, this._contextKeyService, true));
893894
this._findInput.setRegex(!!this._state.isRegex);
894895
this._findInput.setCaseSensitive(!!this._state.matchCase);
@@ -1014,7 +1015,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas
10141015
ariaLabel: NLS_REPLACE_INPUT_LABEL,
10151016
placeholder: NLS_REPLACE_INPUT_PLACEHOLDER,
10161017
history: [],
1017-
flexibleHeight: true
1018+
flexibleHeight: true,
1019+
flexibleMaxHeight: 118
10181020
}, this._contextKeyService));
10191021

10201022

0 commit comments

Comments
 (0)