diff --git a/SandboxiePlus/MiscHelpers/Common/SettingsWidgets.cpp b/SandboxiePlus/MiscHelpers/Common/SettingsWidgets.cpp index 71cb9750..ee567a41 100644 --- a/SandboxiePlus/MiscHelpers/Common/SettingsWidgets.cpp +++ b/SandboxiePlus/MiscHelpers/Common/SettingsWidgets.cpp @@ -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--)); } } diff --git a/SandboxiePlus/SandMan/Forms/OptionsWindow.ui b/SandboxiePlus/SandMan/Forms/OptionsWindow.ui index e98268a4..72e35055 100644 --- a/SandboxiePlus/SandMan/Forms/OptionsWindow.ui +++ b/SandboxiePlus/SandMan/Forms/OptionsWindow.ui @@ -53,7 +53,7 @@ - + 0 @@ -1218,7 +1218,7 @@ If leader processes are defined, all others are treated as lingering processes.< - + 0 @@ -1485,7 +1485,7 @@ If leader processes are defined, all others are treated as lingering processes.< - + 0 @@ -1922,947 +1922,89 @@ The process match level has a higher priority than the specificity and describes - - - - 50 - false - true - - - - 0 - - - - - 50 - false - true - - - - Miscellaneous - - - - - - - - Emulate sandboxed window station for all processes - - - - - - - Drop critical privileges from processes running with a SYSTEM token - - - - - - - Add sandboxed processes to job objects (recommended) - - - - - - - Do not start sandboxed services using a system token (recommended) - - - - - - - Protect sandboxed SYSTEM processes from unprivileged processes - - - - - - - Open access to COM infrastructure (not recommended) - - - - - - - Allow only privileged processes to access the Service Control Manager - - - - - - - Force usage of custom dummy Manifest files (legacy behaviour) - - - - - - - - 75 - true - true - - - - (Security Critical) - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Start the sandboxed RpcSs as a SYSTEM process (not recommended) - - - - - - - Don't alter window class names created by sandboxed programs - - - - - - - - 75 - true - true - - - - Compatibility - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - 75 - true - true - - - - (Security Critical) - - - - - - - - 75 - true - true - - - - Protect the sandbox integrity itself - - - Sandbox isolation - - - - - - - - 75 - true - true - - - - Protect the sandbox integrity itself - - - COM/RPC - - - - - - - Allow use of nested job objects (works on Windows 8 and later) - - - - - - - Disable the use of RpcMgmtSetComTimeout by default (this may resolve compatibility issues) - - - - - - - - - - Isolation - - - - - - - - Security Isolation through the usage of a heavily restricted process token is Sandboxie's primary means of enforcing sandbox restrictions, when this is disabled the box is operated in the application compartment mode, i.e. it’s no longer providing reliable security, just simple application compartmentalization. - - - true - - - - - - - Open access to Windows Local Security Authority - - - - - - - Allow sandboxed programs to manage Hardware/Devices - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Disable Security Isolation (experimental) - - - - - - - Various advanced isolation features can break compatibility with some applications. If you are using this sandbox <b>NOT for Security</b> but for simple application portability, by changing these options you can restore compatibility by sacrificing some security. - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Open access to Windows Security Account Manager - - - - - - - - 75 - true - true - - - - Protect the sandbox integrity itself - - - Security Isolation & Filtering - - - - - - - Disable Security Filtering (not recommended) - - - - - - - Security Filtering used by Sandboxie to enforce filesystem and registry access restrictions, as well as to restrict process access. - - - true - - - - - - - The below options can be used safely when you don't grant admin rights. - - - true - - - - - - - - 75 - true - true - - - - Protect the sandbox integrity itself - - - Access isolation - - - - - - - - - - Triggers - - - - - - Qt::Vertical + + + + 50 + false + true + + + + 0 + + + + + 50 + false + true + + + + Miscellaneous + + + + + + + + Emulate sandboxed window station for all processes - - - 20 - 40 - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - + - - - - 0 - 0 - - - - - 0 - 23 - - + - Remove - - - - - - - - Event - - - - - Action - - - - - - - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - Run Command - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - Start Service - - - - - - - These events are executed each time a box is started - - - On Box Start - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - Run Command + Drop critical privileges from processes running with a SYSTEM token - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - These commands are run UNBOXED just before the box content is deleted - + - On Box Delete - - - Qt::AlignCenter + Add sandboxed processes to job objects (recommended) - - - - 0 - 0 - - - - - 0 - 23 - - + - Run Command - - - - - - - These commands are executed only when a box is initialized. To make them run again, the box content must be deleted. - - - On Box Init - - - Qt::AlignCenter - - - - - - - Here you can specify actions to be executed automatically on various box events. - - - true + Do not start sandboxed services using a system token (recommended) - + - Show Templates + Protect sandboxed SYSTEM processes from unprivileged processes - - - - - - 50 - false - true - - - - Hide Processes - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - + + - Add Process + Open access to COM infrastructure (not recommended) - - - - - + + - Hide host processes from processes running in the sandbox. - - - true + Allow only privileged processes to access the Service Control Manager - - + + - Remove + Force usage of custom dummy Manifest files (legacy behaviour) - - - - Don't allow sandboxed processes to see processes running in other boxes - - - - - - - - - 50 - false - true - - - - Users - - - - - - Restrict Resource Access monitor to administrators only - - - - - - - Add User - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - Remove User - - - - - - - Add user accounts and user groups to the list below to limit use of the sandbox to only those accounts. If the list is empty, the sandbox can be used by all user accounts. - -Note: Forced Programs and Force Folders settings for a sandbox do not apply to user accounts which cannot use the sandbox. - - - true - - - - - - - - Tracing - - - - - - - - API call trace (requires LogAPI to be installed in the Sbie directory) - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Pipe Trace - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Log all SetError's to Trace log (creates a lot of output) - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Log Debug Output to the Trace Log - - - - - - - Log all access events as seen by the driver to the resource access log. - -This options set the event mask to "*" - All access events -You can customize the logging using the ini by specifying -"A" - Allowed accesses -"D" - Denied accesses -"I" - Ignore access requests -instead of "*". - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - true - - - - - - - Ntdll syscall Trace (creates a lot of output) - - - - - - - File Trace - - - - - - - Disable Resource Access Monitor - - - - - - - IPC Trace - - - - - - - GUI Trace - - - - - - - - 75 - true - true - - - - Resource Access Monitor - - - - - - - - 20 - 16777215 - - - - - - - - - - - - 75 - true - true - - - - Access Tracing - - - - - - - COM Class Trace - - - - - - - Key Trace - - - - - - - Network Firewall - - - - - - - - - - - 50 - false - true - - - - Debug - - - - - - true - - - - - 0 - 0 - 80 - 16 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - + + 75 @@ -2871,28 +2013,886 @@ instead of "*". - WARNING, these options can disable core security guarantees and break sandbox security!!! + (Security Critical) - - true + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Start the sandboxed RpcSs as a SYSTEM process (not recommended) + + + + + + + Don't alter window class names created by sandboxed programs - + + + + 75 + true + true + + - These options are intended for debugging compatibility issues, please do not use them in production use. + Compatibility + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 75 + true + true + + + + (Security Critical) + + + + + + + + 75 + true + true + + + + Protect the sandbox integrity itself + + + Sandbox isolation + + + + + + + + 75 + true + true + + + + Protect the sandbox integrity itself + + + COM/RPC + + + + + + + Allow use of nested job objects (works on Windows 8 and later) + + + + + + + Disable the use of RpcMgmtSetComTimeout by default (this may resolve compatibility issues) + + + + + + + + + + Isolation + + + + + + + + Security Isolation through the usage of a heavily restricted process token is Sandboxie's primary means of enforcing sandbox restrictions, when this is disabled the box is operated in the application compartment mode, i.e. it’s no longer providing reliable security, just simple application compartmentalization. true + + + + Open access to Windows Local Security Authority + + + + + + + Allow sandboxed programs to manage Hardware/Devices + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Disable Security Isolation (experimental) + + + + + + + Various advanced isolation features can break compatibility with some applications. If you are using this sandbox <b>NOT for Security</b> but for simple application portability, by changing these options you can restore compatibility by sacrificing some security. + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Open access to Windows Security Account Manager + + + + + + + + 75 + true + true + + + + Protect the sandbox integrity itself + + + Security Isolation & Filtering + + + + + + + Disable Security Filtering (not recommended) + + + + + + + Security Filtering used by Sandboxie to enforce filesystem and registry access restrictions, as well as to restrict process access. + + + true + + + + + + + The below options can be used safely when you don't grant admin rights. + + + true + + + + + + + + 75 + true + true + + + + Protect the sandbox integrity itself + + + Access isolation + + + - - - - + + + + + + Triggers + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 0 + 23 + + + + Remove + + + + + + + + Event + + + + + Action + + + + + + + + + + + + + + 0 + 0 + + + + + 0 + 23 + + + + Run Command + + + + + + + + 0 + 0 + + + + + 0 + 23 + + + + Start Service + + + + + + + These events are executed each time a box is started + + + On Box Start + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 0 + 23 + + + + Run Command + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + These commands are run UNBOXED just before the box content is deleted + + + On Box Delete + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 0 + 23 + + + + Run Command + + + + + + + These commands are executed only when a box is initialized. To make them run again, the box content must be deleted. + + + On Box Init + + + Qt::AlignCenter + + + + + + + Here you can specify actions to be executed automatically on various box events. + + + true + + + + + + + Show Templates + + + + + + + + + 50 + false + true + + + + Hide Processes + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Add Process + + + + + + + + + + Hide host processes from processes running in the sandbox. + + + true + + + + + + + Remove + + + + + + + Don't allow sandboxed processes to see processes running in other boxes + + + + + + + + + 50 + false + true + + + + Users + + + + + + Restrict Resource Access monitor to administrators only + + + + + + + Add User + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Remove User + + + + + + + Add user accounts and user groups to the list below to limit use of the sandbox to only those accounts. If the list is empty, the sandbox can be used by all user accounts. + +Note: Forced Programs and Force Folders settings for a sandbox do not apply to user accounts which cannot use the sandbox. + + + true + + + + + + + + Tracing + + + + + + + + API call trace (requires LogAPI to be installed in the Sbie directory) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Pipe Trace + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Log all SetError's to Trace log (creates a lot of output) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Log Debug Output to the Trace Log + + + + + + + Log all access events as seen by the driver to the resource access log. + +This options set the event mask to "*" - All access events +You can customize the logging using the ini by specifying +"A" - Allowed accesses +"D" - Denied accesses +"I" - Ignore access requests +instead of "*". + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + true + + + + + + + Ntdll syscall Trace (creates a lot of output) + + + + + + + File Trace + + + + + + + Disable Resource Access Monitor + + + + + + + IPC Trace + + + + + + + GUI Trace + + + + + + + + 75 + true + true + + + + Resource Access Monitor + + + + + + + + 20 + 16777215 + + + + + + + + + + + + 75 + true + true + + + + Access Tracing + + + + + + + COM Class Trace + + + + + + + Key Trace + + + + + + + Network Firewall + + + + + + + + + + + 50 + false + true + + + + Debug + + + + + + true + + + + + 0 + 0 + 98 + 28 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + 75 + true + true + + + + WARNING, these options can disable core security guarantees and break sandbox security!!! + + + true + + + + + + + These options are intended for debugging compatibility issues, please do not use them in production use. + + + true + + + + + + + + @@ -2900,190 +2900,190 @@ instead of "*". - - - 0 - - - - Compatibility Templates - - - - - - - - Filter Categories - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - Text Filter - - - - - - - Add Template - - - - - - - This list contains a large amount of sandbox compatibility enhancing templates - - - true - - - - - - - - - - Remove Template - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - true - - - - Category - - - - - Name - - - - - + + + 0 + + + + Compatibility Templates + + + + + + + + Filter Categories + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Text Filter + + + + + + + Add Template + + + + + + + This list contains a large amount of sandbox compatibility enhancing templates + + + true + + + + + + + + + + Remove Template + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + true + + + + Category + + + + + Name + + + - - - - Template Folders - - + + + + + + Template Folders + + + + - - - - - Configure the folder locations used by your other applications. + + + Configure the folder locations used by your other applications. Please note that this values are currently user specific and saved globally for all boxes. - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - Name - - - - - Value - - - - - + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Name + + + + + Value + + + - - - - Accessibility - - + + + + + + Accessibility + + + + + + + + To compensate for the lost protection, please consult the Drop Rights settings page in the Restrictions settings group. + + + + + + + Screen Readers: JAWS, NVDA, Window-Eyes, System Access + + + - - - - - To compensate for the lost protection, please consult the Drop Rights settings page in the Restrictions settings group. - - - - - - - Screen Readers: JAWS, NVDA, Window-Eyes, System Access - - - - - - - The following settings enable the use of Sandboxie in combination with accessibility software. Please note that some measure of Sandboxie protection is necessarily lost when these settings are in effect. - - - true - - - - - - - - - - - + + + The following settings enable the use of Sandboxie in combination with accessibility software. Please note that some measure of Sandboxie protection is necessarily lost when these settings are in effect. + + + true + + + + + + + + + - - - - + + + + + + @@ -3161,7 +3161,7 @@ Please note that this values are currently user specific and saved globally for tabs - tabWidget + tabsGeneral cmbBoxIndicator cmbBoxBorder btnBorderColor diff --git a/SandboxiePlus/SandMan/Resources/Actions/Accessibility.png b/SandboxiePlus/SandMan/Resources/Actions/Accessibility.png new file mode 100644 index 00000000..68826dfa Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Accessibility.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Anon.png b/SandboxiePlus/SandMan/Resources/Actions/Anon.png new file mode 100644 index 00000000..3baf2ed4 Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Anon.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Bug.png b/SandboxiePlus/SandMan/Resources/Actions/Bug.png new file mode 100644 index 00000000..9697becc Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Bug.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Entry.png b/SandboxiePlus/SandMan/Resources/Actions/Entry.png new file mode 100644 index 00000000..17fc3e85 Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Entry.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Fail.png b/SandboxiePlus/SandMan/Resources/Actions/Fail.png new file mode 100644 index 00000000..7f22380f Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Fail.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Fence.png b/SandboxiePlus/SandMan/Resources/Actions/Fence.png new file mode 100644 index 00000000..de53b974 Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Fence.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/File.png b/SandboxiePlus/SandMan/Resources/Actions/File.png new file mode 100644 index 00000000..0eb04dee Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/File.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/ImmidiateRecovery.png b/SandboxiePlus/SandMan/Resources/Actions/ImmidiateRecovery.png new file mode 100644 index 00000000..d909dadf Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/ImmidiateRecovery.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/List.png b/SandboxiePlus/SandMan/Resources/Actions/List.png new file mode 100644 index 00000000..6d2df085 Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/List.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Miscellaneous.png b/SandboxiePlus/SandMan/Resources/Actions/Miscellaneous.png new file mode 100644 index 00000000..d45eabcc Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Miscellaneous.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Network.png b/SandboxiePlus/SandMan/Resources/Actions/Network.png new file mode 100644 index 00000000..c4728a8e Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Network.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/NoAccess.png b/SandboxiePlus/SandMan/Resources/Actions/NoAccess.png new file mode 100644 index 00000000..6c344c2e Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/NoAccess.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Pass.png b/SandboxiePlus/SandMan/Resources/Actions/Pass.png new file mode 100644 index 00000000..e2eafa0f Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Pass.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Policy.png b/SandboxiePlus/SandMan/Resources/Actions/Policy.png new file mode 100644 index 00000000..1f6bfa7d Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Policy.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Process.png b/SandboxiePlus/SandMan/Resources/Actions/Process.png new file mode 100644 index 00000000..5f51aae3 Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Process.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/QuickRecovery.png b/SandboxiePlus/SandMan/Resources/Actions/QuickRecovery.png new file mode 100644 index 00000000..fe5d7414 Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/QuickRecovery.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Rules.png b/SandboxiePlus/SandMan/Resources/Actions/Rules.png new file mode 100644 index 00000000..3db7572c Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Rules.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Security.png b/SandboxiePlus/SandMan/Resources/Actions/Security.png new file mode 100644 index 00000000..e4d9bd2f Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Security.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Trigger.png b/SandboxiePlus/SandMan/Resources/Actions/Trigger.png new file mode 100644 index 00000000..9c276804 Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Trigger.png differ diff --git a/SandboxiePlus/SandMan/Resources/Actions/Users.png b/SandboxiePlus/SandMan/Resources/Actions/Users.png new file mode 100644 index 00000000..f60d93f9 Binary files /dev/null and b/SandboxiePlus/SandMan/Resources/Actions/Users.png differ diff --git a/SandboxiePlus/SandMan/Resources/SandMan.qrc b/SandboxiePlus/SandMan/Resources/SandMan.qrc index 10393b93..b984fd44 100644 --- a/SandboxiePlus/SandMan/Resources/SandMan.qrc +++ b/SandboxiePlus/SandMan/Resources/SandMan.qrc @@ -78,6 +78,25 @@ Actions/Update.png Actions/Install.png Actions/Cert.png + Actions/File.png + Actions/Security.png + Actions/NoAccess.png + Actions/Entry.png + Actions/Pass.png + Actions/Fail.png + Actions/List.png + Actions/Network.png + Actions/Policy.png + Actions/Rules.png + Actions/ImmidiateRecovery.png + Actions/QuickRecovery.png + Actions/Accessibility.png + Actions/Miscellaneous.png + Actions/Fence.png + Actions/Trigger.png + Actions/Anon.png + Actions/Users.png + Actions/Bug.png Boxes/sandbox-b-empty.png diff --git a/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp b/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp index 66a741c7..b904d60c 100644 --- a/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp +++ b/SandboxiePlus/SandMan/Windows/OptionsWindow.cpp @@ -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& 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& 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 { diff --git a/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp b/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp index 8f37a34f..c8fb5fe2 100644 --- a/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp +++ b/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp @@ -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(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"));