提交 c701f96a 编写于 作者: I isidor

Fix debug widget drag handle

fixes #16604
上级 524150b9
......@@ -141,14 +141,12 @@ export class DebugActionsWidget implements IWorkbenchContribution {
if (!this.isVisible) {
return;
}
if (!x) {
if (x === undefined) {
x = parseFloat(this.storageService.get(DEBUG_ACTIONS_WIDGET_POSITION_KEY, StorageScope.WORKSPACE, '0.5')) * window.innerWidth;
}
const halfWidgetWidth = this.$el.getHTMLElement().clientWidth / 2;
x = x + halfWidgetWidth - 16; // take into account half the size of the widget
x = Math.max(148, x); // do not allow the widget to overflow on the left
x = Math.min(x, window.innerWidth - halfWidgetWidth - 10); // do not allow the widget to overflow on the right
const widgetWidth = this.$el.getHTMLElement().clientWidth;
x = Math.min(x, window.innerWidth - widgetWidth); // do not allow the widget to overflow on the right
this.$el.style('left', `${x}px`);
}
......
......@@ -9,11 +9,8 @@
background-color: #F3F3F3;
box-shadow: 0 5px 8px #A8A8A8;
position: absolute;
top: 0;
z-index: 200;
height: 32px;
left: 50%;
margin-left: -96px;
display: flex;
padding-left: 7px;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册