Added code to configure the zoom factor a file is opened with.

Sat, 08 May 2010 18:01:31 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 08 May 2010 18:01:31 +0200
changeset 230
2cde09c26384
parent 229
fa7024a3cd58
child 231
2e4eb047ae93

Added code to configure the zoom factor a file is opened with.

Preferences/ConfigurationPages/EditorStylesPage.py file | annotate | diff | comparison | revisions
Preferences/ConfigurationPages/EditorStylesPage.ui file | annotate | diff | comparison | revisions
Preferences/__init__.py file | annotate | diff | comparison | revisions
QScintilla/Editor.py file | annotate | diff | comparison | revisions
changelog file | annotate | diff | comparison | revisions
--- a/Preferences/ConfigurationPages/EditorStylesPage.py	Sat May 08 17:38:46 2010 +0200
+++ b/Preferences/ConfigurationPages/EditorStylesPage.py	Sat May 08 18:01:31 2010 +0200
@@ -132,6 +132,9 @@
             self.initColour("NonmatchingBraceBack", self.nonmatchingBracesBackButton, 
                 Preferences.getEditorColour)
         
+        self.zoomfactorSlider.setValue(
+            Preferences.getEditor("ZoomFactor"))
+        
         self.whitespaceCheckBox.setChecked(\
             Preferences.getEditor("ShowWhitespace"))
         self.miniMenuCheckBox.setChecked(\
@@ -182,6 +185,9 @@
         Preferences.setEditor("BraceHighlighting",
             self.bracehighlightingCheckBox.isChecked())
         
+        Preferences.setEditor("ZoomFactor", 
+            self.zoomfactorSlider.value())
+        
         Preferences.setEditor("ShowWhitespace", 
             self.whitespaceCheckBox.isChecked())
         Preferences.setEditor("MiniContextMenu",
--- a/Preferences/ConfigurationPages/EditorStylesPage.ui	Sat May 08 17:38:46 2010 +0200
+++ b/Preferences/ConfigurationPages/EditorStylesPage.ui	Sat May 08 18:01:31 2010 +0200
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>EditorStylesPage</class>
- <widget class="QWidget" name="EditorStylesPage" >
-  <property name="geometry" >
+ <widget class="QWidget" name="EditorStylesPage">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,91 +10,91 @@
     <height>1250</height>
    </rect>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout_2" >
+  <layout class="QVBoxLayout" name="verticalLayout_2">
    <item>
-    <widget class="QLabel" name="headerLabel" >
-     <property name="text" >
-      <string>&lt;b>Configure editor styles&lt;/b></string>
+    <widget class="QLabel" name="headerLabel">
+     <property name="text">
+      <string>&lt;b&gt;Configure editor styles&lt;/b&gt;</string>
      </property>
     </widget>
    </item>
    <item>
-    <widget class="Line" name="line3" >
-     <property name="frameShape" >
+    <widget class="Line" name="line3">
+     <property name="frameShape">
       <enum>QFrame::HLine</enum>
      </property>
-     <property name="frameShadow" >
+     <property name="frameShadow">
       <enum>QFrame::Sunken</enum>
      </property>
-     <property name="orientation" >
+     <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox_5" >
-     <property name="title" >
+    <widget class="QGroupBox" name="groupBox_5">
+     <property name="title">
       <string>Fonts</string>
      </property>
-     <layout class="QGridLayout" >
-      <item row="1" column="2" >
-       <widget class="QCheckBox" name="monospacedCheckBox" >
-        <property name="toolTip" >
+     <layout class="QGridLayout">
+      <item row="1" column="2">
+       <widget class="QCheckBox" name="monospacedCheckBox">
+        <property name="toolTip">
          <string>Select, whether the monospaced font should be used as default</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Use monospaced as default</string>
         </property>
        </widget>
       </item>
-      <item row="0" column="1" >
-       <widget class="QLineEdit" name="defaultFontSample" >
-        <property name="focusPolicy" >
+      <item row="0" column="1">
+       <widget class="QLineEdit" name="defaultFontSample">
+        <property name="focusPolicy">
          <enum>Qt::NoFocus</enum>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Default Text</string>
         </property>
-        <property name="alignment" >
+        <property name="alignment">
          <set>Qt::AlignHCenter</set>
         </property>
-        <property name="readOnly" >
+        <property name="readOnly">
          <bool>true</bool>
         </property>
        </widget>
       </item>
-      <item row="0" column="0" >
-       <widget class="QPushButton" name="defaultFontButton" >
-        <property name="toolTip" >
+      <item row="0" column="0">
+       <widget class="QPushButton" name="defaultFontButton">
+        <property name="toolTip">
          <string>Press to select the default font for the editor's text</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Default Text Font</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="0" >
-       <widget class="QPushButton" name="monospacedFontButton" >
-        <property name="toolTip" >
+      <item row="1" column="0">
+       <widget class="QPushButton" name="monospacedFontButton">
+        <property name="toolTip">
          <string>Press to select the font to be used as the monospaced font</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Monospaced Font</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="1" >
-       <widget class="QLineEdit" name="monospacedFontSample" >
-        <property name="focusPolicy" >
+      <item row="1" column="1">
+       <widget class="QLineEdit" name="monospacedFontSample">
+        <property name="focusPolicy">
          <enum>Qt::NoFocus</enum>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Monospaced Text</string>
         </property>
-        <property name="alignment" >
+        <property name="alignment">
          <set>Qt::AlignHCenter</set>
         </property>
-        <property name="readOnly" >
+        <property name="readOnly">
          <bool>true</bool>
         </property>
        </widget>
@@ -102,39 +103,39 @@
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox" >
-     <property name="title" >
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
       <string>Margins</string>
      </property>
-     <layout class="QVBoxLayout" name="verticalLayout" >
+     <layout class="QVBoxLayout" name="verticalLayout">
       <item>
-       <layout class="QGridLayout" name="gridLayout_2" >
-        <item row="0" column="0" >
-         <widget class="QCheckBox" name="linenoCheckBox" >
-          <property name="toolTip" >
+       <layout class="QGridLayout" name="gridLayout_2">
+        <item row="0" column="0">
+         <widget class="QCheckBox" name="linenoCheckBox">
+          <property name="toolTip">
            <string>Select whether line numbers margin should be shown.</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>Show Line Numbers Margin</string>
           </property>
          </widget>
         </item>
-        <item row="0" column="1" >
-         <widget class="QCheckBox" name="foldingCheckBox" >
-          <property name="toolTip" >
+        <item row="0" column="1">
+         <widget class="QCheckBox" name="foldingCheckBox">
+          <property name="toolTip">
            <string>Select whether the fold margin should be shown.</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>Show Fold Margin</string>
           </property>
          </widget>
         </item>
-        <item row="1" column="0" >
-         <widget class="QCheckBox" name="unifiedMarginsCheckBox" >
-          <property name="toolTip" >
+        <item row="1" column="0">
+         <widget class="QCheckBox" name="unifiedMarginsCheckBox">
+          <property name="toolTip">
            <string>Select to show unified margins (like eric4 &lt; 4.3.0)</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>Show unified margins</string>
           </property>
          </widget>
@@ -142,51 +143,51 @@
        </layout>
       </item>
       <item>
-       <layout class="QHBoxLayout" >
+       <layout class="QHBoxLayout">
         <item>
-         <widget class="QLabel" name="TextLabel13_2_2_2" >
-          <property name="text" >
+         <widget class="QLabel" name="TextLabel13_2_2_2">
+          <property name="text">
            <string>Linenumbers width:</string>
           </property>
-          <property name="buddy" >
+          <property name="buddy">
            <cstring>linenowidthSlider</cstring>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QSlider" name="linenowidthSlider" >
-          <property name="toolTip" >
+         <widget class="QSlider" name="linenowidthSlider">
+          <property name="toolTip">
            <string>Move to set the width of the linenumbers margin.</string>
           </property>
-          <property name="minimum" >
+          <property name="minimum">
            <number>2</number>
           </property>
-          <property name="maximum" >
+          <property name="maximum">
            <number>8</number>
           </property>
-          <property name="value" >
+          <property name="value">
            <number>4</number>
           </property>
-          <property name="orientation" >
+          <property name="orientation">
            <enum>Qt::Horizontal</enum>
           </property>
-          <property name="tickInterval" >
+          <property name="tickInterval">
            <number>1</number>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QLCDNumber" name="linenowidthLCD" >
-          <property name="toolTip" >
+         <widget class="QLCDNumber" name="linenowidthLCD">
+          <property name="toolTip">
            <string>Displays the selected width of the linenumbers margin.</string>
           </property>
-          <property name="numDigits" >
+          <property name="numDigits">
            <number>2</number>
           </property>
-          <property name="segmentStyle" >
+          <property name="segmentStyle">
            <enum>QLCDNumber::Flat</enum>
           </property>
-          <property name="value" stdset="0" >
+          <property name="value" stdset="0">
            <double>4.000000000000000</double>
           </property>
          </widget>
@@ -194,60 +195,60 @@
        </layout>
       </item>
       <item>
-       <layout class="QHBoxLayout" >
+       <layout class="QHBoxLayout">
         <item>
-         <widget class="QLabel" name="TextLabel1_4_2_2" >
-          <property name="text" >
+         <widget class="QLabel" name="TextLabel1_4_2_2">
+          <property name="text">
            <string>Folding style:</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="foldingStyleComboBox" >
-          <property name="sizePolicy" >
-           <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+         <widget class="QComboBox" name="foldingStyleComboBox">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
             <horstretch>0</horstretch>
             <verstretch>0</verstretch>
            </sizepolicy>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Select the folding style to be used in the folding margin</string>
           </property>
-          <property name="whatsThis" >
-           <string>&lt;b>Folding style&lt;/b>
-&lt;p>Select the desired folding style to be used in the folding margin.&lt;/p>
-&lt;p>The available styles are:
-&lt;ul>
-&lt;li>Plain - simple plus and minus symbols&lt;/li>
-&lt;li>Circled - circled plus and minus symbols&lt;/li>
-&lt;li>Boxed - boxed plus and minus symbols&lt;/li>
-&lt;li>Circled Tree - circled plus and minus symbols and flattened tree with rounded corners&lt;/li>
-&lt;li>Boxed Tree - boxed plus and minus symbols and flattened tree with rectangled corners&lt;/li>
-&lt;/ul>
-&lt;/p></string>
+          <property name="whatsThis">
+           <string>&lt;b&gt;Folding style&lt;/b&gt;
+&lt;p&gt;Select the desired folding style to be used in the folding margin.&lt;/p&gt;
+&lt;p&gt;The available styles are:
+&lt;ul&gt;
+&lt;li&gt;Plain - simple plus and minus symbols&lt;/li&gt;
+&lt;li&gt;Circled - circled plus and minus symbols&lt;/li&gt;
+&lt;li&gt;Boxed - boxed plus and minus symbols&lt;/li&gt;
+&lt;li&gt;Circled Tree - circled plus and minus symbols and flattened tree with rounded corners&lt;/li&gt;
+&lt;li&gt;Boxed Tree - boxed plus and minus symbols and flattened tree with rectangled corners&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/p&gt;</string>
           </property>
           <item>
-           <property name="text" >
+           <property name="text">
             <string>Plain</string>
            </property>
           </item>
           <item>
-           <property name="text" >
+           <property name="text">
             <string>Circled</string>
            </property>
           </item>
           <item>
-           <property name="text" >
+           <property name="text">
             <string>Boxed</string>
            </property>
           </item>
           <item>
-           <property name="text" >
+           <property name="text">
             <string>Circled Tree</string>
            </property>
           </item>
           <item>
-           <property name="text" >
+           <property name="text">
             <string>Boxed Tree</string>
            </property>
           </item>
@@ -256,72 +257,72 @@
        </layout>
       </item>
       <item>
-       <layout class="QGridLayout" name="gridLayout" >
-        <item row="0" column="0" >
-         <widget class="QLabel" name="TextLabel2_2_2_2_2_6" >
-          <property name="text" >
+       <layout class="QGridLayout" name="gridLayout">
+        <item row="0" column="0">
+         <widget class="QLabel" name="TextLabel2_2_2_2_2_6">
+          <property name="text">
            <string>Margins foreground:</string>
           </property>
          </widget>
         </item>
-        <item row="0" column="1" >
-         <widget class="QPushButton" name="marginsForegroundButton" >
-          <property name="minimumSize" >
+        <item row="0" column="1">
+         <widget class="QPushButton" name="marginsForegroundButton">
+          <property name="minimumSize">
            <size>
             <width>100</width>
             <height>0</height>
            </size>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Select the foreground colour for the margins</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string/>
           </property>
          </widget>
         </item>
-        <item row="0" column="2" >
-         <widget class="QLabel" name="TextLabel2_2_2_2_2_7" >
-          <property name="text" >
+        <item row="0" column="2">
+         <widget class="QLabel" name="TextLabel2_2_2_2_2_7">
+          <property name="text">
            <string>Margins background:</string>
           </property>
          </widget>
         </item>
-        <item row="0" column="3" >
-         <widget class="QPushButton" name="marginsBackgroundButton" >
-          <property name="minimumSize" >
+        <item row="0" column="3">
+         <widget class="QPushButton" name="marginsBackgroundButton">
+          <property name="minimumSize">
            <size>
             <width>100</width>
             <height>0</height>
            </size>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Select the background colour for the margins</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string/>
           </property>
          </widget>
         </item>
-        <item row="1" column="0" >
-         <widget class="QLabel" name="TextLabel2_2_2_2_2_8" >
-          <property name="text" >
+        <item row="1" column="0">
+         <widget class="QLabel" name="TextLabel2_2_2_2_2_8">
+          <property name="text">
            <string>Foldmargin background:</string>
           </property>
          </widget>
         </item>
-        <item row="1" column="1" >
-         <widget class="QPushButton" name="foldmarginBackgroundButton" >
-          <property name="minimumSize" >
+        <item row="1" column="1">
+         <widget class="QPushButton" name="foldmarginBackgroundButton">
+          <property name="minimumSize">
            <size>
             <width>100</width>
             <height>0</height>
            </size>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Select the background colour for the foldmargin</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string/>
           </property>
          </widget>
@@ -329,45 +330,45 @@
        </layout>
       </item>
       <item>
-       <layout class="QHBoxLayout" name="horizontalLayout" >
+       <layout class="QHBoxLayout" name="horizontalLayout">
         <item>
-         <widget class="QPushButton" name="linenumbersFontButton" >
-          <property name="toolTip" >
+         <widget class="QPushButton" name="linenumbersFontButton">
+          <property name="toolTip">
            <string>Press to select the font for the editor line numbers</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>Line Numbers Font</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QLineEdit" name="marginsFontSample" >
-          <property name="minimumSize" >
+         <widget class="QLineEdit" name="marginsFontSample">
+          <property name="minimumSize">
            <size>
             <width>200</width>
             <height>0</height>
            </size>
           </property>
-          <property name="focusPolicy" >
+          <property name="focusPolicy">
            <enum>Qt::NoFocus</enum>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>2345</string>
           </property>
-          <property name="alignment" >
+          <property name="alignment">
            <set>Qt::AlignHCenter</set>
           </property>
-          <property name="readOnly" >
+          <property name="readOnly">
            <bool>true</bool>
           </property>
          </widget>
         </item>
         <item>
-         <spacer name="horizontalSpacer" >
-          <property name="orientation" >
+         <spacer name="horizontalSpacer">
+          <property name="orientation">
            <enum>Qt::Horizontal</enum>
           </property>
-          <property name="sizeHint" stdset="0" >
+          <property name="sizeHint" stdset="0">
            <size>
             <width>40</width>
             <height>20</height>
@@ -381,42 +382,42 @@
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox_3" >
-     <property name="title" >
+    <widget class="QGroupBox" name="groupBox_3">
+     <property name="title">
       <string>Selection</string>
      </property>
-     <layout class="QVBoxLayout" name="_2" >
+     <layout class="QVBoxLayout" name="_2">
       <item>
-       <layout class="QGridLayout" name="_3" >
-        <item row="0" column="0" >
-         <widget class="QCheckBox" name="customSelColourCheckBox" >
-          <property name="toolTip" >
+       <layout class="QGridLayout" name="_3">
+        <item row="0" column="0">
+         <widget class="QCheckBox" name="customSelColourCheckBox">
+          <property name="toolTip">
            <string>Select to use custom selection colours</string>
           </property>
-          <property name="whatsThis" >
-           <string>&lt;b>Use custom selection colours&lt;/b>&lt;p>Select this entry in order to use custom selection colours in the editor and shell windows. The colours for the selection foreground and background are defined on the colours page.&lt;/p></string>
+          <property name="whatsThis">
+           <string>&lt;b&gt;Use custom selection colours&lt;/b&gt;&lt;p&gt;Select this entry in order to use custom selection colours in the editor and shell windows. The colours for the selection foreground and background are defined on the colours page.&lt;/p&gt;</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>Use custom selection colours</string>
           </property>
          </widget>
         </item>
-        <item row="0" column="1" >
-         <widget class="QCheckBox" name="colourizeSelTextCheckBox" >
-          <property name="toolTip" >
+        <item row="0" column="1">
+         <widget class="QCheckBox" name="colourizeSelTextCheckBox">
+          <property name="toolTip">
            <string>Select, if selected text should be colourized by the lexer.</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>Colourize selected text</string>
           </property>
          </widget>
         </item>
-        <item row="1" column="0" >
-         <widget class="QCheckBox" name="extentSelEolCheckBox" >
-          <property name="toolTip" >
+        <item row="1" column="0">
+         <widget class="QCheckBox" name="extentSelEolCheckBox">
+          <property name="toolTip">
            <string>Select to extend selection to end of line</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>Extend selection to end of line</string>
           </property>
          </widget>
@@ -424,49 +425,49 @@
        </layout>
       </item>
       <item>
-       <layout class="QHBoxLayout" name="_4" >
+       <layout class="QHBoxLayout" name="_4">
         <item>
-         <widget class="QLabel" name="TextLabel2_2_2_2_2_4" >
-          <property name="text" >
+         <widget class="QLabel" name="TextLabel2_2_2_2_2_4">
+          <property name="text">
            <string>Selection foreground:</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QPushButton" name="selectionForegroundButton" >
-          <property name="minimumSize" >
+         <widget class="QPushButton" name="selectionForegroundButton">
+          <property name="minimumSize">
            <size>
             <width>100</width>
             <height>0</height>
            </size>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Select the foreground colour for the selection.</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string/>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QLabel" name="TextLabel2_2_2_2_2_5" >
-          <property name="text" >
+         <widget class="QLabel" name="TextLabel2_2_2_2_2_5">
+          <property name="text">
            <string>Selection background:</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QPushButton" name="selectionBackgroundButton" >
-          <property name="minimumSize" >
+         <widget class="QPushButton" name="selectionBackgroundButton">
+          <property name="minimumSize">
            <size>
             <width>100</width>
             <height>0</height>
            </size>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Select the background colour for the selection.</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string/>
           </property>
          </widget>
@@ -477,52 +478,52 @@
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox_4" >
-     <property name="title" >
+    <widget class="QGroupBox" name="groupBox_4">
+     <property name="title">
       <string>Caret</string>
      </property>
-     <layout class="QVBoxLayout" name="_5" >
+     <layout class="QVBoxLayout" name="_5">
       <item>
-       <widget class="QCheckBox" name="caretlineVisibleCheckBox" >
-        <property name="toolTip" >
+       <widget class="QCheckBox" name="caretlineVisibleCheckBox">
+        <property name="toolTip">
          <string>Select, whether the caretline should be highlighted</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Caretline visible</string>
         </property>
        </widget>
       </item>
       <item>
-       <layout class="QHBoxLayout" name="_6" >
+       <layout class="QHBoxLayout" name="_6">
         <item>
-         <widget class="QLabel" name="textLabel1_7" >
-          <property name="text" >
+         <widget class="QLabel" name="textLabel1_7">
+          <property name="text">
            <string>Caret width:</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QSpinBox" name="caretWidthSpinBox" >
-          <property name="toolTip" >
+         <widget class="QSpinBox" name="caretWidthSpinBox">
+          <property name="toolTip">
            <string>Select caret width (1, 2 or 3 pixels)</string>
           </property>
-          <property name="minimum" >
+          <property name="minimum">
            <number>1</number>
           </property>
-          <property name="maximum" >
+          <property name="maximum">
            <number>3</number>
           </property>
          </widget>
         </item>
         <item>
          <spacer>
-          <property name="orientation" >
+          <property name="orientation">
            <enum>Qt::Horizontal</enum>
           </property>
-          <property name="sizeType" >
+          <property name="sizeType">
            <enum>QSizePolicy::Expanding</enum>
           </property>
-          <property name="sizeHint" stdset="0" >
+          <property name="sizeHint" stdset="0">
            <size>
             <width>40</width>
             <height>20</height>
@@ -533,49 +534,49 @@
        </layout>
       </item>
       <item>
-       <layout class="QHBoxLayout" name="_7" >
+       <layout class="QHBoxLayout" name="_7">
         <item>
-         <widget class="QLabel" name="TextLabel2_2_2_2_2_2" >
-          <property name="text" >
+         <widget class="QLabel" name="TextLabel2_2_2_2_2_2">
+          <property name="text">
            <string>Caret foreground:</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QPushButton" name="caretForegroundButton" >
-          <property name="minimumSize" >
+         <widget class="QPushButton" name="caretForegroundButton">
+          <property name="minimumSize">
            <size>
             <width>100</width>
             <height>0</height>
            </size>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Select the colour for the caret.</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string/>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QLabel" name="TextLabel2_2_2_2_2_3" >
-          <property name="text" >
+         <widget class="QLabel" name="TextLabel2_2_2_2_2_3">
+          <property name="text">
            <string>Caretline background:</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QPushButton" name="caretlineBackgroundButton" >
-          <property name="minimumSize" >
+         <widget class="QPushButton" name="caretlineBackgroundButton">
+          <property name="minimumSize">
            <size>
             <width>100</width>
             <height>0</height>
            </size>
           </property>
-          <property name="toolTip" >
+          <property name="toolTip">
            <string>Select the background colour for the line containing the caret.</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string/>
           </property>
          </widget>
@@ -586,53 +587,53 @@
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox_2" >
-     <property name="title" >
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
       <string>Debugging Line Markers</string>
      </property>
-     <layout class="QHBoxLayout" name="_8" >
+     <layout class="QHBoxLayout" name="_8">
       <item>
-       <widget class="QLabel" name="TextLabel3_2_2" >
-        <property name="text" >
+       <widget class="QLabel" name="TextLabel3_2_2">
+        <property name="text">
          <string>Current line marker:</string>
         </property>
        </widget>
       </item>
       <item>
-       <widget class="QPushButton" name="currentLineMarkerButton" >
-        <property name="minimumSize" >
+       <widget class="QPushButton" name="currentLineMarkerButton">
+        <property name="minimumSize">
          <size>
           <width>100</width>
           <height>0</height>
          </size>
         </property>
-        <property name="toolTip" >
+        <property name="toolTip">
          <string>Select the colour for the current line marker.</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string/>
         </property>
        </widget>
       </item>
       <item>
-       <widget class="QLabel" name="TextLabel4_2_2" >
-        <property name="text" >
+       <widget class="QLabel" name="TextLabel4_2_2">
+        <property name="text">
          <string>Error line marker:</string>
         </property>
        </widget>
       </item>
       <item>
-       <widget class="QPushButton" name="errorMarkerButton" >
-        <property name="minimumSize" >
+       <widget class="QPushButton" name="errorMarkerButton">
+        <property name="minimumSize">
          <size>
           <width>100</width>
           <height>0</height>
          </size>
         </property>
-        <property name="toolTip" >
+        <property name="toolTip">
          <string>Select the colour for the error line marker.</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string/>
         </property>
        </widget>
@@ -641,109 +642,109 @@
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox_6" >
-     <property name="title" >
+    <widget class="QGroupBox" name="groupBox_6">
+     <property name="title">
       <string>Braces</string>
      </property>
-     <layout class="QGridLayout" name="_9" >
-      <item row="0" column="0" colspan="2" >
-       <widget class="QCheckBox" name="bracehighlightingCheckBox" >
-        <property name="toolTip" >
+     <layout class="QGridLayout" name="_9">
+      <item row="0" column="0" colspan="2">
+       <widget class="QCheckBox" name="bracehighlightingCheckBox">
+        <property name="toolTip">
          <string>Select whether matching and bad braces shall be highlighted.</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Highlight braces</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="0" >
-       <widget class="QLabel" name="TextLabel1_3_2" >
-        <property name="text" >
+      <item row="1" column="0">
+       <widget class="QLabel" name="TextLabel1_3_2">
+        <property name="text">
          <string>Matched braces:</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="1" >
-       <widget class="QPushButton" name="matchingBracesButton" >
-        <property name="minimumSize" >
+      <item row="1" column="1">
+       <widget class="QPushButton" name="matchingBracesButton">
+        <property name="minimumSize">
          <size>
           <width>100</width>
           <height>0</height>
          </size>
         </property>
-        <property name="toolTip" >
+        <property name="toolTip">
          <string>Select the colour for highlighting matching braces.</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string/>
         </property>
        </widget>
       </item>
-      <item row="1" column="2" >
-       <widget class="QLabel" name="TextLabel1_3_2_2" >
-        <property name="text" >
+      <item row="1" column="2">
+       <widget class="QLabel" name="TextLabel1_3_2_2">
+        <property name="text">
          <string>Matched braces background:</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="3" >
-       <widget class="QPushButton" name="matchingBracesBackButton" >
-        <property name="minimumSize" >
+      <item row="1" column="3">
+       <widget class="QPushButton" name="matchingBracesBackButton">
+        <property name="minimumSize">
          <size>
           <width>100</width>
           <height>0</height>
          </size>
         </property>
-        <property name="toolTip" >
+        <property name="toolTip">
          <string>Select the background colour for highlighting matching braces.</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string/>
         </property>
        </widget>
       </item>
-      <item row="2" column="0" >
-       <widget class="QLabel" name="TextLabel2_2_2" >
-        <property name="minimumSize" >
+      <item row="2" column="0">
+       <widget class="QLabel" name="TextLabel2_2_2">
+        <property name="minimumSize">
          <size>
           <width>100</width>
           <height>0</height>
          </size>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Unmatched brace:</string>
         </property>
        </widget>
       </item>
-      <item row="2" column="1" >
-       <widget class="QPushButton" name="nonmatchingBracesButton" >
-        <property name="toolTip" >
+      <item row="2" column="1">
+       <widget class="QPushButton" name="nonmatchingBracesButton">
+        <property name="toolTip">
          <string>Select the colour for  highlighting nonmatching braces.</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string/>
         </property>
        </widget>
       </item>
-      <item row="2" column="2" >
-       <widget class="QLabel" name="TextLabel2_2_2_3" >
-        <property name="minimumSize" >
+      <item row="2" column="2">
+       <widget class="QLabel" name="TextLabel2_2_2_3">
+        <property name="minimumSize">
          <size>
           <width>100</width>
           <height>0</height>
          </size>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Unmatched brace background:</string>
         </property>
        </widget>
       </item>
-      <item row="2" column="3" >
-       <widget class="QPushButton" name="nonmatchingBracesBackButton" >
-        <property name="toolTip" >
+      <item row="2" column="3">
+       <widget class="QPushButton" name="nonmatchingBracesBackButton">
+        <property name="toolTip">
          <string>Select the background colour for  highlighting nonmatching braces.</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string/>
         </property>
        </widget>
@@ -752,29 +753,29 @@
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox_7" >
-     <property name="title" >
+    <widget class="QGroupBox" name="groupBox_7">
+     <property name="title">
       <string>End of Line</string>
      </property>
-     <layout class="QVBoxLayout" name="_10" >
+     <layout class="QVBoxLayout" name="_10">
       <item>
-       <layout class="QGridLayout" name="_11" >
-        <item row="0" column="0" >
-         <widget class="QCheckBox" name="eolCheckBox" >
-          <property name="toolTip" >
+       <layout class="QGridLayout" name="_11">
+        <item row="0" column="0">
+         <widget class="QCheckBox" name="eolCheckBox">
+          <property name="toolTip">
            <string>Select whether end of line shall be shown</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>Show End of Line</string>
           </property>
          </widget>
         </item>
-        <item row="0" column="1" >
-         <widget class="QCheckBox" name="wrapLongLinesCheckBox" >
-          <property name="toolTip" >
+        <item row="0" column="1">
+         <widget class="QCheckBox" name="wrapLongLinesCheckBox">
+          <property name="toolTip">
            <string>Select, whether long lines should be wrapped</string>
           </property>
-          <property name="text" >
+          <property name="text">
            <string>Wrap long lines</string>
           </property>
          </widget>
@@ -782,20 +783,20 @@
        </layout>
       </item>
       <item>
-       <widget class="QGroupBox" name="groupBox_9" >
-        <property name="title" >
+       <widget class="QGroupBox" name="groupBox_9">
+        <property name="title">
          <string>Edge Mode</string>
         </property>
-        <layout class="QGridLayout" name="_13" >
-         <item row="0" column="2" colspan="2" >
+        <layout class="QGridLayout" name="_13">
+         <item row="0" column="2" colspan="2">
           <spacer>
-           <property name="orientation" >
+           <property name="orientation">
             <enum>Qt::Horizontal</enum>
            </property>
-           <property name="sizeType" >
+           <property name="sizeType">
             <enum>QSizePolicy::Expanding</enum>
            </property>
-           <property name="sizeHint" stdset="0" >
+           <property name="sizeHint" stdset="0">
             <size>
              <width>211</width>
              <height>20</height>
@@ -803,15 +804,15 @@
            </property>
           </spacer>
          </item>
-         <item row="2" column="2" colspan="2" >
+         <item row="2" column="2" colspan="2">
           <spacer>
-           <property name="orientation" >
+           <property name="orientation">
             <enum>Qt::Horizontal</enum>
            </property>
-           <property name="sizeType" >
+           <property name="sizeType">
             <enum>QSizePolicy::Expanding</enum>
            </property>
-           <property name="sizeHint" stdset="0" >
+           <property name="sizeHint" stdset="0">
             <size>
              <width>201</width>
              <height>31</height>
@@ -819,113 +820,113 @@
            </property>
           </spacer>
          </item>
-         <item row="2" column="1" >
-          <widget class="QPushButton" name="edgeBackgroundColorButton" >
-           <property name="minimumSize" >
+         <item row="2" column="1">
+          <widget class="QPushButton" name="edgeBackgroundColorButton">
+           <property name="minimumSize">
             <size>
              <width>100</width>
              <height>0</height>
             </size>
            </property>
-           <property name="toolTip" >
+           <property name="toolTip">
             <string>Select the colour for the edge marker.</string>
            </property>
-           <property name="text" >
+           <property name="text">
             <string/>
            </property>
           </widget>
          </item>
-         <item row="2" column="0" >
-          <widget class="QLabel" name="TextLabel13_3_2_2" >
-           <property name="text" >
+         <item row="2" column="0">
+          <widget class="QLabel" name="TextLabel13_3_2_2">
+           <property name="text">
             <string>Background colour:</string>
            </property>
           </widget>
          </item>
-         <item row="1" column="1" colspan="2" >
-          <widget class="QSlider" name="edgeLineColumnSlider" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Fixed" hsizetype="Expanding" >
+         <item row="1" column="1" colspan="2">
+          <widget class="QSlider" name="edgeLineColumnSlider">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
              <horstretch>11</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
-           <property name="toolTip" >
+           <property name="toolTip">
             <string>Move to set the edge column.</string>
            </property>
-           <property name="minimum" >
+           <property name="minimum">
             <number>0</number>
            </property>
-           <property name="maximum" >
+           <property name="maximum">
             <number>160</number>
            </property>
-           <property name="value" >
+           <property name="value">
             <number>80</number>
            </property>
-           <property name="orientation" >
+           <property name="orientation">
             <enum>Qt::Horizontal</enum>
            </property>
-           <property name="tickInterval" >
+           <property name="tickInterval">
             <number>10</number>
            </property>
           </widget>
          </item>
-         <item row="1" column="3" >
-          <widget class="QLCDNumber" name="edgeLineColumnLCD" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
+         <item row="1" column="3">
+          <widget class="QLCDNumber" name="edgeLineColumnLCD">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
              <horstretch>1</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
-           <property name="toolTip" >
+           <property name="toolTip">
             <string>Displays the selected tab width.</string>
            </property>
-           <property name="numDigits" >
+           <property name="numDigits">
             <number>3</number>
            </property>
-           <property name="segmentStyle" >
+           <property name="segmentStyle">
             <enum>QLCDNumber::Flat</enum>
            </property>
-           <property name="value" stdset="0" >
+           <property name="value" stdset="0">
             <double>80.000000000000000</double>
            </property>
           </widget>
          </item>
-         <item row="1" column="0" >
-          <widget class="QLabel" name="TextLabel13_3_2" >
-           <property name="text" >
+         <item row="1" column="0">
+          <widget class="QLabel" name="TextLabel13_3_2">
+           <property name="text">
             <string>Column number:</string>
            </property>
           </widget>
          </item>
-         <item row="0" column="0" >
-          <widget class="QLabel" name="textLabel1_14" >
-           <property name="text" >
+         <item row="0" column="0">
+          <widget class="QLabel" name="textLabel1_14">
+           <property name="text">
             <string>Mode:</string>
            </property>
           </widget>
          </item>
-         <item row="0" column="1" >
-          <widget class="QComboBox" name="edgeModeCombo" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Fixed" hsizetype="Minimum" >
+         <item row="0" column="1">
+          <widget class="QComboBox" name="edgeModeCombo">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
            <item>
-            <property name="text" >
+            <property name="text">
              <string>Disabled</string>
             </property>
            </item>
            <item>
-            <property name="text" >
+            <property name="text">
              <string>Draw Line</string>
             </property>
            </item>
            <item>
-            <property name="text" >
+            <property name="text">
              <string>Change Background Colour</string>
             </property>
            </item>
@@ -938,27 +939,84 @@
     </widget>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox_10" >
-     <property name="title" >
+    <widget class="QGroupBox" name="groupBox_8">
+     <property name="title">
+      <string>Zoom</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <item>
+       <widget class="QLabel" name="TextLabel13_2_2_3">
+        <property name="text">
+         <string>Initial zoom factor:</string>
+        </property>
+        <property name="buddy">
+         <cstring>linenowidthSlider</cstring>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QSlider" name="zoomfactorSlider">
+        <property name="toolTip">
+         <string>Move to set the initial zoom factor</string>
+        </property>
+        <property name="minimum">
+         <number>-10</number>
+        </property>
+        <property name="maximum">
+         <number>20</number>
+        </property>
+        <property name="value">
+         <number>0</number>
+        </property>
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="tickInterval">
+         <number>5</number>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLCDNumber" name="zoomfactorLCD">
+        <property name="toolTip">
+         <string>Displays the selected initial zoom factor</string>
+        </property>
+        <property name="numDigits">
+         <number>3</number>
+        </property>
+        <property name="segmentStyle">
+         <enum>QLCDNumber::Flat</enum>
+        </property>
+        <property name="value" stdset="0">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_10">
+     <property name="title">
       <string>Various</string>
      </property>
-     <layout class="QGridLayout" name="_14" >
-      <item row="0" column="0" >
-       <widget class="QCheckBox" name="whitespaceCheckBox" >
-        <property name="toolTip" >
+     <layout class="QGridLayout" name="_14">
+      <item row="0" column="0">
+       <widget class="QCheckBox" name="whitespaceCheckBox">
+        <property name="toolTip">
          <string>Select whether whitspace characters shall be shown</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Show Whitespace</string>
         </property>
        </widget>
       </item>
-      <item row="0" column="1" >
-       <widget class="QCheckBox" name="miniMenuCheckBox" >
-        <property name="toolTip" >
+      <item row="0" column="1">
+       <widget class="QCheckBox" name="miniMenuCheckBox">
+        <property name="toolTip">
          <string>Select to show a minimalistic context menu</string>
         </property>
-        <property name="text" >
+        <property name="text">
          <string>Show minimal context menu</string>
         </property>
        </widget>
@@ -968,10 +1026,10 @@
    </item>
    <item>
     <spacer>
-     <property name="orientation" >
+     <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
-     <property name="sizeHint" stdset="0" >
+     <property name="sizeHint" stdset="0">
       <size>
        <width>558</width>
        <height>20</height>
@@ -1015,6 +1073,7 @@
   <tabstop>edgeModeCombo</tabstop>
   <tabstop>edgeLineColumnSlider</tabstop>
   <tabstop>edgeBackgroundColorButton</tabstop>
+  <tabstop>zoomfactorSlider</tabstop>
   <tabstop>whitespaceCheckBox</tabstop>
   <tabstop>miniMenuCheckBox</tabstop>
  </tabstops>
@@ -1026,11 +1085,11 @@
    <receiver>linenowidthLCD</receiver>
    <slot>display(int)</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>510</x>
-     <y>247</y>
+     <y>244</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>551</x>
      <y>247</y>
     </hint>
@@ -1042,13 +1101,29 @@
    <receiver>edgeLineColumnLCD</receiver>
    <slot>display(int)</slot>
    <hints>
-    <hint type="sourcelabel" >
-     <x>417</x>
-     <y>1132</y>
+    <hint type="sourcelabel">
+     <x>492</x>
+     <y>977</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>544</x>
+     <y>981</y>
     </hint>
-    <hint type="destinationlabel" >
+   </hints>
+  </connection>
+  <connection>
+   <sender>zoomfactorSlider</sender>
+   <signal>valueChanged(int)</signal>
+   <receiver>zoomfactorLCD</receiver>
+   <slot>display(int)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>390</x>
+     <y>1090</y>
+    </hint>
+    <hint type="destinationlabel">
      <x>541</x>
-     <y>1155</y>
+     <y>1092</y>
     </hint>
    </hints>
   </connection>
--- a/Preferences/__init__.py	Sat May 08 17:38:46 2010 +0200
+++ b/Preferences/__init__.py	Sat May 08 18:01:31 2010 +0200
@@ -279,6 +279,8 @@
         "DefaultOpenFilter" : "",
         "DefaultSaveFilter" : "",
         
+        "ZoomFactor" : 0, 
+        
         # All (most) lexers
         "AllFoldCompact" : True,
         
@@ -1212,7 +1214,7 @@
                  "CaretWidth", "AutoCompletionSource", "AutoCompletionThreshold", 
                  "CallTipsVisible", "CallTipsStyle", "MarkOccurrencesTimeout", 
                  "AutoSpellCheckChunkSize", "SpellCheckingMinWordSize", 
-                 "PostScriptLevel", "EOLMode"]:
+                 "PostScriptLevel", "EOLMode", "ZoomFactor"]:
         return int(prefClass.settings.value("Editor/" + key, 
             prefClass.editorDefaults[key]))
     else:
--- a/QScintilla/Editor.py	Sat May 08 17:38:46 2010 +0200
+++ b/QScintilla/Editor.py	Sat May 08 18:01:31 2010 +0200
@@ -3337,6 +3337,8 @@
             self.setWrapVisualFlags(\
                 QsciScintilla.WrapFlagNone, QsciScintilla.WrapFlagNone)
         
+        self.zoomTo(Preferences.getEditor("ZoomFactor"))
+        
         self.searchIndicator = QsciScintilla.INDIC_CONTAINER
         self.indicatorDefine(self.searchIndicator, QsciScintilla.INDIC_BOX, 
             Preferences.getEditorColour("SearchMarkers"))
--- a/changelog	Sat May 08 17:38:46 2010 +0200
+++ b/changelog	Sat May 08 18:01:31 2010 +0200
@@ -3,6 +3,7 @@
 Version 5.0-snapshot-2010mmdd:
 - bug fixes
 - added code to save the editor zoom factor in the session file
+- added code to configure the zoom factor a file is opened with
 
 Version 5.0-snapshot-20100508:
 - bug fixes

eric ide

mercurial