Skip to content

Commit 53e62d3

Browse files
committed
Custom mobile prefered style
1 parent 3b5a7fb commit 53e62d3

File tree

4 files changed

+25
-17
lines changed

4 files changed

+25
-17
lines changed

src/vs/base/browser/ui/dialog/dialog.css

+22-14
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
display: flex;
2626
flex-direction: column-reverse;
2727
width: min-content;
28-
min-width: 500px;
28+
width: 500px;
2929
max-width: 90vw;
3030
min-height: 75px;
3131
padding: 10px;
@@ -50,7 +50,7 @@
5050
padding: 0 10px;
5151
}
5252

53-
.monaco-dialog-box .dialog-message-row > .dialog-icon.codicon {
53+
.monaco-dialog-box .dialog-message-row>.dialog-icon.codicon {
5454
flex: 0 0 48px;
5555
height: 48px;
5656
align-self: baseline;
@@ -66,18 +66,22 @@
6666
padding-left: 24px;
6767
user-select: text;
6868
-webkit-user-select: text;
69-
word-wrap: break-word; /* never overflow long words, but break to next line */
69+
word-wrap: break-word;
70+
/* never overflow long words, but break to next line */
7071
white-space: normal;
7172
}
7273

7374
/** Dialog: Message */
7475
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message {
7576
line-height: 22px;
7677
font-size: 18px;
77-
flex: 1; /* let the message always grow */
78+
flex: 1;
79+
/* let the message always grow */
7880
white-space: normal;
79-
word-wrap: break-word; /* never overflow long words, but break to next line */
80-
min-height: 48px; /* matches icon height */
81+
word-wrap: break-word;
82+
/* never overflow long words, but break to next line */
83+
min-height: 48px;
84+
/* matches icon height */
8185
margin-bottom: 8px;
8286
display: flex;
8387
align-items: center;
@@ -86,7 +90,8 @@
8690
/** Dialog: Details */
8791
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message-detail {
8892
line-height: 22px;
89-
flex: 1; /* let the message always grow */
93+
flex: 1;
94+
/* let the message always grow */
9095
}
9196

9297
.monaco-dialog-box .dialog-message-row .dialog-message-container .dialog-message a:focus {
@@ -122,33 +127,36 @@
122127
}
123128

124129
/** Dialog: Buttons Row */
125-
.monaco-dialog-box > .dialog-buttons-row {
130+
.monaco-dialog-box>.dialog-buttons-row {
126131
display: flex;
127132
align-items: center;
128133
padding-right: 1px;
129-
overflow: hidden; /* buttons row should never overflow */
134+
overflow: hidden;
135+
/* buttons row should never overflow */
130136
}
131137

132-
.monaco-dialog-box > .dialog-buttons-row {
138+
.monaco-dialog-box>.dialog-buttons-row {
133139
display: flex;
134140
white-space: nowrap;
135141
padding: 20px 10px 10px;
136142
}
137143

138144
/** Dialog: Buttons */
139-
.monaco-dialog-box > .dialog-buttons-row > .dialog-buttons {
145+
.monaco-dialog-box>.dialog-buttons-row>.dialog-buttons {
140146
display: flex;
141147
width: 100%;
142148
justify-content: flex-end;
143149
overflow: hidden;
144-
margin-left: 67px; /* for long buttons, force align with text */
150+
margin-left: 67px;
151+
/* for long buttons, force align with text */
145152
}
146153

147-
.monaco-dialog-box > .dialog-buttons-row > .dialog-buttons > .monaco-button {
154+
.monaco-dialog-box>.dialog-buttons-row>.dialog-buttons>.monaco-button {
148155
width: fit-content;
149156
padding: 5px 10px;
150157
overflow: hidden;
151158
text-overflow: ellipsis;
152-
margin: 4px 5px; /* allows button focus outline to be visible */
159+
margin: 4px 5px;
160+
/* allows button focus outline to be visible */
153161
outline-offset: 2px !important;
154162
}

src/vs/code/browser/workbench/workbench-dev.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<link rel="apple-touch-icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/code-192.png" />
1515

1616
<!-- Disable pinch zooming -->
17-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
17+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, interactive-widget=resizes-content">
1818

1919
<!-- Workbench Configuration -->
2020
<meta id="vscode-workbench-web-configuration" data-settings="{{WORKBENCH_WEB_CONFIGURATION}}">

src/vs/code/browser/workbench/workbench.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<link rel="apple-touch-icon" href="{{WORKBENCH_WEB_BASE_URL}}/resources/server/code-192.png" />
1515

1616
<!-- Disable pinch zooming -->
17-
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
17+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, interactive-widget=resizes-content">
1818

1919
<!-- Workbench Configuration -->
2020
<meta id="vscode-workbench-web-configuration" data-settings="{{WORKBENCH_WEB_CONFIGURATION}}">

src/vs/platform/quickinput/browser/quickInputController.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ export class QuickInputController extends Disposable {
696696
this.ui.container.style.top = `${this.titleBarOffset}px`;
697697

698698
const style = this.ui.container.style;
699-
const width = Math.min(this.dimension!.width * 0.62 /* golden cut */, QuickInputController.MAX_WIDTH);
699+
const width = Math.min(this.dimension!.width * 0.9 /* golden cut */, QuickInputController.MAX_WIDTH);
700700
style.width = width + 'px';
701701
style.marginLeft = '-' + (width / 2) + 'px';
702702

0 commit comments

Comments
 (0)