提交 10df2938 编写于 作者: I isidor

Debug toolbar: grab / grabbing cursor

fixes #7845
上级 8a4bdea8
...@@ -85,6 +85,7 @@ export class DebugActionsWidget implements wbext.IWorkbenchContribution { ...@@ -85,6 +85,7 @@ export class DebugActionsWidget implements wbext.IWorkbenchContribution {
this.dragArea.on(dom.EventType.MOUSE_DOWN, event => { this.dragArea.on(dom.EventType.MOUSE_DOWN, event => {
const $window = $(window); const $window = $(window);
this.dragArea.addClass('dragged');
$window.on('mousemove', (e: MouseEvent) => { $window.on('mousemove', (e: MouseEvent) => {
const mouseMoveEvent = new StandardMouseEvent(e); const mouseMoveEvent = new StandardMouseEvent(e);
...@@ -92,6 +93,7 @@ export class DebugActionsWidget implements wbext.IWorkbenchContribution { ...@@ -92,6 +93,7 @@ export class DebugActionsWidget implements wbext.IWorkbenchContribution {
}).once('mouseup', (e: MouseEvent) => { }).once('mouseup', (e: MouseEvent) => {
const mouseMoveEvent = new StandardMouseEvent(e); const mouseMoveEvent = new StandardMouseEvent(e);
this.storageService.store(DEBUG_ACTIONS_WIDGET_POSITION_KEY, mouseMoveEvent.posx / window.innerWidth, StorageScope.WORKSPACE); this.storageService.store(DEBUG_ACTIONS_WIDGET_POSITION_KEY, mouseMoveEvent.posx / window.innerWidth, StorageScope.WORKSPACE);
this.dragArea.removeClass('dragged');
$window.off('mousemove'); $window.off('mousemove');
}); });
}); });
......
...@@ -135,12 +135,16 @@ ...@@ -135,12 +135,16 @@
} }
.monaco-workbench .debug-actions-widget .drag-area { .monaco-workbench .debug-actions-widget .drag-area {
cursor: -webkit-grabbing; cursor: -webkit-grab;
height: 32px; height: 32px;
width: 10px; width: 10px;
background: url('drag.svg') center center no-repeat; background: url('drag.svg') center center no-repeat;
} }
.monaco-workbench .debug-actions-widget .drag-area.dragged {
cursor: -webkit-grabbing;
}
.monaco-workbench .debug-actions-widget .monaco-action-bar .action-label { .monaco-workbench .debug-actions-widget .monaco-action-bar .action-label {
width: 32px; width: 32px;
height: 32px; height: 32px;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册