mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
nicer sash cursor on mac
This commit is contained in:
parent
fe5ea709b1
commit
bc644c03aa
|
@ -31,4 +31,16 @@
|
|||
|
||||
.horizontal-cursor-container * {
|
||||
cursor: ns-resize !important;
|
||||
}
|
||||
|
||||
/** Custom Mac Cursor */
|
||||
|
||||
.monaco-sash.mac.vertical,
|
||||
.vertical-cursor-container-mac * {
|
||||
cursor: col-resize !important;
|
||||
}
|
||||
|
||||
.monaco-sash.mac.horizontal,
|
||||
.horizontal-cursor-container-mac * {
|
||||
cursor: row-resize !important;
|
||||
}
|
|
@ -9,6 +9,7 @@ import 'vs/css!./sash';
|
|||
import {IDisposable, dispose} from 'vs/base/common/lifecycle';
|
||||
import {Builder, $} from 'vs/base/browser/builder';
|
||||
import {isIPad} from 'vs/base/browser/browser';
|
||||
import {isMacintosh} from 'vs/base/common/platform';
|
||||
import types = require('vs/base/common/types');
|
||||
import DOM = require('vs/base/browser/dom');
|
||||
import {Gesture, EventType, GestureEvent} from 'vs/base/browser/touch';
|
||||
|
@ -61,6 +62,10 @@ export class Sash extends EventEmitter {
|
|||
|
||||
this.$e = $('.monaco-sash').appendTo(container);
|
||||
|
||||
if (isMacintosh) {
|
||||
this.$e.addClass('mac');
|
||||
}
|
||||
|
||||
this.gesture = new Gesture(this.$e.getHTMLElement());
|
||||
|
||||
this.$e.on(DOM.EventType.MOUSE_DOWN, (e: MouseEvent) => { this.onMouseDown(e); });
|
||||
|
@ -118,7 +123,7 @@ export class Sash extends EventEmitter {
|
|||
this.emit('start', startEvent);
|
||||
|
||||
let $window = $(window);
|
||||
let containerCssClass = `${this.getOrientation()}-cursor-container`;
|
||||
let containerCssClass = `${this.getOrientation()}-cursor-container${isMacintosh ? '-mac' : ''}`;
|
||||
|
||||
let lastCurrentX = startX;
|
||||
let lastCurrentY = startY;
|
||||
|
|
Loading…
Reference in a new issue