mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-30 15:32:37 +00:00
Fixed a resize issue in ConsoleLayout where a rounding error could lead to
an incorrect log window size.
This commit is contained in:
parent
935bf6833a
commit
bfd6a80e96
@ -87,19 +87,22 @@ ConsoleLayout::~ConsoleLayout() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleLayout::Layout() {
|
void ConsoleLayout::Layout() {
|
||||||
int cx = this->GetWidth();
|
const int cx = this->GetWidth();
|
||||||
int cy = this->GetHeight();
|
const int cy = this->GetHeight();
|
||||||
int x = this->GetX();
|
const int x = this->GetX();
|
||||||
int y = this->GetY();
|
const int y = this->GetY();
|
||||||
|
|
||||||
|
const int leftCx = cx / 2;
|
||||||
|
const int rightCx = cx - leftCx;
|
||||||
|
|
||||||
/* top left */
|
/* top left */
|
||||||
this->output->MoveAndResize(x, y, cx / 2, cy - 3);
|
this->output->MoveAndResize(x, y, leftCx, cy - 3);
|
||||||
|
|
||||||
/* bottom left */
|
/* bottom left */
|
||||||
this->commands->MoveAndResize(x, cy - 3, cx / 2, 3);
|
this->commands->MoveAndResize(x, cy - 3, leftCx, 3);
|
||||||
|
|
||||||
/* right */
|
/* right */
|
||||||
this->logs->MoveAndResize(cx / 2, 0, cx / 2, cy);
|
this->logs->MoveAndResize(cx / 2, 0, rightCx, cy);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleLayout::SetShortcutsWindow(ShortcutsWindow* shortcuts) {
|
void ConsoleLayout::SetShortcutsWindow(ShortcutsWindow* shortcuts) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user