sub icons

This commit is contained in:
DavidXanatos 2022-08-20 14:48:18 +02:00
parent b2c669e04f
commit a8ac7aa362
25 changed files with 1147 additions and 1097 deletions

View File

@ -127,6 +127,7 @@ QWidget* CConfigDialog::ConvertToTree(QTabWidget* pTabWidget)
QTreeWidgetItem* pSubItem = new QTreeWidgetItem(QStringList() << pSubTabs->tabText(j));
pItem->addChild(pSubItem);
pSubItem->setData(0, Qt::UserRole, m_pStack->count());
pSubItem->setIcon(0, pSubTabs->tabIcon(j));
m_pStack->addWidget(pSubTabs->widget(j--));
}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -78,6 +78,25 @@
<file>Actions/Update.png</file>
<file>Actions/Install.png</file>
<file>Actions/Cert.png</file>
<file>Actions/File.png</file>
<file>Actions/Security.png</file>
<file>Actions/NoAccess.png</file>
<file>Actions/Entry.png</file>
<file>Actions/Pass.png</file>
<file>Actions/Fail.png</file>
<file>Actions/List.png</file>
<file>Actions/Network.png</file>
<file>Actions/Policy.png</file>
<file>Actions/Rules.png</file>
<file>Actions/ImmidiateRecovery.png</file>
<file>Actions/QuickRecovery.png</file>
<file>Actions/Accessibility.png</file>
<file>Actions/Miscellaneous.png</file>
<file>Actions/Fence.png</file>
<file>Actions/Trigger.png</file>
<file>Actions/Anon.png</file>
<file>Actions/Users.png</file>
<file>Actions/Bug.png</file>
</qresource>
<qresource prefix="/Boxes">
<file alias="Empty3">Boxes/sandbox-b-empty.png</file>

View File

@ -26,6 +26,10 @@ public:
//QTreeWidgetItem *itemFromIndex(const QModelIndex &index) const;
};
//////////////////////////////////////////////////////////////////////////
// ProgramsDelegate
class ProgramsDelegate : public QStyledItemDelegate {
public:
ProgramsDelegate(COptionsWindow* pOptions, QTreeWidget* pTree, int Column, QObject* parent = 0) : QStyledItemDelegate(parent) { m_pOptions = pOptions; m_pTree = pTree; m_Column = Column; }
@ -141,10 +145,11 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
this->setWindowFlag(Qt::WindowStaysOnTopHint, bAlwaysOnTop);
ui.setupUi(this);
this->setWindowTitle(tr("Sandboxie Plus - '%1' Options").arg(Name));
this->setWindowTitle(tr("Sandboxie Plus - '%1' Options").arg(QString(Name).replace("_", " ")));
ui.tabs->setTabPosition(QTabWidget::West);
ui.tabs->tabBar()->setStyle(new CustomTabStyle(ui.tabs->tabBar()->style()));
ui.tabs->tabBar()->setProperty("isSidebar", true);
//this->setMinimumHeight(490);
@ -350,6 +355,30 @@ COptionsWindow::COptionsWindow(const QSharedPointer<CSbieIni>& pBox, const QStri
if (iOptionTree == 2)
iOptionTree = iViewMode == 2 ? 1 : 0;
ui.tabsGeneral->setTabIcon(0, CSandMan::GetIcon("Box"));
ui.tabsGeneral->setTabIcon(1, CSandMan::GetIcon("File"));
ui.tabsGeneral->setTabIcon(2, CSandMan::GetIcon("Security"));
ui.tabsGeneral->setTabIcon(3, CSandMan::GetIcon("NoAccess"));
ui.tabsGeneral->setTabIcon(4, CSandMan::GetIcon("Run"));
ui.tabsInternet->setTabIcon(0, CSandMan::GetIcon("List"));
ui.tabsInternet->setTabIcon(1, CSandMan::GetIcon("Network"));
ui.tabsAccess->setTabIcon(0, CSandMan::GetIcon("Rules"));
ui.tabsAccess->setTabIcon(1, CSandMan::GetIcon("Policy"));
ui.tabsAdvanced->setTabIcon(0, CSandMan::GetIcon("Miscellaneous"));
ui.tabsAdvanced->setTabIcon(1, CSandMan::GetIcon("Fence"));
ui.tabsAdvanced->setTabIcon(2, CSandMan::GetIcon("Trigger"));
ui.tabsAdvanced->setTabIcon(3, CSandMan::GetIcon("Anon"));
ui.tabsAdvanced->setTabIcon(4, CSandMan::GetIcon("Users"));
ui.tabsAdvanced->setTabIcon(5, CSandMan::GetIcon("SetLogging"));
ui.tabsAdvanced->setTabIcon(6, CSandMan::GetIcon("Bug"));
ui.tabsTemplates->setTabIcon(0, CSandMan::GetIcon("Compatibility"));
ui.tabsTemplates->setTabIcon(1, CSandMan::GetIcon("Explore"));
ui.tabsTemplates->setTabIcon(2, CSandMan::GetIcon("Accessibility"));
if (iOptionTree)
OnSetTree();
else {

View File

@ -12,7 +12,7 @@
QSize CustomTabStyle::sizeFromContents(ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget) const {
QSize s = QProxyStyle::sizeFromContents(type, option, size, widget);
if (type == QStyle::CT_TabBarTab) {
if (type == QStyle::CT_TabBarTab && widget->property("isSidebar").toBool()) {
s.transpose();
if(theGUI->m_FusionTheme)
s.setHeight(s.height() * 13 / 10);
@ -24,7 +24,7 @@ QSize CustomTabStyle::sizeFromContents(ContentsType type, const QStyleOption* op
}
void CustomTabStyle::drawControl(ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget) const {
if (element == CE_TabBarTabLabel) {
if (element == CE_TabBarTabLabel && widget->property("isSidebar").toBool()) {
if (const QStyleOptionTab* tab = qstyleoption_cast<const QStyleOptionTab*>(option)) {
QStyleOptionTab opt(*tab);
opt.shape = QTabBar::RoundedNorth;
@ -114,6 +114,7 @@ CSettingsWindow::CSettingsWindow(QWidget* parent)
ui.tabs->setTabPosition(QTabWidget::West);
ui.tabs->tabBar()->setStyle(new CustomTabStyle(ui.tabs->tabBar()->style()));
ui.tabs->tabBar()->setProperty("isSidebar", true);
ui.tabs->setTabIcon(eOptions, CSandMan::GetIcon("Options"));
ui.tabs->setTabIcon(eShell, CSandMan::GetIcon("Shell"));