From d176914e637d5f3fd9f0e9db5dea3a4e079e8b54 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Sun, 1 Oct 2017 11:27:24 +0200 Subject: [PATCH] Revert "Custom background color" Wrong authorship for the commit. Commit it again with the correct information. CCMAIL: pointedstick@zoho.com This reverts commit 6b5a7c9a1a00dec994cfb03b0abf369539168758. --- CMakeLists.txt | 4 +-- conf/dlggeneral.cpp | 7 ----- conf/dlggeneral.h | 3 --- conf/dlggeneralbase.ui | 61 ++---------------------------------------- conf/okular.kcfg | 5 ---- ui/pageview.cpp | 7 +---- 6 files changed, 5 insertions(+), 82 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b749127c..0c5b7ac01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -197,7 +197,7 @@ ki18n_wrap_ui(okularcore_SRCS core/chooseenginewidget.ui ) -kconfig_add_kcfg_files(okularcore_SRCS conf/settings_core.kcfgc) +kconfig_add_kcfg_files(okularcore_SRCS conf/settings_core.kcfgc ) add_library(okularcore SHARED ${okularcore_SRCS}) generate_export_header(okularcore BASE_NAME okularcore EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/core/okularcore_export.h") @@ -323,7 +323,7 @@ ki18n_wrap_ui(okularpart_SRCS conf/dlgpresentationbase.ui ) -kconfig_add_kcfg_files(okularpart_SRCS conf/settings.kcfgc) +kconfig_add_kcfg_files(okularpart_SRCS conf/settings.kcfgc ) add_library(okularpart SHARED ${okularpart_SRCS}) generate_export_header(okularpart BASE_NAME okularpart) diff --git a/conf/dlggeneral.cpp b/conf/dlggeneral.cpp index 8836566a6..964a655bc 100644 --- a/conf/dlggeneral.cpp +++ b/conf/dlggeneral.cpp @@ -14,7 +14,6 @@ #include #include "ui_dlggeneralbase.h" -#include "settings.h" DlgGeneral::DlgGeneral( QWidget * parent, Okular::EmbedMode embedMode ) : QWidget( parent ) @@ -22,8 +21,6 @@ DlgGeneral::DlgGeneral( QWidget * parent, Okular::EmbedMode embedMode ) m_dlg = new Ui_DlgGeneralBase(); m_dlg->setupUi( this ); - setCustomBackgroundColorButton( Okular::Settings::useCustomBackgroundColor() ); - if( embedMode == Okular::ViewerWidgetMode ) { m_dlg->kcfg_SyncThumbnailsViewport->setVisible( false ); @@ -51,7 +48,3 @@ void DlgGeneral::showEvent( QShowEvent * ) #endif } -void DlgGeneral::setCustomBackgroundColorButton( bool value ) -{ - m_dlg->kcfg_BackgroundColor->setEnabled( value ); -} diff --git a/conf/dlggeneral.h b/conf/dlggeneral.h index 6939efbce..f363d260a 100644 --- a/conf/dlggeneral.h +++ b/conf/dlggeneral.h @@ -24,9 +24,6 @@ class DlgGeneral : public QWidget explicit DlgGeneral( QWidget * parent, Okular::EmbedMode embedMode ); virtual ~DlgGeneral(); - public slots: - void setCustomBackgroundColorButton( bool value ); - protected: void showEvent( QShowEvent * ) override; diff --git a/conf/dlggeneralbase.ui b/conf/dlggeneralbase.ui index 089ac43cf..cf4ebca09 100644 --- a/conf/dlggeneralbase.ui +++ b/conf/dlggeneralbase.ui @@ -2,15 +2,12 @@ DlgGeneralBase - - true - 0 0 558 - 632 + 575 @@ -143,30 +140,6 @@ - - - - 6 - - - 0 - - - - - false - - - - - - - Use custom background color - - - - - @@ -466,39 +439,9 @@ For files which were opened before the previous zoom is applied. - - - KColorButton - QPushButton -
kcolorbutton.h
- - useDefaultBackgroundColor() - -
-
kiconloader.h - - - kcfg_UseCustomBackgroundColor - toggled(bool) - DlgGeneralBase - setCustomBackgroundColorButton(bool) - - - 130 - 229 - - - 203 - -9 - - - - - - setCustomBackgroundColorButton(bool) - +
diff --git a/conf/okular.kcfg b/conf/okular.kcfg index 8b2f356af..69ea8cf62 100644 --- a/conf/okular.kcfg +++ b/conf/okular.kcfg @@ -290,11 +290,6 @@ false - - false - - - diff --git a/ui/pageview.cpp b/ui/pageview.cpp index a9132ac00..9766422b9 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -3416,12 +3416,7 @@ QList< Okular::RegularAreaRect * > PageView::textSelections( const QPoint& start void PageView::drawDocumentOnPainter( const QRect & contentsRect, QPainter * p ) { - QColor backColor; - - if ( Okular::Settings::useCustomBackgroundColor() ) - backColor = Okular::Settings::backgroundColor(); - else - backColor = viewport()->palette().color( QPalette::Dark ); + QColor backColor = viewport()->palette().color( QPalette::Dark ); // when checking if an Item is contained in contentsRect, instead of // growing PageViewItems rects (for keeping outline into account), we