summaryrefslogtreecommitdiffstats
path: root/kcontrol/css
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/css')
-rw-r--r--kcontrol/css/Makefile.am16
-rw-r--r--kcontrol/css/cssconfig.ui242
-rw-r--r--kcontrol/css/csscustom.ui554
-rw-r--r--kcontrol/css/kcmcss.cpp385
-rw-r--r--kcontrol/css/kcmcss.desktop233
-rw-r--r--kcontrol/css/kcmcss.h60
-rw-r--r--kcontrol/css/preview.ui95
-rw-r--r--kcontrol/css/template.cpp45
-rw-r--r--kcontrol/css/template.css77
-rw-r--r--kcontrol/css/template.h21
10 files changed, 1728 insertions, 0 deletions
diff --git a/kcontrol/css/Makefile.am b/kcontrol/css/Makefile.am
new file mode 100644
index 000000000..9f55b5a75
--- /dev/null
+++ b/kcontrol/css/Makefile.am
@@ -0,0 +1,16 @@
+AM_CPPFLAGS = $(all_includes)
+
+template_DATA = template.css
+templatedir = $(kde_datadir)/kcmcss
+
+kde_module_LTLIBRARIES = kcm_css.la
+kcm_css_la_SOURCES = template.cpp cssconfig.ui csscustom.ui kcmcss.cpp preview.ui
+kcm_css_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined
+kcm_css_la_LIBADD = -lkdeui $(LIB_KIO)
+
+METASOURCES = AUTO
+
+messages: rc.cpp
+ $(XGETTEXT) *.cpp -o $(podir)/kcmcss.pot
+
+xdg_apps_DATA = kcmcss.desktop
diff --git a/kcontrol/css/cssconfig.ui b/kcontrol/css/cssconfig.ui
new file mode 100644
index 000000000..c3d064b48
--- /dev/null
+++ b/kcontrol/css/cssconfig.ui
@@ -0,0 +1,242 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>CSSConfigDialog</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>CSSConfigDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>487</width>
+ <height>195</height>
+ </rect>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Stylesheets&lt;/b&gt;&lt;p&gt;See http://www.w3.org/Style/CSS for further information on cascading style sheets.&lt;/p&gt;</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>ButtonGroup1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Stylesheets</string>
+ </property>
+ <property name="exclusive">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Stylesheets&lt;/b&gt;&lt;p&gt;Use this groupbox to determine how Konqueror will render style sheets.&lt;/p&gt;</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>useDefault</cstring>
+ </property>
+ <property name="text">
+ <string>Us&amp;e default stylesheet</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Use default stylesheet&lt;/b&gt;&lt;p&gt;Select this option to use the default stylesheet.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>useUser</cstring>
+ </property>
+ <property name="text">
+ <string>Use &amp;user-defined stylesheet</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Use user-defined stylesheet&lt;/b&gt;&lt;p&gt;If this box is checked, Konqueror will try to load a user-defined style sheet as specified in the location below. The style sheet allows you to completely override the way web pages are rendered in your browser. The file specified should contain a valid style sheet (see http://www.w3.org/Style/CSS for further information on cascading style sheets).&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer9_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KURLRequester">
+ <property name="name">
+ <cstring>urlRequester</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>useAccess</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>U&amp;se accessibility stylesheet</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Use accessibility stylesheet&lt;/b&gt;&lt;p&gt;Selecting this option will allow you to define a default font, font size, and font color with a few simple clicks of the mouse. Simply wander over to the Customize... dialog and pick out your desired options.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>customize</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Custom&amp;ize...</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>451</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>50</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+</widget>
+<connections>
+ <connection>
+ <sender>useAccess</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>customize</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>useUser</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>urlRequester</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<includes>
+ <include location="global" impldecl="in implementation">kdialog.h</include>
+</includes>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<includehints>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/kcontrol/css/csscustom.ui b/kcontrol/css/csscustom.ui
new file mode 100644
index 000000000..b19e08baf
--- /dev/null
+++ b/kcontrol/css/csscustom.ui
@@ -0,0 +1,554 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>CSSCustomDialog</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>CSSCustomDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>584</width>
+ <height>456</height>
+ </rect>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Stylesheets&lt;/b&gt;&lt;p&gt;See http://www.w3.org/Style/CSS for further information on cascading style sheets.&lt;/p&gt;</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="0" column="1">
+ <property name="name">
+ <cstring>GroupBox3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Font Size</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>7</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>8</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>9</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>10</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>11</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>12</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>14</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>16</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>20</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>24</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>32</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>48</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>64</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>basefontsize</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>txtFontsize</cstring>
+ </property>
+ <property name="text">
+ <string>Base font si&amp;ze:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>basefontsize</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>dontScale</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Use same size for all elements</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Use same size for all elements&lt;/b&gt;&lt;p&gt;Select this option to override custom font sizes in favor of the base font size. All fonts will be displayed in the same size.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>GroupBox3_2</cstring>
+ </property>
+ <property name="title">
+ <string>Images</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Images&lt;/b&gt;&lt;p&gt;</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>hideImages</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Suppress images</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Suppress images&lt;/b&gt;&lt;p&gt;Selecting this will prevent Konqueror from loading images.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>hideBackground</cstring>
+ </property>
+ <property name="text">
+ <string>Suppress background images</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Suppress background images&lt;/b&gt;&lt;p&gt;Selecting this option will prevent Konqueror from loading background images.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox7</cstring>
+ </property>
+ <property name="title">
+ <string>Font Family</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Font family&lt;/b&gt;&lt;p&gt;A font family is a group of fonts that resemble one another, with family members that are e.g. bold, italic, or any number of the above.&lt;/p&gt;</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>txtBaseFontFamily</cstring>
+ </property>
+ <property name="text">
+ <string>Base fa&amp;mily:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>fontFamily</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>fontFamily</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;p&gt;This is the currently selected font family&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>Spacer7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>sameFamily</cstring>
+ </property>
+ <property name="text">
+ <string>Use same family for all text</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Use same family for all text&lt;/b&gt;&lt;p&gt;Select this option to override custom fonts everywhere in favor of the base font.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="4" column="1">
+ <property name="name">
+ <cstring>Spacer5_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>preview</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Preview</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Preview&lt;/b&gt;&lt;p&gt;Click on this button to see what your selections look like in action.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer1_4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>ButtonGroup2</cstring>
+ </property>
+ <property name="title">
+ <string>Colors</string>
+ </property>
+ <property name="exclusive">
+ <bool>false</bool>
+ </property>
+ <property name="radioButtonExclusive">
+ <bool>true</bool>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>blackOnWhite</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Black on white</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Black on White&lt;/b&gt;&lt;p&gt;This is what you normally see.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>whiteOnBlack</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;White on black</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;White on Black&lt;/b&gt;&lt;p&gt;This is your classic inverse color scheme.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton">
+ <property name="name">
+ <cstring>customColor</cstring>
+ </property>
+ <property name="text">
+ <string>Cus&amp;tom</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Custom&lt;/b&gt;&lt;p&gt;Select this option to define a custom color for the default font.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout2</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="KColorButton" row="1" column="2">
+ <property name="name">
+ <cstring>foregroundColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Foreground color&lt;/b&gt;&lt;p&gt;The foreground color is the color that the text is drawn in.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <spacer row="1" column="3">
+ <property name="name">
+ <cstring>Spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="0" column="0">
+ <property name="name">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>Spacer1_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="0" column="3">
+ <property name="name">
+ <cstring>Spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="1" column="1">
+ <property name="name">
+ <cstring>txtForeground</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Foreground:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>foregroundColor</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Foreground color&lt;/b&gt;&lt;p&gt;The foreground color is the color that the text is drawn in.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="KColorButton" row="0" column="2">
+ <property name="name">
+ <cstring>backgroundColor</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Background&lt;/b&gt;&lt;p&gt;Behind this door lays the ability to choose a custom default background.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>txtBackground</cstring>
+ </property>
+ <property name="text">
+ <string>Bac&amp;kground:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>backgroundColor</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Background&lt;/b&gt;&lt;p&gt;This background color is the one displayed behind the text by default. A background image will override this.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>sameColor</cstring>
+ </property>
+ <property name="text">
+ <string>Use same color for all text</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;b&gt;Use same color for all text&lt;/b&gt;&lt;p&gt;Select this option to apply your chosen color to the default font as well as any custom fonts as specified in a stylesheet.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<tabstops>
+ <tabstop>fontFamily</tabstop>
+ <tabstop>sameFamily</tabstop>
+ <tabstop>basefontsize</tabstop>
+ <tabstop>dontScale</tabstop>
+ <tabstop>blackOnWhite</tabstop>
+ <tabstop>backgroundColor</tabstop>
+ <tabstop>foregroundColor</tabstop>
+ <tabstop>sameColor</tabstop>
+ <tabstop>hideImages</tabstop>
+ <tabstop>hideBackground</tabstop>
+ <tabstop>preview</tabstop>
+</tabstops>
+<includes>
+ <include location="global" impldecl="in declaration">kcolorbutton.h</include>
+ <include location="global" impldecl="in implementation">kdialog.h</include>
+</includes>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<includehints>
+ <includehint>kcolorbutton.h</includehint>
+ <includehint>kcolorbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/kcontrol/css/kcmcss.cpp b/kcontrol/css/kcmcss.cpp
new file mode 100644
index 000000000..bd72a1375
--- /dev/null
+++ b/kcontrol/css/kcmcss.cpp
@@ -0,0 +1,385 @@
+
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qlayout.h>
+#include <qradiobutton.h>
+#include <qtextbrowser.h>
+
+#include <kapplication.h>
+#include <kcolorbutton.h>
+#include <kconfig.h>
+#include <kdialogbase.h>
+#include <kfontdialog.h>
+#include <kgenericfactory.h>
+#include <kglobalsettings.h>
+#include <kstandarddirs.h>
+#include <kurlrequester.h>
+
+#include "cssconfig.h"
+#include "csscustom.h"
+#include "template.h"
+#include "preview.h"
+
+#include "kcmcss.h"
+
+typedef KGenericFactory<CSSConfig, QWidget> CSSFactory;
+K_EXPORT_COMPONENT_FACTORY( kcm_css, CSSFactory("kcmcss") )
+
+CSSConfig::CSSConfig(QWidget *parent, const char *name, const QStringList &)
+ : KCModule(CSSFactory::instance(), parent, name)
+{
+ customDialogBase = new KDialogBase(this, "customCSSDialog", true, QString::null,
+ KDialogBase::Close, KDialogBase::Close, true );
+ customDialog = new CSSCustomDialog(customDialogBase);
+ customDialogBase->setMainWidget(customDialog);
+ configDialog = new CSSConfigDialog(this);
+
+ setQuickHelp( i18n("<h1>Konqueror Stylesheets</h1> This module allows you to apply your own color"
+ " and font settings to Konqueror by using"
+ " stylesheets (CSS). You can either specify"
+ " options or apply your own self-written"
+ " stylesheet by pointing to its location.<br>"
+ " Note that these settings will always have"
+ " precedence before all other settings made"
+ " by the site author. This can be useful to"
+ " visually impaired people or for web pages"
+ " that are unreadable due to bad design."));
+
+
+ QStringList fonts;
+ KFontChooser::getFontList(fonts, 0);
+ customDialog->fontFamily->insertStringList(fonts);
+
+ connect(configDialog->useDefault, SIGNAL(clicked()),
+ SLOT(changed()));
+ connect(configDialog->useAccess, SIGNAL(clicked()),
+ SLOT(changed()));
+ connect(configDialog->useUser, SIGNAL(clicked()),
+ SLOT(changed()));
+ connect(configDialog->urlRequester, SIGNAL(textChanged(const QString&)),
+ SLOT(changed()));
+ connect(configDialog->customize, SIGNAL(clicked()),
+ SLOT(slotCustomize()));
+ connect(customDialog->basefontsize, SIGNAL(highlighted(int)),
+ SLOT(changed()));
+ connect(customDialog->basefontsize, SIGNAL(textChanged(const QString&)),
+ SLOT(changed()));
+ connect(customDialog->dontScale, SIGNAL(clicked()),
+ SLOT(changed()));
+ connect(customDialog->blackOnWhite, SIGNAL(clicked()),
+ SLOT(changed()));
+ connect(customDialog->whiteOnBlack, SIGNAL(clicked()),
+ SLOT(changed()));
+ connect(customDialog->customColor, SIGNAL(clicked()),
+ SLOT(changed()));
+ connect(customDialog->foregroundColor, SIGNAL(changed(const QColor &)),
+ SLOT(changed()));
+ connect(customDialog->backgroundColor, SIGNAL(changed(const QColor &)),
+ SLOT(changed()));
+ connect(customDialog->fontFamily, SIGNAL(highlighted(int)),
+ SLOT(changed()));
+ connect(customDialog->fontFamily, SIGNAL(textChanged(const QString&)),
+ SLOT(changed()));
+ connect(customDialog->sameFamily, SIGNAL(clicked()),
+ SLOT(changed()));
+ connect(customDialog->preview, SIGNAL(clicked()),
+ SLOT(slotPreview()));
+ connect(customDialog->sameColor, SIGNAL(clicked()),
+ SLOT(changed()));
+ connect(customDialog->hideImages, SIGNAL(clicked()),
+ SLOT(changed()));
+ connect(customDialog->hideBackground, SIGNAL(clicked()),
+ SLOT(changed()));
+
+ QVBoxLayout *vbox = new QVBoxLayout(this, 0, 0);
+ vbox->addWidget(configDialog);
+
+ load();
+}
+
+void CSSConfig::load()
+{
+ load( false );
+}
+
+void CSSConfig::load( bool useDefaults )
+{
+ KConfig *c = new KConfig("kcmcssrc", false, false);
+ c->setReadDefaults( useDefaults );
+
+ c->setGroup("Stylesheet");
+ QString u = c->readEntry("Use", "default");
+ configDialog->useDefault->setChecked(u == "default");
+ configDialog->useUser->setChecked(u == "user");
+ configDialog->useAccess->setChecked(u == "access");
+ configDialog->urlRequester->setURL(c->readEntry("SheetName"));
+
+ c->setGroup("Font");
+ customDialog->basefontsize->setEditText(QString::number(c->readNumEntry("BaseSize", 12)));
+ customDialog->dontScale->setChecked(c->readBoolEntry("DontScale", false));
+
+ QString fname = c->readEntry("Family", "Arial");
+ for (int i=0; i < customDialog->fontFamily->count(); ++i)
+ if (customDialog->fontFamily->text(i) == fname)
+ {
+ customDialog->fontFamily->setCurrentItem(i);
+ break;
+ }
+
+ customDialog->sameFamily->setChecked(c->readBoolEntry("SameFamily", false));
+
+ c->setGroup("Colors");
+ QString m = c->readEntry("Mode", "black-on-white");
+ customDialog->blackOnWhite->setChecked(m == "black-on-white");
+ customDialog->whiteOnBlack->setChecked(m == "white-on-black");
+ customDialog->customColor->setChecked(m == "custom");
+ customDialog->backgroundColor->setColor(c->readColorEntry("BackColor", &Qt::white));
+ customDialog->foregroundColor->setColor(c->readColorEntry("ForeColor", &Qt::black));
+ customDialog->sameColor->setChecked(c->readBoolEntry("SameColor", false));
+
+ // Images
+ c->setGroup("Images");
+ customDialog->hideImages->setChecked(c->readBoolEntry("Hide", false));
+ customDialog->hideBackground->setChecked(c->readBoolEntry("HideBackground", true));
+
+ delete c;
+
+ emit changed( useDefaults );
+}
+
+
+void CSSConfig::save()
+{
+ // write to config file
+ KConfig *c = new KConfig("kcmcssrc", false, false);
+
+ c->setGroup("Stylesheet");
+ if (configDialog->useDefault->isChecked())
+ c->writeEntry("Use", "default");
+ if (configDialog->useUser->isChecked())
+ c->writeEntry("Use", "user");
+ if (configDialog->useAccess->isChecked())
+ c->writeEntry("Use", "access");
+ c->writeEntry("SheetName", configDialog->urlRequester->url());
+
+ c->setGroup("Font");
+ c->writeEntry("BaseSize", customDialog->basefontsize->currentText());
+ c->writeEntry("DontScale", customDialog->dontScale->isChecked());
+ c->writeEntry("SameFamily", customDialog->sameFamily->isChecked());
+ c->writeEntry("Family", customDialog->fontFamily->currentText());
+
+ c->setGroup("Colors");
+ if (customDialog->blackOnWhite->isChecked())
+ c->writeEntry("Mode", "black-on-white");
+ if (customDialog->whiteOnBlack->isChecked())
+ c->writeEntry("Mode", "white-on-black");
+ if (customDialog->customColor->isChecked())
+ c->writeEntry("Mode", "custom");
+ c->writeEntry("BackColor", customDialog->backgroundColor->color());
+ c->writeEntry("ForeColor", customDialog->foregroundColor->color());
+ c->writeEntry("SameColor", customDialog->sameColor->isChecked());
+
+ c->setGroup("Images");
+ c->writeEntry("Hide", customDialog->hideImages->isChecked());
+ c->writeEntry("HideBackground", customDialog->hideBackground->isChecked());
+
+ c->sync();
+ delete c;
+
+ // generate CSS template
+ QString templ = locate("data", "kcmcss/template.css");
+ QString dest;
+ if (!templ.isEmpty())
+ {
+ CSSTemplate css(templ);
+
+ dest = kapp->dirs()->saveLocation("data", "kcmcss");
+ dest += "/override.css";
+
+ css.expand(dest, cssDict());
+ }
+
+ // make konqueror use the right stylesheet
+ c = new KConfig("konquerorrc", false, false);
+
+ c->setGroup("HTML Settings");
+ c->writeEntry("UserStyleSheetEnabled", !configDialog->useDefault->isChecked());
+
+ if (configDialog->useUser->isChecked())
+ c->writeEntry("UserStyleSheet", configDialog->urlRequester->url());
+ if (configDialog->useAccess->isChecked())
+ c->writeEntry("UserStyleSheet", dest);
+
+ c->sync();
+ delete c;
+ emit changed(false);
+}
+
+
+void CSSConfig::defaults()
+{
+ load( true );
+}
+
+
+QString px(int i, double scale)
+{
+ QString px;
+ px.setNum(static_cast<int>(i * scale));
+ px += "px";
+ return px;
+}
+
+
+QMap<QString,QString> CSSConfig::cssDict()
+{
+ QMap<QString,QString> dict;
+
+ // Fontsizes ------------------------------------------------------
+
+ int bfs = customDialog->basefontsize->currentText().toInt();
+ dict.insert("fontsize-base", px(bfs, 1.0));
+
+ if (customDialog->dontScale->isChecked())
+ {
+ dict.insert("fontsize-small-1", px(bfs, 1.0));
+ dict.insert("fontsize-large-1", px(bfs, 1.0));
+ dict.insert("fontsize-large-2", px(bfs, 1.0));
+ dict.insert("fontsize-large-3", px(bfs, 1.0));
+ dict.insert("fontsize-large-4", px(bfs, 1.0));
+ dict.insert("fontsize-large-5", px(bfs, 1.0));
+ }
+ else
+ {
+ // TODO: use something harmonic here
+ dict.insert("fontsize-small-1", px(bfs, 0.8));
+ dict.insert("fontsize-large-1", px(bfs, 1.2));
+ dict.insert("fontsize-large-2", px(bfs, 1.4));
+ dict.insert("fontsize-large-3", px(bfs, 1.5));
+ dict.insert("fontsize-large-4", px(bfs, 1.6));
+ dict.insert("fontsize-large-5", px(bfs, 1.8));
+ }
+
+ // Colors --------------------------------------------------------
+
+ if (customDialog->blackOnWhite->isChecked())
+ {
+ dict.insert("background-color", "White");
+ dict.insert("foreground-color", "Black");
+ }
+ else if (customDialog->whiteOnBlack->isChecked())
+ {
+ dict.insert("background-color", "Black");
+ dict.insert("foreground-color", "White");
+ }
+ else
+ {
+ dict.insert("background-color", customDialog->backgroundColor->color().name());
+ dict.insert("foreground-color", customDialog->foregroundColor->color().name());
+ }
+
+ if (customDialog->sameColor->isChecked())
+ dict.insert("force-color", "! important");
+ else
+ dict.insert("force-color", "");
+
+ // Fonts -------------------------------------------------------------
+ dict.insert("font-family", customDialog->fontFamily->currentText());
+ if (customDialog->sameFamily->isChecked())
+ dict.insert("force-font", "! important");
+ else
+ dict.insert("force-font", "");
+
+ // Images
+
+ if (customDialog->hideImages->isChecked())
+ dict.insert("display-images", "background-image : none ! important");
+ else
+ dict.insert("display-images", "");
+ if (customDialog->hideBackground->isChecked())
+ dict.insert("display-background", "background-image : none ! important");
+ else
+ dict.insert("display-background", "");
+
+ return dict;
+}
+
+
+void CSSConfig::slotCustomize()
+{
+ customDialogBase->exec();
+}
+
+
+void CSSConfig::slotPreview()
+{
+
+ QStyleSheetItem *h1 = new QStyleSheetItem(QStyleSheet::defaultSheet(), "h1");
+ QStyleSheetItem *h2 = new QStyleSheetItem(QStyleSheet::defaultSheet(), "h2");
+ QStyleSheetItem *h3 = new QStyleSheetItem(QStyleSheet::defaultSheet(), "h3");
+ QStyleSheetItem *text = new QStyleSheetItem(QStyleSheet::defaultSheet(), "p");
+
+ // Fontsize
+
+ int bfs = customDialog->basefontsize->currentText().toInt();
+ text->setFontSize(bfs);
+ if (customDialog->dontScale->isChecked())
+ {
+ h1->setFontSize(bfs);
+ h2->setFontSize(bfs);
+ h3->setFontSize(bfs);
+ }
+ else
+ {
+ h1->setFontSize(static_cast<int>(bfs * 1.8));
+ h2->setFontSize(static_cast<int>(bfs * 1.6));
+ h3->setFontSize(static_cast<int>(bfs * 1.4));
+ }
+
+ // Colors
+
+ QColor back, fore;
+
+ if (customDialog->blackOnWhite->isChecked())
+ {
+ back = Qt::white;
+ fore = Qt::black;
+ }
+ else if (customDialog->whiteOnBlack->isChecked())
+ {
+ back = Qt::black;
+ fore = Qt::white;
+ }
+ else
+ {
+ back = customDialog->backgroundColor->color();
+ fore = customDialog->foregroundColor->color();
+ }
+
+ h1->setColor(fore);
+ h2->setColor(fore);
+ h3->setColor(fore);
+ text->setColor(fore);
+
+ // Fonts
+
+ h1->setFontFamily(customDialog->fontFamily->currentText());
+ h2->setFontFamily(customDialog->fontFamily->currentText());
+ h3->setFontFamily(customDialog->fontFamily->currentText());
+ text->setFontFamily(customDialog->fontFamily->currentText());
+
+ // Show the preview
+ PreviewDialog *dlg = new PreviewDialog(this, 0, true);
+ dlg->preview->setPaper(back);
+ dlg->preview->viewport()->setFont(QFont(KGlobalSettings::generalFont().family(), bfs));
+
+ dlg->exec();
+
+ delete dlg;
+}
+
+
+
+
+#include "kcmcss.moc"
+
diff --git a/kcontrol/css/kcmcss.desktop b/kcontrol/css/kcmcss.desktop
new file mode 100644
index 000000000..d5a1116f6
--- /dev/null
+++ b/kcontrol/css/kcmcss.desktop
@@ -0,0 +1,233 @@
+[Desktop Entry]
+Icon=stylesheet
+Type=Application
+Exec=kcmshell kcmcss
+DocPath=kcontrol/kcmcss/index.html
+
+
+X-KDE-Library=css
+X-KDE-FactoryName=kcmcss
+X-KDE-ParentApp=kcontrol
+
+Name=Stylesheets
+Name[af]=Stylblaaie
+Name[az]=Stylesheet
+Name[be]=Табліцы стыляў
+Name[bg]=CSS стилове
+Name[bn]=স্টাইলশিট
+Name[br]=Folennoù c'hiz
+Name[ca]=Fulls d'estil
+Name[cs]=Soubory se styly
+Name[csb]=Bôdżi sztélów
+Name[cy]=Dalennau arddull
+Name[da]=Stilark
+Name[de]=Stilvorlagen
+Name[el]=Φύλλα στυλ
+Name[eo]=Stildifinoj
+Name[es]=Hojas de estilo
+Name[et]=Laaditabelid
+Name[eu]=Estilo orriak
+Name[fa]=صفحه سبکها
+Name[fi]=Tyylisivut
+Name[fo]=Sniðørk
+Name[fr]=Feuilles de style
+Name[fy]=Stylblêden
+Name[ga]=Stílbhileoga
+Name[gl]=Follas de Estilo
+Name[he]=גיליונות סגנון
+Name[hi]=स्टाइलशीट
+Name[hr]=Stilska oblikovanja
+Name[hu]=Stíluslapok
+Name[is]=Stílblöð
+Name[it]=Fogli di stile
+Name[ja]=スタイルシート
+Name[kk]=CSS стильдері
+Name[km]=សន្លឹក​រចនាប័ទ្ម
+Name[ko]=스타일시트
+Name[lo]=ສະຕາຍຊິດ
+Name[lt]=Stiliaus aprašymai
+Name[mk]=Дизајни на страница
+Name[mn]=Хэлбэрт хуудас
+Name[ms]=Lemabaran Gaya
+Name[nb]=Stilsett
+Name[nds]=Stilvörlagen
+Name[ne]= शैलीपाना
+Name[nl]=Stijlbladen
+Name[nn]=Stilsett
+Name[nso]=Matlakala a mokgwa
+Name[pl]=Arkusze stylów
+Name[pt]=Folhas de estilo
+Name[pt_BR]=Folhas de estilo
+Name[ro]=Foi de stil
+Name[ru]=Стили CSS
+Name[rw]=Impapuromisusire
+Name[se]=Stiilaárkkat
+Name[sk]=Štýly
+Name[sl]=Slogovne predloge
+Name[sr]=Описи стилова
+Name[sr@Latn]=Opisi stilova
+Name[ss]=Emashidi yetitayhela
+Name[sv]=Stilmallar
+Name[ta]=அமைக்கும் பாணி
+Name[tg]=Намуди варақа
+Name[th]=สไตล์ชีต
+Name[tr]=Stil Kağıtları
+Name[tt]=Bizütabaq
+Name[uk]=Таблиці стилів
+Name[uz]=Staylshitlar
+Name[uz@cyrillic]=Стайлшитлар
+Name[ven]=Siatari la Tshitaela
+Name[vi]=Kiểu dáng mẫu
+Name[wa]=Foyes di stîle
+Name[xh]=Amakhasi ohlobo oluthile
+Name[zh_CN]=样式表
+Name[zh_TW]=樣式表單
+Name[zu]=Amakhasi esitayela
+Comment=Configure the stylesheets used to render web pages
+Comment[af]=Konfigureer die stylblaaie gebruik word na interpreteer web bladsye
+Comment[az]=Veb səhifələrində işlədilən tərz laylarını quraşdır
+Comment[be]=Настаўленне табліц стыляў для малявання старонак Сеціва
+Comment[bg]=Настройване на използваните CSS стилове в уеб страниците
+Comment[bn]=ওয়েব পেজ দেখাতে ব্যবহৃত বিভিন্ন স্টাইলশিট কনফিগার করুন
+Comment[br]=Kefluniañ ar folennoù c'hiz evit ar pajennoù gwiad
+Comment[bs]=Podesite stilove koji se koriste za prikazivanje web stranica
+Comment[ca]=Aquí podeu configurar els fulls d'estil emprats per a renderitzar les pàgines web
+Comment[cs]=Zde je možné nastavit styly používané pro zobrazování HTML
+Comment[csb]=Kònfigùracëjô bògów sztélów do wëskrzënianiô internetowich starnów
+Comment[cy]=Ffurfweddu'r dalennau arddull sy'n trosi tudalennau gwe.
+Comment[da]=Indstil stilark brugt til at vise netsider
+Comment[de]=Stilvorlagen für die Anzeige von HTML-Seiten einrichten
+Comment[el]=Ρυθμίστε τα φύλλα στυλ που χρησιμοποιούνται για την εμφάνιση των ιστοσελίδων
+Comment[eo]=Agordo de la stildifinoj por HTML-prezento
+Comment[es]=Configuración de las hojas de estilo usadas para mostrar páginas web
+Comment[et]=Laaditabelite seadistamine veebilehtede renderdamiseks
+Comment[eu]=Kondiguratu HTML errenderizatzeko erabilitako estilo orriak
+Comment[fa]=پیکربندی صفحه سبکهای مورد استفادۀ پرداخت صفحات وب
+Comment[fi]=WWW-sivuilla käytettävien tyylisivujen asetukset
+Comment[fr]=Configuration des feuilles de style utilisées pour l'affichage HTML
+Comment[fy]=Hjir kinne jo de stylblêden ynstelle dy brûkt wurde foar de werjefte fan websiden
+Comment[ga]=Cumraigh na stílbhileoga a úsáidtear chun leathanaigh ghréasáin a rindreáil
+Comment[gl]=Configurar as follas de estilo empregadas para visualizar páxinas
+Comment[he]=שינוי הגדרות גיליונות הסגנון המשמשים להצגת דפי אינטרנט
+Comment[hi]=वेब पृष्ठ प्रस्तुत करने के लिए उपयोग में आने वाले स्टाइलशीट कॉन्फ़िगर करें
+Comment[hr]=Konfiguriranje stilskih oblikovanja koja se upotrebljavaju za prikaz web sadržaja
+Comment[hu]=A weboldalak megjelenítéséhez használt stíluslapok beállításai
+Comment[is]=Stilla stílblöð sem vinna á HTML skrám
+Comment[it]=Configura i fogli di stile da usare per visualizzare le pagine web
+Comment[ja]=ウェブページのレンダリングに使用するスタイルシートを設定
+Comment[ka]=CSS კონფიგურაცია ვებ გვერდების ასახვისთვის
+Comment[kk]=Веб-парақтарды көрсеткенде қолданатын CSS-стильдерді баптау
+Comment[km]=កំណត់​រចនាសម្ព័ន្ធ​សន្លឹក​រចនាប័ទ្ម ដែល​ប្រើ​ដើម្បី​បង្ហាញ​ទំព័រ​បណ្ដាញ
+Comment[ko]=웹 페이지를 나타내는 스타일시트를 설정합니다
+Comment[lo]=ປັບແຕ່ງສະຕາຍຊິດໃນການສະແດງຜົນ HTML
+Comment[lt]=Konfigūruoti stiliaus aprašymus naudojamus tinklalapių atvaizdavimui
+Comment[lv]=Konfigurēt stilus, ko izmantos tīmekļa lapu attainošanai
+Comment[mk]=Конфигурирајте ги страниците со дизајн\nшто се користат за прикажување веб-страници
+Comment[mn]=Хэлбэрт хуудас хэрэглэдэг HTML-хуудсуудын тохируулга
+Comment[ms]=Konfigur lembaran gaya yang digunakan untuk merealisasikan laman web
+Comment[mt]=Ikkonfigura l-istylesheets li jintużaw biex juru paġni fuq il-web.
+Comment[nb]=Her kan du sette opp stilsett for visning av nettsider
+Comment[nds]=Stell de Stilvörlaag in, de för't Wiesen vun Nettsieden bruukt warrt
+Comment[ne]=रेन्डर वेब पृष्ठहरू प्रयोग गर्ने शैलीपाना कन्फिगर गर्नुहोस्
+Comment[nl]=Hier kunt u de stijlbladen instellen die gebruikt worden voor de weergave van webpagina's
+Comment[nn]=Oppsett av stilsett for vising av nettsider
+Comment[nso]=Beakanya matlakala a mokgwa ao a somisitswego go neela matlakala a web
+Comment[pa]= ਵੈਬ ਸਫਿਆਂ ਨੂੰ ਪੇਸ਼ ਕਰਨ ਲਈ ਸਾਰਣੀਕਾਰ ਸ਼ੀਟਾਂ ਦੀ ਸੰਰਚਨਾ
+Comment[pl]=Konfiguracja arkuszy stylów do wyświetlania stron internetowych
+Comment[pt]=Configuração das folhas de estilo, usadas para mostrar as páginas Web
+Comment[pt_BR]=Configura as folhas de estilo utilizadas para renderizar páginas da web
+Comment[ro]=Configurează foile de stil utilizate la randarea paginilor de web
+Comment[ru]=Настройка стилей CSS, используемых при показа веб-страниц
+Comment[rw]=Kuboneza impapuromisusire zikoreshwa mu gutanga amapaji rubugamakuru
+Comment[se]=Heivet stiilaárkkaid mainna čájeha HTML-siidduid
+Comment[sk]=Nastavenie štýlov používaných pre zobrazovanie HTML
+Comment[sl]=Nastavite slogovne predloge za upodabljanje HTML
+Comment[sr]=Подешавање стилова који се користе за приказ веб страница
+Comment[sr@Latn]=Podešavanje stilova koji se koriste za prikaz veb stranica
+Comment[sv]=Anpassa stilmallarna som används för att visa webbsidor
+Comment[ta]=வலை பக்கங்கள் நடைமுறைக்கு பயன்படுத்தப்பட்ட பாணிபட்டியல்களை வடிவமை
+Comment[tg]=Танзимоти услуби CSS, дар вақти равшан созии варақаҳои вэб истифода мешаванд.
+Comment[th]=ปรับแต่งสไตล์ชีตที่ใช้ในการแสดงผล HTML
+Comment[tr]=Stylesheet ayarlarını yapın
+Comment[tt]=Web-bitlär eşkärtkändä qullanıla torğan tışlaw caylawları
+Comment[uk]=Налаштування таблиць стилів для відображення сторінок Тенет
+Comment[uz]=Veb-sahifalarni koʻrsatishda ishlatiladigan CSS uslublarini moslash
+Comment[uz@cyrillic]=Веб-саҳифаларни кўрсатишда ишлатиладиган CSS услубларини мослаш
+Comment[ven]=Dzudzanyani tshitaela tsha siatari tshino shumiswa u nekedza masiatari a webu
+Comment[vi]=Cấu hình kiểu dáng mẫu được dùng để hỗ trợ trang mạng
+Comment[wa]=Apontyî les foyes di stîle eployeyes ezès pådjes waibe
+Comment[xh]=Qwalasela uhlobo lwamakhasi asebenziswa ukuchaza amaphepha e web
+Comment[zh_CN]=配置用来渲染网页的样式表
+Comment[zh_TW]=設定用來顯示網頁的樣式表單
+Comment[zu]=Hlanganisela amakhasi esitayela asetshenziswa ukunikeza amakhasi e-web
+
+Keywords=CSS,HTML,style,stylesheet,accessibility
+Keywords[az]=CSS,HTML,style,tərz,stylesheet,yetişmə,yetişmə qabiliyyəti
+Keywords[be]=Стыль,табліца стыляў,даступнасць,CSS,HTML,style,stylesheet,accessibility
+Keywords[bg]=стил, стилове, страници, достъпност, CSS, HTML, style, stylesheet, accessibility
+Keywords[br]=CSS,HTML,giz,folenn c'hiz,haezadusted
+Keywords[ca]=CSS,HTML,estil,full d'estil,accessibilitat
+Keywords[cs]=CSS,HTML,styl,style,stylesheet,zpřístupnění
+Keywords[csb]=CSS,HTML,sztél,bòga sztélu,przistãpnosc
+Keywords[cy]=CSS,HTML,ardull,dalen arddull,hygyrchedd
+Keywords[da]=CSS,HTML,stil,stilark,tilgængelighed
+Keywords[de]=CSS,HTML,Stylesheet,Stilvorlagen,Zugangshilfen
+Keywords[el]=CSS,HTML,στυλ,φύλλο στυλ,προσιτότητα
+Keywords[eo]=CSS,HTML,stilo,stildifino,alirebleco
+Keywords[es]=CSS,HTML,estilo,hoja de estilo,accesibilidad
+Keywords[et]=CSS,HTML,stiil,laaditabel
+Keywords[eu]=CSS,HTML,estiloa,estilo orria,erabilerraztasuna
+Keywords[fa]=CSS، زنگام، سبک، صفحه سبک، دستیابی‌پذیری
+Keywords[fi]=CSS,HTML,tyyli,tyylimäärittely,esteettömyys
+Keywords[fo]=CSS,HTML,snið,sniðørk,sniðark
+Keywords[fr]=CSS,HTML,style,feuille de style,accessibilité
+Keywords[fy]=CSS,HTML,styl,stylblêd,tagonklikens,stylblêden
+Keywords[ga]=CSS,HTML,stíl,stílbhileog,inrochtaineacht
+Keywords[gl]=CSS,HTML,estilo,follas de estilo,acesibilidade
+Keywords[he]=CSS,HTML,סגנון,גיליון סגנון,נגישות,style,stylesheet,accessibility
+Keywords[hi]=सीएसएस,एचटीएमएल,स्टाइल,स्टाइलशीट,पहुँच
+Keywords[hr]=CSS,HTML,style,stylesheet,accessibility,stil,stilsko oblikovanje,pristupačnost
+Keywords[hu]=CSS,HTML,stílus,stíluslap,elérhetőség
+Keywords[id]=Gaya,style,theme,themes,tampilan,aksesbilitas
+Keywords[is]=CSS,HTML,stíll,stílblað,aðgengi,aðgengilegheit,aðgangur
+Keywords[it]=CSS,HTML,stile,fogli di stile,stylesheet,accessibilità
+Keywords[ja]=CSS,HTML,スタイル,スタイルシート,アクセシビリティ
+Keywords[km]=CSS,HTML,រចនាប័ទ្ម,សន្លឹក​រចនាប័ទ្ម,ភាព​អាច​ចូល​ដំណើរការ​បាន
+Keywords[ko]=CSS,HTML,스타일,스타일시트,접근성
+Keywords[lt]=CSS,HTML,style,stylesheet,accessibility,stilius,stiliaus aprašymas
+Keywords[lv]=CSS,HTML,stils,stilusaraksts,pieejamība
+Keywords[mk]=CSS,HTML,style,stylesheet,accessibility,стил,страница,дизајн,пристапност
+Keywords[mn]=CSS,HTML,Stylesheet,Хэлбэрт хуудас,Хэрэглэх тохь
+Keywords[mt]=CSS,HTML,style,stylesheet,accessibility,aċċessibbiltà
+Keywords[nb]=CSS,HTML,stil,stilsett,tilgjengelighet
+Keywords[nds]=CSS,HTML,Stil,Stilvörlaag,Behinnerte
+Keywords[ne]=CSS, HTML, शैली, शैलीपाना, पहुँचता
+Keywords[nl]=CSS,HTML,stijl,stylesheet,toegankelijkheid,stijlbladen
+Keywords[nn]=CSS,HTML,stilsett,tilgjenge,brukarstilsett
+Keywords[nso]=CSS,HTML,mokgwa,letlakala la mokgwa,tsenelo
+Keywords[pa]=CSS,HTML,style,stylesheet,accessibility, ਸ਼ੈਲੀ
+Keywords[pl]=CSS,HTML,styl,arkusz stylu,dostępność
+Keywords[pt]=CSS,HTML,estilo,stylesheet,acessibilidade
+Keywords[pt_BR]=CSS,HTML,estilo,folha de estilo,acessibilidade
+Keywords[ro]=CSS,HTML,stil,foi de stil,accesibilitate
+Keywords[rw]=CSS,HTML,imisusire,urupapuromisusire,ukugerwaho
+Keywords[se]=CSS,HTML,stiila,stiilaárka
+Keywords[sk]=CSS,HTML,štýl,style,stylesheet,prístupnosť
+Keywords[sl]=CSS,HTML,slog,slogovne predloge,dostopnost
+Keywords[sr]=CSS,HTML,style,stylesheet,accessibility,стил,опис стила,приступачност
+Keywords[sr@Latn]=CSS,HTML,style,stylesheet,accessibility,stil,opis stila,pristupačnost
+Keywords[sv]=CSS,HTML,stil,stilmall,handikappstöd
+Keywords[ta]=CSS,HTML,பாணிe,விரிப்பட்டியல்,அணுகல்
+Keywords[tr]=CSS,HTML,style,stil,stylesheet,erişim,erişilebilirlik
+Keywords[uk]=CSS,HTML,стиль,таблиця стилів,доступність
+Keywords[uz]=CSS,HTML,uslub,stylesheet,qulayliklar
+Keywords[uz@cyrillic]=CSS,HTML,услуб,stylesheet,қулайликлар
+Keywords[ven]=CSS,HTML,tshitaela,siatari la tshitaela,u dzhenea
+Keywords[vi]=CSS,HTML,kiểu dáng,kiểu dáng mẫu,hỗ trợ người tàn tật
+Keywords[wa]=CSS,HTML,style,stylesheet,accessibility,stîle,foye di stîle,accessibilité
+Keywords[xh]=CSS,HTML,uhlobo,ikhasi lohlobo oluthile,unikezelo
+Keywords[zh_CN]=CSS,HTML,style,stylesheet,accessibility,风格,样式表,辅助功能
+Keywords[zh_TW]=CSS,HTML,style,stylesheet,accessibility,風格,風格表單,可用性
+Keywords[zu]=CSS,HTML,isitayela,ikhasi lesitayela,ukungena
+
+Categories=Qt;KDE;X-KDE-settings-webbrowsing;
diff --git a/kcontrol/css/kcmcss.h b/kcontrol/css/kcmcss.h
new file mode 100644
index 000000000..decf5c3a3
--- /dev/null
+++ b/kcontrol/css/kcmcss.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2000 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ */
+
+#ifndef __KCMCSS_H__
+#define __KCMCSS_H__
+
+
+#include <qmap.h>
+
+#include <kcmodule.h>
+
+
+class CSSConfigDialog;
+class CSSCustomDialog;
+class KDialogBase;
+
+
+class CSSConfig : public KCModule
+{
+ Q_OBJECT
+
+public:
+
+ CSSConfig(QWidget *parent = 0L, const char *name = 0L, const QStringList &list =QStringList() );
+
+ void load();
+ void load( bool useDefaults );
+ void save();
+ void defaults();
+
+public slots:
+
+ void slotPreview();
+ void slotCustomize();
+
+private:
+
+ QMap<QString,QString> cssDict();
+
+ CSSConfigDialog *configDialog;
+ CSSCustomDialog *customDialog;
+ KDialogBase *customDialogBase;
+};
+
+
+#endif
diff --git a/kcontrol/css/preview.ui b/kcontrol/css/preview.ui
new file mode 100644
index 000000000..438d40d37
--- /dev/null
+++ b/kcontrol/css/preview.ui
@@ -0,0 +1,95 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>PreviewDialog</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>PreviewDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>558</width>
+ <height>349</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Preview</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KSeparator" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Line1</cstring>
+ </property>
+ <property name="orientation">
+ <number>5</number>
+ </property>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QTextBrowser" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>preview</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;qt&gt;
+
+&lt;h1&gt;Heading 1&lt;/h1&gt;&lt;br/&gt;
+&lt;h2&gt;Heading 2&lt;/h2&gt;&lt;br/&gt;
+&lt;h3&gt;Heading 3&lt;/h3&gt;&lt;br/&gt;
+
+&lt;p&gt;User defined stylesheets allow increased
+accessibility for visually handicapped
+people.&lt;/p&gt;
+
+&lt;/qt&gt;</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>PushButton2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>PushButton2</sender>
+ <signal>clicked()</signal>
+ <receiver>PreviewDialog</receiver>
+ <slot>accept()</slot>
+ </connection>
+</connections>
+<includes>
+ <include location="global" impldecl="in declaration">kseparator.h</include>
+ <include location="global" impldecl="in implementation">kdialog.h</include>
+</includes>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<includehints>
+ <includehint>kseparator.h</includehint>
+</includehints>
+</UI>
diff --git a/kcontrol/css/template.cpp b/kcontrol/css/template.cpp
new file mode 100644
index 000000000..94eba6053
--- /dev/null
+++ b/kcontrol/css/template.cpp
@@ -0,0 +1,45 @@
+
+
+#include <qfile.h>
+
+
+#include "template.h"
+
+
+bool CSSTemplate::expand(QString destname, const QMap<QString,QString> &dict)
+{
+ QFile inf(_filename);
+ if (!inf.open(IO_ReadOnly))
+ return false;
+ QTextStream is(&inf);
+
+ QFile outf(destname);
+ if (!outf.open(IO_WriteOnly))
+ return false;
+ QTextStream os(&outf);
+
+ QString line;
+ while (!is.eof())
+ {
+ line = is.readLine();
+
+ int start = line.find('$');
+ if (start >= 0)
+ {
+ int end = line.find('$', start+1);
+ if (end >= 0)
+ {
+ QString expr = line.mid(start+1, end-start-1);
+ QString res = dict[expr];
+
+ line.replace(start, end-start+1, res);
+ }
+ }
+ os << line << endl;
+ }
+
+ inf.close();
+ outf.close();
+
+ return true;
+}
diff --git a/kcontrol/css/template.css b/kcontrol/css/template.css
new file mode 100644
index 000000000..dd2afaba9
--- /dev/null
+++ b/kcontrol/css/template.css
@@ -0,0 +1,77 @@
+/*
+ * Font sizes
+ */
+
+* {
+ font-size : $fontsize-base$ ! important;
+}
+
+SMALL, SUB, SUP {
+ font-size : $fontsize-small-1$ ! important;
+}
+
+BIG {
+ font-size : $fontsize-large-1$ ! important;
+}
+
+H1, H1 A {
+ font-size : $fontsize-large-5$ ! important;
+}
+
+H2, H2 A {
+ font-size : $fontsize-large-4$ ! important;
+}
+
+H3, H3 A {
+ font-size : $fontsize-large-3$ ! important;
+}
+
+H4, H4 A {
+ font-size : $fontsize-large-2$ ! important;
+}
+
+H5, H5 A {
+ font-size : $fontsize-large-1$ ! important;
+}
+
+
+/*
+ * Colors
+ */
+
+* {
+ background : $background-color$ ! important;
+ color : $foreground-color$
+ $force-color$;
+}
+
+BODY {
+ color : $foreground-color$ ! important;
+}
+
+TABLE, TD {
+ border-color : $foreground-color$;
+}
+
+
+/*
+ * Font family
+ */
+
+* {
+ font-family : $font-family$
+ $force-font$;
+}
+
+
+/*
+ * Images
+ */
+
+IMG {
+ $display-images$;
+}
+
+BODY {
+ $display-background$;
+}
diff --git a/kcontrol/css/template.h b/kcontrol/css/template.h
new file mode 100644
index 000000000..2b701a238
--- /dev/null
+++ b/kcontrol/css/template.h
@@ -0,0 +1,21 @@
+#ifndef __TEMPLATE_H__
+#define __TEMPLATE_H__
+
+
+#include <qstring.h>
+#include <qmap.h>
+
+class CSSTemplate
+{
+public:
+
+ CSSTemplate(QString fname) : _filename(fname) {};
+ bool expand(QString destname, const QMap<QString,QString> &dict);
+
+protected:
+ QString _filename;
+
+};
+
+
+#endif