okular/conf/dlggeneralbase.ui
Albert Freeman 1f6e8a4782 Custom background color
Summary:
BUG: 182994

Adds an option to the config dialog that enables background color (the color around the displayed page) to be changed (while by default preserving the Qt toolkit selection as not to affect existing users).

Reasons for this change:
Accessibility, eye strain, aesthetic reasons, color displayed on monitor can affect power consumption (how: depends on display technology).
Many people want this change occording to Bugzilla and other sources.

Maintenance: Nearly no additional maintenance:
This is no new subsystem but a trivial feature with no complex code dependencies, and we are already showing a colour selection dialog and setting colours in other places in Okular.

{F4257766}

Other less important information:
https://git.reviewboard.kde.org/r/130219/
https://mail.kde.org/pipermail/okular-devel/2017-September/025520.html

Test Plan:
Tested everything, it all works:
Toggled the custom background color, changed custom background color, removed okular settings file (with: "rm ~/.config/okular*") to verify it uses the usual qt theme colour by default (where the settings file remembered the custom color).

Reviewers: #okular, aacid, elvisangelaccio, rkflx, ngraham

Reviewed By: ngraham

Subscribers: aacid, ltoscano, ngraham

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8051
2017-10-01 11:31:59 +02:00

505 lines
14 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<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>
</rect>
</property>
<layout class="QVBoxLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Appearance</string>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="kcfg_ShowScrollBars">
<property name="text">
<string>Show scroll&amp;bars</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="kcfg_SyncThumbnailsViewport">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Link the &amp;thumbnails with the page</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="kcfg_ShowOSD">
<property name="text">
<string>Show &amp;hints and info messages</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="kcfg_DisplayDocumentTitle">
<property name="text">
<string>Display document title in titlebar if available</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>When not displaying document title:</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="kcfg_DisplayDocumentNameOrPath">
<property name="styleSheet">
<string notr="true">QGroupBox {border:0; }</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin">
<number>8</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QRadioButton" name="radioFileName">
<property name="text">
<string>Display file name only</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioFilePath">
<property name="text">
<string>Display full file path</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
</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">
<number>4</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="pixmapLabel1_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Program Features</string>
</property>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>9</number>
</property>
<property name="topMargin">
<number>9</number>
</property>
<property name="rightMargin">
<number>9</number>
</property>
<property name="bottomMargin">
<number>9</number>
</property>
<item>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="kcfg_ShellOpenFileInTabs">
<property name="text">
<string>Open new files in &amp;tabs</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="kcfg_ObeyDRM">
<property name="text">
<string>&amp;Obey DRM limitations</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="kcfg_WatchFile">
<property name="text">
<string>&amp;Reload document on file change</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="kcfg_ChooseGenerators">
<property name="text">
<string>Show backend selection dialog</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="kcfg_rtlReadingDirection">
<property name="text">
<string>Right to left reading direction</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>View Options</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<item row="0" column="0">
<widget class="QLabel" name="columnLabel">
<property name="text">
<string>Overview &amp;columns:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_ViewColumns</cstring>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="kcfg_ViewColumns">
<property name="minimum">
<number>3</number>
</property>
<property name="maximum">
<number>10</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="scrollOverlapLabel">
<property name="toolTip">
<string>Defines how much of the current viewing area will still be visible when pressing the Page Up/Down keys.</string>
</property>
<property name="text">
<string>&amp;Page Up/Down overlap:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_ScrollOverlap</cstring>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="kcfg_ScrollOverlap">
<property name="suffix">
<string>%</string>
</property>
<property name="maximum">
<number>50</number>
</property>
<property name="singleStep">
<number>5</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="toolTip">
<string>Defines the default zoom mode for files which were never opened before.
For files which were opened before the previous zoom is applied.</string>
</property>
<property name="whatsThis">
<string comment="@info:whatsthis">Defines the default zoom mode for files which were never opened before.
For files which were opened before the previous zoom is applied.</string>
</property>
<property name="text">
<string>&amp;Default Zoom:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>kcfg_ZoomMode</cstring>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="kcfg_ZoomMode">
<property name="toolTip">
<string>Defines the default zoom mode for files which were never opened before.
For files which were opened before the previous zoom is applied.</string>
</property>
<property name="whatsThis">
<string comment="@info:whatsthis">Defines the default zoom mode for files which were never opened before.
For files which were opened before the previous zoom is applied.</string>
</property>
<item>
<property name="text">
<string>100%</string>
</property>
</item>
<item>
<property name="text">
<string>Fit Width</string>
</property>
</item>
<item>
<property name="text">
<string>Fit Page</string>
</property>
</item>
<item>
<property name="text">
<string>Auto Fit</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
</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>
</ui>