mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-02 14:14:10 +00:00
Revert "Custom background color"
Wrong authorship for the commit. Commit it again with the correct
information.
CCMAIL: pointedstick@zoho.com
This reverts commit 6b5a7c9a1a
.
This commit is contained in:
parent
6b5a7c9a1a
commit
d176914e63
|
@ -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)
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <config-okular.h>
|
||||
|
||||
#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 );
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -2,15 +2,12 @@
|
|||
<ui version="4.0">
|
||||
<class>DlgGeneralBase</class>
|
||||
<widget class="QWidget" name="DlgGeneralBase">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>558</width>
|
||||
<height>632</height>
|
||||
<height>575</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout">
|
||||
|
@ -143,30 +140,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="horizontalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="KColorButton" name="kcfg_BackgroundColor">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="kcfg_UseCustomBackgroundColor">
|
||||
<property name="text">
|
||||
<string>Use custom background color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
|
@ -466,39 +439,9 @@ For files which were opened before the previous zoom is applied.</string>
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>KColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>kcolorbutton.h</header>
|
||||
<slots>
|
||||
<slot>useDefaultBackgroundColor()</slot>
|
||||
</slots>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<includes>
|
||||
<include location="global">kiconloader.h</include>
|
||||
</includes>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>kcfg_UseCustomBackgroundColor</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>DlgGeneralBase</receiver>
|
||||
<slot>setCustomBackgroundColorButton(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>130</x>
|
||||
<y>229</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>203</x>
|
||||
<y>-9</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<slots>
|
||||
<slot>setCustomBackgroundColorButton(bool)</slot>
|
||||
</slots>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -290,11 +290,6 @@
|
|||
<entry key="ShowSourceLocationsGraphically" type="Bool" >
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry key="UseCustomBackgroundColor" type="Bool" >
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry key="BackgroundColor" type="Color" >
|
||||
</entry>
|
||||
</group>
|
||||
<group name="Search" >
|
||||
<entry key="SearchCaseSensitive" type="Bool">
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue