]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/dialogs/DomainSettingsDialog.cpp
Add a default zoom action. https://redmine.stoutner.com/issues/1044
[PrivacyBrowserPC.git] / src / dialogs / DomainSettingsDialog.cpp
index 4aef5ce31e0c1d6ab93d29c3d07387f8e068d48c..82f0f64b890af85781c3187a5f3ecf7902d04f2a 100644 (file)
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>.
- */
// */
 
 // Application headers.
 #include "DomainSettingsDialog.h"
@@ -322,11 +322,17 @@ void DomainSettingsDialog::domainSelected(const QModelIndex &modelIndex) const
     {
         // Display the default zoom factor.
         customZoomFactorSpinBoxPointer->setValue(Settings::zoomFactor());
+
+        // Use the default palette.
+        zoomFactorWidgetPointer->setPalette(defaultPalette);
     }
     else  // Custom zoom factor is selected.
     {
         // Display the custom zoom factor from the domain settings.
         customZoomFactorSpinBoxPointer->setValue(modelIndex.siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabase::CUSTOM_ZOOM_FACTOR)).data().toDouble());
+
+        // Use the highlighted palette.
+        zoomFactorWidgetPointer->setPalette(highlightedPalette);
     }
 
     // Set the initial status of the custom zoom factor spin box.
@@ -672,7 +678,7 @@ void DomainSettingsDialog::zoomFactorComboBoxChanged(const int &newIndex) const
         // Display the custom zoom factor from the domain settings.
         customZoomFactorSpinBoxPointer->setValue(modelIndex.siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabase::CUSTOM_ZOOM_FACTOR)).data().toDouble());
 
-        // Set the palette.
+        // Use the highlighted palette.
         zoomFactorWidgetPointer->setPalette(highlightedPalette);
     }