From 4fa930c13d2a84fe8d4684dcc2bcd457dd1f9664 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Sun, 13 Feb 2022 00:37:48 -0500 Subject: [PATCH] encfs: Some UI fixes --- alert.cpp | 2 +- eink.qrc | 3 +- generaldialog.cpp | 16 +- resources/{eink_dark.qss => eink-dark.qss} | 0 resources/eink-square-encfs.qss | 391 +++++++++++++++++++++ 5 files changed, 406 insertions(+), 6 deletions(-) rename resources/{eink_dark.qss => eink-dark.qss} (100%) create mode 100644 resources/eink-square-encfs.qss diff --git a/alert.cpp b/alert.cpp index 8d2353b..d36c8f2 100644 --- a/alert.cpp +++ b/alert.cpp @@ -21,7 +21,7 @@ alert::alert(QWidget *parent) : float stdIconHeight = sH / 1.7; // General stylesheet - QFile stylesheetFile(":/resources/eink_dark.qss"); + QFile stylesheetFile(":/resources/eink-dark.qss"); stylesheetFile.open(QFile::ReadOnly); this->setStyleSheet(stylesheetFile.readAll()); stylesheetFile.close(); diff --git a/eink.qrc b/eink.qrc index f0d8a85..b1d55db 100644 --- a/eink.qrc +++ b/eink.qrc @@ -29,7 +29,7 @@ resources/battery_empty.png resources/battery_charging.png resources/alert.png - resources/eink_dark.qss + resources/eink-dark.qss resources/frontlight.png resources/fonts/CrimsonPro-Bold.ttf resources/fonts/CrimsonPro-Italic.ttf @@ -73,5 +73,6 @@ resources/cover_unavailable.png resources/clock-inverted.png resources/clock.png + resources/eink-square-encfs.qss diff --git a/generaldialog.cpp b/generaldialog.cpp index 6e68c06..5a3d772 100644 --- a/generaldialog.cpp +++ b/generaldialog.cpp @@ -25,10 +25,18 @@ generalDialog::generalDialog(QWidget *parent) : this->setModal(true); // Stylesheet, style & misc. - QFile stylesheetFile(":/resources/eink.qss"); - stylesheetFile.open(QFile::ReadOnly); - this->setStyleSheet(stylesheetFile.readAll()); - stylesheetFile.close(); + if(global::keyboard::encfsDialog == true) { + QFile stylesheetFile(":/resources/eink-square-encfs.qss"); + stylesheetFile.open(QFile::ReadOnly); + this->setStyleSheet(stylesheetFile.readAll()); + stylesheetFile.close(); + } + else { + QFile stylesheetFile(":/resources/eink.qss"); + stylesheetFile.open(QFile::ReadOnly); + this->setStyleSheet(stylesheetFile.readAll()); + stylesheetFile.close(); + } ui->okBtn->setProperty("type", "borderless"); ui->cancelBtn->setProperty("type", "borderless"); diff --git a/resources/eink_dark.qss b/resources/eink-dark.qss similarity index 100% rename from resources/eink_dark.qss rename to resources/eink-dark.qss diff --git a/resources/eink-square-encfs.qss b/resources/eink-square-encfs.qss new file mode 100644 index 0000000..713eb38 --- /dev/null +++ b/resources/eink-square-encfs.qss @@ -0,0 +1,391 @@ + +QPushButton[type="borderless"] +{ + background: white; + border: 0; + padding: 2px; + outline: none; + font-size: 10pt; +} + +QPushButton[type="borderless"]:focus +{ + border: 0; +} + +QPushButton[type="borderless"]:pressed +{ + background: black; + color: white; + border: none; +} + +QPushButton[type="bw"] +{ + background: white; + border: 0; + padding: 2px; + outline: none; + font-size: 10pt; +} +QPushButton[type="bw"]:focus +{ + border: 0; +} +QPushButton[type="bw"] +{ + background: black; + color: white; + border: none; +} + +QPushButton +{ + border-radius: 10px; +} + +QLabel[type="mangainfolabel"] +{ + font-weight: bold; + font-size: 10pt; +} + +QLabel[type="mangainfocontent"] +{ + font-size: 10pt; +} + +QFrame#listViewSources +{ + border: none; + font-size: 7pt; + outline: none; +} + +QListView#listViewMangas +{ + border: none; + padding: 8px; + font-size: 12pt; +} + +QFrame#listViewChapters +{ + border: none; + padding-top: 8px; + padding-bottom: 8px; + font-size: 12pt; +} + +QFrame#topButtonsFrame +{ + border-top: 1px solid black; + border-bottom: 1px solid black; +} + +QFrame#frameButtons +{ + border-top: 1px solid black; +} + +QListView::item:selected#listViewSources +{ + background: white; + color: black; +} + +QListView::item:focused#listViewSources +{ + background: white; + color: black; +} + +QFrame#frameProgress +{ + border: 1px solid black; +} + +QLineEdit#lineEditFilter +{ + border-top-left-radius: 5px; + border-bottom-left-radius: 5px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; + font-size: 12pt; +} + +QFrame#searchButtonFrame +{ + border-top-right-radius: 5px; + border-bottom-right-radius: 5px; + border:1px solid black; +} + +QPushButton#pushButtonFilterClear +{ + font-size: 16pt; +} + + +QWidget +{ + background-color: white; + selection-color: white; + selection-background-color: black; + font-size: 10pt; +} + +QMenu +{ + border: 1px solid black; + background-color:white; +} +QMenu::item::selected +{ + border-bottom: 5px solid black; +} +QMenu::item +{ + padding: 0px 25px 0px 20px; + border-bottom: 5px solid transparent; +} +QMenu::indicator +{ + width: 20px; + height: 20px; +} +QMenu::indicator:exclusive:checked +{ + image: url(:/images/icons/checkbox-checked.png); +} + +QCheckBox::indicator +{ + width: 20px; + height: 20px; + margin: 3px; + border: none; +} + +QCheckBox::indicator:checked +{ + image: url(:/resources/checkbox-checked.png); +} + +QCheckBox::indicator:unchecked +{ + image: url(:/resources/checkbox-unchecked.png); +} + + +QLineEdit, QSpinBox, QDoubleSpinBox +{ + background-color:white; + border:1px solid black; + padding: 2px; + border-radius: 10px; +} + +QLineEdit:focus, QSpinBox:focus, QDoubleSpinBox:focus +{ + border: 1px solid black; + padding: 1px; +} +QLineEdit:edit-focus, QSpinBox:edit-focus, QDoubleSpinBox:edit-focus +{ + border: 3px solid black; + padding: 0px; +} + +QTextEdit +{ + border: none; +} +QTextEdit:focus +{ + border: none; +} +QTextEdit:edit-focus +{ + border: none; +} + +QComboBox +{ + background-color:white; + border: 1.5px solid black; + border-radius: 0px; + padding-top: 3px; + padding-right: 0px; + padding-bottom: 3px; + padding-left: 5px; +} +QComboBox:focus +{ + border: 3px solid black; + padding-top: 1px; + padding-right: 0px; + padding-bottom: 1px; + padding-left: 3px; +} +QComboBox::drop-down +{ + border-width:1px; + border-radius: 0px; +} +QComboBox::down-arrow { + image:url(:/down-arrow.png); + padding-top: 2px; + padding-right: 5px; + padding-bottom: 2px; + padding-left: 0px; +} +QComboBox::down-arrow:focus +{ + padding-top: 0px; + padding-right: 0px; + padding-bottom: 0px; + padding-left: 0px; +} +QTreeView { + padding: 2px; + border: 1px solid black; + background: white; + outline: none; + font-size: 10pt; +} +QListView { + padding: 6px; + border: 1px solid black; + background: white; + outline: none; + font-size: 12pt; +} +QTreeView:focus, QTableView:focus { + padding: 1px; + border: 1px solid black; +} +QTreeView:edit-focus, QListView:edit-focus, QTableView:edit-focus { + padding: 0px; + border: 3px solid black; +} +QTreeView::branch:has-children:!has-siblings:closed, +QTreeView::branch:closed:has-children:has-siblings +{ + border-image: none; + image: url(:/plus.png); +} +QTreeView::branch:open:has-children:!has-siblings, +QTreeView::branch:open:has-children:has-siblings +{ + border-image: none; + image: url(:/minus.png); +} + +QPushButton +{ + background: white; + border: 3px solid black; + color: black; + padding: 2px; + outline: none; + font-size: 13pt; +} +QPushButton:focus { + border: 3px solid black; + padding: 2px; +} +QPushButton:pressed +{ + background: black; + color: white; + padding: 2px; +} + +QToolButton +{ + background: transparent; + border: none; + color: black; + padding: 2px; + outline: none; +} +QToolButton:checked +{ + border: none; +} + +QToolButton:focus { + border: none; + padding: 2px; +} +QToolButton:pressed { + border: none; + padding: 2px; +} + +QSlider::groove:horizontal { + border: 1.5px solid black; + border-radius: 0px; + height: 15px; + background: white; + margin: 0px 0; +} +QSlider::handle:horizontal { + background: black; + border: 1.5px solid black; + border-radius: 0px; + height: 15px; + width: 25px; + margin: 0px 0; +} + +QSlider::handle:horizontal::focus { + background: black; +} + +QScrollBar { + background: white; + border: 5px solid lightGrey; +} + +QScrollBar:vertical { + width: 25px +} +QScrollBar:horizontal { + height: 25px +} +QScrollBar::handle { + background: black; + min-width: 25px; + min-height: 25px; + border: 5px; +} +QScrollBar::add-line { + width: 0px; +} +QScrollBar::sub-line { + width: 0px; +} + +QDialog { + border: 5px solid black; + border-radius: 0px; + background: white; +} + +QProgressBar { + border: 1.5px solid black; + border-radius: 0px; + text-align: center; + background: white; + color: rgb(160, 160, 160); +} + +QProgressBar::chunk { + background: black; + color: white; + border-radius: 0px; +} + +