Build 0.9.8
This commit is contained in:
parent
f695874b5b
commit
7590baa591
|
@ -36,6 +36,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||
- fixed Microsoft Edge complaining about "FakeAdminRights=y" [#1271](https://github.com/sandboxie-plus/Sandboxie/issues/1271)
|
||||
- fixed issue with using local template in the global section [#1212](https://github.com/sandboxie-plus/Sandboxie/issues/1212)
|
||||
- fixed issue with git.exe from MinGW freezing [#1238](https://github.com/sandboxie-plus/Sandboxie/issues/1238)
|
||||
- fixed issue with search highlighting when using in dark mode
|
||||
|
||||
|
||||
|
||||
|
@ -1272,3 +1273,4 @@ Fixed issue with Windows 7
|
|||
|
||||
### Fixed
|
||||
- fixed "Windows Installer Service could not be accessed" that got introduced with Windows 1903
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "stdafx.h"
|
||||
#include "Finder.h"
|
||||
|
||||
bool CFinder::m_DarkMode = false;
|
||||
|
||||
QWidget* CFinder::AddFinder(QWidget* pList, QObject* pFilterTarget, bool HighLightOption, CFinder** ppFinder)
|
||||
{
|
||||
QWidget* pWidget = new QWidget();
|
||||
|
|
|
@ -10,6 +10,9 @@ public:
|
|||
CFinder(QObject* pFilterTarget, QWidget *parent = NULL, bool HighLightOption = true);
|
||||
~CFinder();
|
||||
|
||||
static void SetDarkMode(bool bDarkMode) { m_DarkMode = bDarkMode; }
|
||||
static bool GetDarkMode() { return m_DarkMode; }
|
||||
|
||||
static QWidget* AddFinder(QWidget* pList, QObject* pFilterTarget, bool HighLightOption = true, CFinder** ppFinder = NULL);
|
||||
|
||||
QRegExp GetRegExp() const;
|
||||
|
@ -45,4 +48,6 @@ private:
|
|||
QSortFilterProxyModel* m_pSortProxy;
|
||||
|
||||
QTimer* m_pTimer;
|
||||
|
||||
static bool m_DarkMode;
|
||||
};
|
|
@ -2,6 +2,7 @@
|
|||
#include "PanelView.h"
|
||||
|
||||
bool CPanelView::m_SimpleFormat = false;
|
||||
bool CPanelView::m_DarkMode = false;
|
||||
int CPanelView::m_MaxCellWidth = 0;
|
||||
QString CPanelView::m_CellSeparator = "\t";
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ public:
|
|||
virtual ~CPanelView();
|
||||
|
||||
static void SetSimpleFormat(bool bSimple) { m_SimpleFormat = bSimple; }
|
||||
static void SetDarkMode(bool bDarkMode) { m_DarkMode = bDarkMode; }
|
||||
static void SetMaxCellWidth(int iMaxWidth) { m_MaxCellWidth = iMaxWidth; }
|
||||
static void SetCellSeparator(const QString& Sep) { m_CellSeparator = Sep; }
|
||||
|
||||
|
@ -54,6 +55,7 @@ protected:
|
|||
//bool m_CopyAll;
|
||||
QSet<int> m_ForcedColumns;
|
||||
static bool m_SimpleFormat;
|
||||
static bool m_DarkMode;
|
||||
static int m_MaxCellWidth;
|
||||
static QString m_CellSeparator;
|
||||
};
|
||||
|
@ -112,8 +114,10 @@ public:
|
|||
|
||||
static void ApplyFilter(QTreeWidgetEx* pTree, QTreeWidgetItem* pItem, const QRegExp& Exp/*, bool bHighLight = false, int Col = -1*/)
|
||||
{
|
||||
for (int j = 0; j < pTree->columnCount(); j++)
|
||||
pItem->setBackground(j, !Exp.isEmpty() && pItem->text(j).contains(Exp) ? Qt::yellow : Qt::white);
|
||||
for (int j = 0; j < pTree->columnCount(); j++) {
|
||||
pItem->setForeground(j, (m_DarkMode && !Exp.isEmpty() && pItem->text(j).contains(Exp)) ? Qt::yellow : pTree->palette().color(QPalette::WindowText));
|
||||
pItem->setBackground(j, (!m_DarkMode && !Exp.isEmpty() && pItem->text(j).contains(Exp)) ? Qt::yellow : pTree->palette().color(QPalette::Base));
|
||||
}
|
||||
|
||||
for (int i = 0; i < pItem->childCount(); i++)
|
||||
{
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "../mischelpers_global.h"
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QTreeView>
|
||||
#include "Finder.h"
|
||||
|
||||
class MISCHELPERS_EXPORT CSortFilterProxyModel: public QSortFilterProxyModel
|
||||
{
|
||||
|
@ -55,19 +56,19 @@ public:
|
|||
QVariant data(const QModelIndex &index, int role) const
|
||||
{
|
||||
QVariant Data = QSortFilterProxyModel::data(index, role);
|
||||
if (m_bHighLight && role == (CFinder::GetDarkMode() ? Qt::ForegroundRole : Qt::BackgroundRole))
|
||||
{
|
||||
if (!filterRegExp().isEmpty())
|
||||
{
|
||||
QString Key = QSortFilterProxyModel::data(index, filterRole()).toString();
|
||||
if (Key.contains(filterRegExp()))
|
||||
return QColor(Qt::yellow);
|
||||
}
|
||||
//return QColor(Qt::white);
|
||||
}
|
||||
|
||||
if (role == Qt::BackgroundRole)
|
||||
{
|
||||
if (m_bHighLight)
|
||||
{
|
||||
if (!filterRegExp().isEmpty())
|
||||
{
|
||||
QString Key = QSortFilterProxyModel::data(index, filterRole()).toString();
|
||||
if (Key.contains(filterRegExp()))
|
||||
return QColor(Qt::yellow);
|
||||
}
|
||||
return QColor(Qt::white);
|
||||
}
|
||||
|
||||
if (m_bAlternate && !Data.isValid())
|
||||
{
|
||||
if (0 == index.row() % 2)
|
||||
|
|
|
@ -2236,6 +2236,8 @@ void CSandMan::SetUITheme()
|
|||
CTreeItemModel::SetDarkMode(bDark);
|
||||
CListItemModel::SetDarkMode(bDark);
|
||||
CPopUpWindow::SetDarkMode(bDark);
|
||||
CPanelView::SetDarkMode(bDark);
|
||||
CFinder::SetDarkMode(bDark);
|
||||
}
|
||||
|
||||
void CSandMan::UpdateTheme()
|
||||
|
|
|
@ -99,9 +99,9 @@ CSelectBoxWindow::CSelectBoxWindow(const QStringList& Commands, const QString& B
|
|||
QMap<QString, QStringList> Groups = theGUI->GetBoxView()->GetGroups();
|
||||
|
||||
if (theConf->GetBool("MainWindow/BoxTree_UseOrder", false)) {
|
||||
QMap<double, CSandBoxPtr> Boxes2;
|
||||
QMultiMap<double, CSandBoxPtr> Boxes2;
|
||||
foreach(const CSandBoxPtr &pBox, Boxes) {
|
||||
Boxes2.insert(CSelectBoxWindow__GetBoxOrder(Groups, pBox->GetName()), pBox);
|
||||
Boxes2.insertMulti(CSelectBoxWindow__GetBoxOrder(Groups, pBox->GetName()), pBox);
|
||||
}
|
||||
Boxes = Boxes2.values();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue