Skip to content

Commit

Permalink
PrintOffset now a config by user
Browse files Browse the repository at this point in the history
The offset amount can variety depending on font size so it's a endless journey

It's best adjusted by user
  • Loading branch information
mhtvsSFrpHdE committed Aug 31, 2022
1 parent 87a783a commit c2eb933
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion qpp/prefetch/Source/Interface/MainWindow/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),
startToTray = Setting::getBool("Instance", "StartToTray", Setting::setting);
minimizeToTray = Setting::getBool("Instance", "MinimizeToTray", Setting::setting);

auto getPrintOffset = Setting::getInt("Instance", "PrintOffset", Setting::setting);
printOffset = getPrintOffset.result;

// Zoom
Dpi::scale_qMainWindow(this);
Dpi::scale_qWidgetRect(ui->stdOut_plainTextEdit);
Expand Down Expand Up @@ -66,7 +69,9 @@ void MainWindow::scrollBarToBottom_slot()

// Fix scroll bar position
// Default maximum will left two empty line in text view
scrollBarMaxSize = scrollBarMaxSize - 2;
//
// On DPI zoom 200%, size - 2 seems too much for text
scrollBarMaxSize = scrollBarMaxSize - printOffset;
scrollBar->setValue(scrollBarMaxSize);
}

Expand Down

0 comments on commit c2eb933

Please sign in to comment.