Skip to content

Commit

Permalink
fix line number visibility in Orion dark (#3677)
Browse files Browse the repository at this point in the history
and alignment QLineEdit vs. QTextEdit
  • Loading branch information
octaeder authored May 27, 2024
1 parent 168572f commit 7fdba9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/pdfviewer/PDFDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3714,12 +3714,12 @@ void PDFDocument::loadCurrentFile(bool fillCache)
pdfWidget->setFocus();

// set page viewer only once
int maxDigits = 1 + qFloor(log10(pdfWidget->realNumPages()));
//if (maxDigits < 2) maxDigits = 2;
int maxDigits = 1 + qFloor(log10(pdfWidget->realNumPages()));
leCurrentPage->setMaxLength(maxDigits);
leCurrentPage->setFixedWidth(UtilsUi::getFmWidth(leCurrentPage->fontMetrics(), QString(maxDigits + 1, '#')));
int numWidth = UtilsUi::getFmWidth(leCurrentPage->fontMetrics(), QString(maxDigits, '#')) + 8;
leCurrentPage->setFixedWidth(numWidth);
leCurrentPageValidator->setTop(pdfWidget->realNumPages());
//qDebug() << pdfWidget->realNumPages() << maxDigits << UtilsUi::getFmWidth(leCurrentPage->fontMetrics(), QString(maxDigits + 1, '#'))<<QString(maxDigits + 1, '#');
// qDebug() << pdfWidget->realNumPages() << maxDigits << numWidth;

loadSyncData();
if (fillCache) {
Expand Down
2 changes: 1 addition & 1 deletion utilities/stylesheet_francesco.qss
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ QSlider:focus {

QLineEdit {
background-color: #232629;
padding: 5px;
padding: 2px;
border-style: solid;
border: 1px solid #76797C;
border-radius: 2px;
Expand Down

0 comments on commit 7fdba9e

Please sign in to comment.