From ceaa04b0f4f675f6eac268c75cb4e4e941500b75 Mon Sep 17 00:00:00 2001 From: mjbudd77 Date: Thu, 23 Dec 2021 14:32:29 -0500 Subject: [PATCH] Minor draw fix for branches text. --- src/drivers/Qt/TasEditor/TasEditorWindow.cpp | 2 +- src/drivers/Qt/TasEditor/branches.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp index 9ccea1f7..8296519a 100644 --- a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp +++ b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp @@ -3710,7 +3710,7 @@ QPianoRoll::QPianoRoll(QWidget *parent) useDarkTheme = false; - viewWidth = 512; + viewWidth = 256; viewHeight = 512; setMinimumWidth( viewWidth ); setMinimumHeight( viewHeight ); diff --git a/src/drivers/Qt/TasEditor/branches.cpp b/src/drivers/Qt/TasEditor/branches.cpp index d7bb362f..5829665a 100644 --- a/src/drivers/Qt/TasEditor/branches.cpp +++ b/src/drivers/Qt/TasEditor/branches.cpp @@ -645,12 +645,13 @@ void BRANCHES::paintEvent(QPaintEvent *event) { int x,y; char txt[4]; + int visHeight; QPixmap spriteSheet(":/icons/branch_spritesheet.png"); QPainter painter(this); //viewWidth = event->rect().width(); - //viewHeight = event->rect().height(); + visHeight = event->rect().height(); // // draw background QLinearGradient linearGrad(QPointF(0, 0), QPointF(viewWidth, viewHeight)); @@ -893,7 +894,7 @@ void BRANCHES::paintEvent(QPaintEvent *event) { int x,y; x = 2 * pxBoxWidth; - y = viewHeight - (pxLineSpacing / 2); + y = visHeight - (pxLineSpacing / 2); if (bookmarks->itemUnderMouse == ITEM_UNDER_MOUSE_CLOUD) {