Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
- [#991](#1163): Workspace right drawer doesn't handle floating corre…
Browse files Browse the repository at this point in the history
…ctly
  • Loading branch information
Edvin Syse committed Feb 17, 2020
1 parent 382f2ec commit 27ba781
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@

### Additions

## [1.7.21-SNAPSHOT]

### Fixed

- [#991](https://github.com/edvin/tornadofx/issues/1163): Workspace right drawer doesn't handle floating correctly

### Changes

### Additions

## [1.7.20]

### Fixed
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/tornadofx/Drawer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class Drawer(side: Side, multiselect: Boolean, floatingContent: Boolean) : Borde
if (change.wasAdded()) {
change.addedSubList.asSequence().mapEach { button }.forEach {
configureRotation(it)
buttonArea+= Group(it)
buttonArea += Group(it)
}
}
if (change.wasRemoved()) {
Expand Down Expand Up @@ -272,7 +272,10 @@ class Drawer(side: Side, multiselect: Boolean, floatingContent: Boolean) : Borde
super.layoutChildren()
if (floatingDrawers && contentArea.children.isNotEmpty()) {
val buttonBounds = buttonArea.layoutBounds
contentArea.resizeRelocate(buttonBounds.maxX, buttonBounds.minY, contentArea.prefWidth(-1.0), buttonBounds.height)
when (dockingSide) {
Side.RIGHT -> contentArea.resizeRelocate(buttonBounds.minX - contentArea.prefWidth(-1.0), buttonBounds.minY, contentArea.prefWidth(-1.0), buttonBounds.height)
else -> contentArea.resizeRelocate(buttonBounds.maxX, buttonBounds.minY, contentArea.prefWidth(-1.0), buttonBounds.height)
}
}
}
}
Expand Down

0 comments on commit 27ba781

Please sign in to comment.