mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Code cleaning: remove unnecessary palette
This commit is contained in:
@ -27,10 +27,17 @@
|
||||
#include <QFileDialog>
|
||||
#include <QStandardPaths>
|
||||
#include <QMessageBox>
|
||||
#include <QPainter>
|
||||
|
||||
namespace pdfviewer
|
||||
{
|
||||
|
||||
constexpr const char* STYLESHEET =
|
||||
"QPushButton { background-color: #404040; color: #FFFFFF; }"
|
||||
"QPushButton:disabled { background-color: #404040; color: #000000; }"
|
||||
"QPushButton:checked { background-color: #808080; color: #FFFFFF; }"
|
||||
"QWidget#PDFSidebarWidget { background-color: #404040; background: green;}";
|
||||
|
||||
PDFSidebarWidget::PDFSidebarWidget(QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::PDFSidebarWidget),
|
||||
@ -42,6 +49,8 @@ PDFSidebarWidget::PDFSidebarWidget(QWidget* parent) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setStyleSheet(STYLESHEET);
|
||||
|
||||
// Outline
|
||||
QIcon bookmarkIcon(":/resources/bookmark.svg");
|
||||
m_outlineTreeModel = new pdf::PDFOutlineTreeItemModel(qMove(bookmarkIcon), this);
|
||||
@ -69,7 +78,6 @@ PDFSidebarWidget::PDFSidebarWidget(QWidget* parent) :
|
||||
m_pageInfo[Thumbnails] = { ui->thumbnailsButton, ui->thumbnailsPage };
|
||||
m_pageInfo[Attachments] = { ui->attachmentsButton, ui->attachmentsPage };
|
||||
|
||||
setAutoFillBackground(true);
|
||||
selectPage(Invalid);
|
||||
updateButtons();
|
||||
}
|
||||
@ -291,4 +299,11 @@ void PDFSidebarWidget::onAttachmentCustomContextMenuRequested(const QPoint& pos)
|
||||
}
|
||||
}
|
||||
|
||||
void PDFSidebarWidget::paintEvent(QPaintEvent* event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
QPainter painter(this);
|
||||
painter.fillRect(rect(), QColor(64, 64, 64));
|
||||
}
|
||||
|
||||
} // namespace pdfviewer
|
||||
|
Reference in New Issue
Block a user