mirror of
https://github.com/atom/atom.git
synced 2026-01-27 07:47:58 -05:00
Don't show resize handle at all for collapsed docks
They no longer have any functionality. Themes can add extra affordances if they want.
This commit is contained in:
@@ -205,16 +205,11 @@ module.exports = class Dock {
|
||||
|
||||
const shouldBeVisible = state.visible || state.showDropTarget
|
||||
const size = Math.max(MINIMUM_SIZE, state.size == null ? this.getInitialSize() : state.size)
|
||||
const resizeHandleSize = this.resizeHandle.getSize()
|
||||
|
||||
// We need to change the size of the mask...
|
||||
this.maskElement.style[this.widthOrHeight] = `${shouldBeVisible ? size : resizeHandleSize}px`
|
||||
this.maskElement.style[this.widthOrHeight] = `${shouldBeVisible ? size : 0}px`
|
||||
// ...but the content needs to maintain a constant size.
|
||||
this.wrapperElement.style[this.widthOrHeight] = `${size}px`
|
||||
// ...and the non-absolutely positioned dock element should always be large enough to fit the
|
||||
// resize handle (so the handle doesn't cover the center).
|
||||
const minWidthOrHeight = this.widthOrHeight === 'width' ? 'minWidth' : 'minHeight'
|
||||
this.element.style[minWidthOrHeight] = `${resizeHandleSize}px`
|
||||
|
||||
this.resizeHandle.update({dockIsVisible: this.state.visible})
|
||||
this.toggleButton.update({
|
||||
|
||||
Reference in New Issue
Block a user