mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-18 17:25:19 -04:00
Automatically select dark colors for BootGuard markings in dark mode
This commit is contained in:
parent
ef7ceefa41
commit
944133caa7
3 changed files with 23 additions and 12 deletions
|
@ -96,13 +96,14 @@ class TreeModel : public QAbstractItemModel
|
|||
private:
|
||||
TreeItem *rootItem;
|
||||
bool markingEnabledFlag;
|
||||
bool markingDarkModeFlag;
|
||||
|
||||
public:
|
||||
QVariant data(const UModelIndex &index, int role) const;
|
||||
Qt::ItemFlags flags(const UModelIndex &index) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation,
|
||||
int role = Qt::DisplayRole) const;
|
||||
TreeModel(QObject *parent = 0) : QAbstractItemModel(parent), markingEnabledFlag(true) {
|
||||
TreeModel(QObject *parent = 0) : QAbstractItemModel(parent), markingEnabledFlag(true), markingDarkModeFlag(false) {
|
||||
rootItem = new TreeItem(0, Types::Root, 0, UString(), UString(), UString(), UByteArray(), UByteArray(), UByteArray(), true, false);
|
||||
}
|
||||
|
||||
|
@ -114,6 +115,7 @@ class TreeModel
|
|||
private:
|
||||
TreeItem *rootItem;
|
||||
bool markingEnabledFlag;
|
||||
bool markingDarkModeFlag;
|
||||
|
||||
void dataChanged(const UModelIndex &, const UModelIndex &) {}
|
||||
void layoutAboutToBeChanged() {}
|
||||
|
@ -143,6 +145,9 @@ public:
|
|||
bool markingEnabled() { return markingEnabledFlag; }
|
||||
void setMarkingEnabled(const bool enabled);
|
||||
|
||||
bool markingDarkMode() { return markingDarkModeFlag; }
|
||||
void setMarkingDarkMode(const bool enabled);
|
||||
|
||||
UModelIndex index(int row, int column, const UModelIndex &parent = UModelIndex()) const;
|
||||
UModelIndex parent(const UModelIndex &index) const;
|
||||
int rowCount(const UModelIndex &parent = UModelIndex()) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue