@ray-js/ipc-player-integration 0.0.49-beta.0 → 0.0.49-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ui/bottomLeftContent.js +9 -3
- package/lib/ui/ui.less +4 -3
- package/package.json +1 -1
|
@@ -11,6 +11,9 @@ import { pauseTimeToHideAllComponent, startTimeToHideAllComponent } from './cons
|
|
|
11
11
|
|
|
12
12
|
// 用唯一 className 在 createSelectorQuery 中区分多个实例,避免互相干扰
|
|
13
13
|
let scrollClsSeq = 0;
|
|
14
|
+
|
|
15
|
+
// 竖屏下单个 widget 的占位宽度:icon 22px(--iconPlayerSize) + .bottom-left-item-container 左右各 12px
|
|
16
|
+
const VERTICAL_WIDGET_WIDTH = 46;
|
|
14
17
|
const BottomLeftContent = _ref => {
|
|
15
18
|
let {
|
|
16
19
|
ctx,
|
|
@@ -215,8 +218,11 @@ const BottomLeftContent = _ref => {
|
|
|
215
218
|
// 竖屏 button 模式给 ScrollView 右侧留一条较窄的“箭头槽”:只裁掉内容最右一小段,
|
|
216
219
|
// 箭头压住最后一个元素的少量边缘(不完全遮挡),整体更贴近内容
|
|
217
220
|
const arrowGutter = isButtonHint && screenType === 'vertical' ? 12 : 0;
|
|
218
|
-
//
|
|
219
|
-
const
|
|
221
|
+
// 竖屏再额外收窄一个 widget 的宽度,让可滑动区域整体左缩一格
|
|
222
|
+
const verticalShrink = screenType === 'vertical' ? VERTICAL_WIDGET_WIDTH : 0;
|
|
223
|
+
const scrollShrink = arrowGutter + verticalShrink;
|
|
224
|
+
// 箭头贴滚动可视区右边缘放置(竖屏 4px / 横屏 6px),随收窄量一起左移
|
|
225
|
+
const hintRight = (arrowGutter > 0 ? 4 : 6) + verticalShrink;
|
|
220
226
|
return /*#__PURE__*/React.createElement(CoverView, {
|
|
221
227
|
className: clsx('ipc-player-bottom-left-content-wrap'),
|
|
222
228
|
style: {
|
|
@@ -280,7 +286,7 @@ const BottomLeftContent = _ref => {
|
|
|
280
286
|
paddingBottom: `${paddingBottomPx}px`,
|
|
281
287
|
paddingLeft: `${paddingLeftPx}px`,
|
|
282
288
|
paddingRight: `${paddingRightPx}px`,
|
|
283
|
-
width:
|
|
289
|
+
width: scrollShrink > 0 ? `calc(100% - ${scrollShrink}px)` : '100%',
|
|
284
290
|
height: `${containerHeight}px`,
|
|
285
291
|
marginTop: showBadge ? '-2px' : 0,
|
|
286
292
|
whiteSpace: 'nowrap'
|
package/lib/ui/ui.less
CHANGED
|
@@ -262,16 +262,17 @@
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
// 右上角子元素容器
|
|
265
|
+
// 每侧 4px,相邻两项之间净间距 8px
|
|
265
266
|
.top-right-item-container {
|
|
266
|
-
padding: 0
|
|
267
|
+
padding: 0 4px;
|
|
267
268
|
}
|
|
268
269
|
|
|
269
270
|
.top-right-item-container:first-of-type {
|
|
270
|
-
padding: 0
|
|
271
|
+
padding: 0 4px 0 0;
|
|
271
272
|
}
|
|
272
273
|
|
|
273
274
|
.top-right-item-container:last-of-type {
|
|
274
|
-
padding: 0 16px 0
|
|
275
|
+
padding: 0 16px 0 4px;
|
|
275
276
|
}
|
|
276
277
|
|
|
277
278
|
.top-right-item-container:only-of-type {
|