зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1254390 - Flexible sizing for device selector to display full device names; r=gl
This commit is contained in:
Родитель
469cee9bad
Коммит
8f1b54dd02
|
@ -79,6 +79,7 @@ module.exports = createClass({
|
||||||
if (state == Types.deviceListState.LOADED) {
|
if (state == Types.deviceListState.LOADED) {
|
||||||
listContent = [dom.option({
|
listContent = [dom.option({
|
||||||
value: "",
|
value: "",
|
||||||
|
title: "",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
}, getStr("responsive.noDeviceSelected")),
|
}, getStr("responsive.noDeviceSelected")),
|
||||||
|
@ -86,20 +87,24 @@ module.exports = createClass({
|
||||||
return dom.option({
|
return dom.option({
|
||||||
key: device.name,
|
key: device.name,
|
||||||
value: device.name,
|
value: device.name,
|
||||||
|
title: "",
|
||||||
}, device.name);
|
}, device.name);
|
||||||
}),
|
}),
|
||||||
dom.option({
|
dom.option({
|
||||||
value: OPEN_DEVICE_MODAL_VALUE,
|
value: OPEN_DEVICE_MODAL_VALUE,
|
||||||
|
title: "",
|
||||||
}, getStr("responsive.editDeviceList"))];
|
}, getStr("responsive.editDeviceList"))];
|
||||||
} else if (state == Types.deviceListState.LOADING
|
} else if (state == Types.deviceListState.LOADING
|
||||||
|| state == Types.deviceListState.INITIALIZED) {
|
|| state == Types.deviceListState.INITIALIZED) {
|
||||||
listContent = [dom.option({
|
listContent = [dom.option({
|
||||||
value: "",
|
value: "",
|
||||||
|
title: "",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
}, getStr("responsive.deviceListLoading"))];
|
}, getStr("responsive.deviceListLoading"))];
|
||||||
} else if (state == Types.deviceListState.ERROR) {
|
} else if (state == Types.deviceListState.ERROR) {
|
||||||
listContent = [dom.option({
|
listContent = [dom.option({
|
||||||
value: "",
|
value: "",
|
||||||
|
title: "",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
}, getStr("responsive.deviceListError"))];
|
}, getStr("responsive.deviceListError"))];
|
||||||
}
|
}
|
||||||
|
@ -108,6 +113,7 @@ module.exports = createClass({
|
||||||
{
|
{
|
||||||
className: selectClass,
|
className: selectClass,
|
||||||
value: selectedDevice,
|
value: selectedDevice,
|
||||||
|
title: selectedDevice,
|
||||||
onChange: this.onSelectChange,
|
onChange: this.onSelectChange,
|
||||||
disabled: (state !== Types.deviceListState.LOADED),
|
disabled: (state !== Types.deviceListState.LOADED),
|
||||||
},
|
},
|
||||||
|
|
|
@ -177,17 +177,18 @@ html, body {
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
background-color: var(--theme-toolbar-background);
|
background-color: var(--theme-toolbar-background);
|
||||||
background-image: var(--viewport-selection-arrow);
|
background-image: var(--viewport-selection-arrow);
|
||||||
background-position: 136px;
|
background-position: 100% 52%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-size: 7px;
|
background-size: 7px;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--viewport-color);
|
color: var(--viewport-color);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 16px 0 0;
|
padding: 0 8px 0 8px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
width: -moz-fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewport-device-selector.selected {
|
.viewport-device-selector.selected {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче