r14799 by cbradney - #7367: Add Show Rulers to File -> Preferences -> Display (new prefs dialog only), and fix the fact that the view never used this setting in prefs on startup

scribus-commit scribus-commit at lists.scribus.net
Tue Feb 23 23:20:25 CET 2010


Revision: 14799
Author: cbradney
Date: 2010-02-23T22:18:53.221303Z
Commit message: #7367: Add Show Rulers to File -> Preferences -> Display (new prefs dialog only), and fix the fact that the view never used this setting in prefs on startup

Changeset: 
M  /trunk/Scribus/scribus/ui/prefs_display.cpp
M  /trunk/Scribus/scribus/scribusview.cpp
M  /trunk/Scribus/scribus/ui/prefs_displaybase.ui

Diffs:
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp	(revision 14798)
+++ scribus/scribusview.cpp	(revision 14799)
@@ -288,6 +288,7 @@
 	Doc->SubMode = -1;
 	storedFramesShown = Doc->guidesSettings.framesShown;
 	storedShowControls = Doc->guidesSettings.showControls;
+	setRulersShown(Doc->guidesSettings.rulersShown);
 	m_canvas->m_viewMode.viewAsPreview = false;
 	m_canvas->setPreviewVisual(-1);
 //	shiftSelItems = false;
Index: scribus/ui/prefs_display.cpp
===================================================================
--- scribus/ui/prefs_display.cpp	(revision 14798)
+++ scribus/ui/prefs_display.cpp	(revision 14799)
@@ -69,6 +69,7 @@
 
 	showImagesCheckBox->setChecked(prefsData->guidesPrefs.showPic);
 	showControlCharsCheckBox->setChecked(prefsData->guidesPrefs.showControls);
+	showRulersCheckBox->setChecked(prefsData->guidesPrefs.rulersShown);
 	showRulersRelativeToPageCheckBox->setChecked(prefsData->guidesPrefs.rulerMode);
 	showTextChainsCheckBox->setChecked(prefsData->guidesPrefs.linkShown);
 	showFramesCheckBox->setChecked(prefsData->guidesPrefs.framesShown);
@@ -357,6 +358,7 @@
 {
 	prefsData->guidesPrefs.showPic=showImagesCheckBox->isChecked();
 	prefsData->guidesPrefs.showControls=showControlCharsCheckBox->isChecked();
+	prefsData->guidesPrefs.rulersShown=showRulersCheckBox->isChecked();
 	prefsData->guidesPrefs.rulerMode=showRulersRelativeToPageCheckBox->isChecked();
 	prefsData->guidesPrefs.linkShown=showTextChainsCheckBox->isChecked();
 	prefsData->guidesPrefs.framesShown=showFramesCheckBox->isChecked();
Index: scribus/ui/prefs_displaybase.ui
===================================================================
--- scribus/ui/prefs_displaybase.ui	(revision 14798)
+++ scribus/ui/prefs_displaybase.ui	(revision 14799)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>721</width>
-    <height>919</height>
+    <width>686</width>
+    <height>486</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -36,41 +36,16 @@
     </widget>
    </item>
    <item>
-    <widget class="QScrollArea" name="scrollArea">
-     <property name="widgetResizable">
-      <bool>true</bool>
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
+      <number>0</number>
      </property>
-     <widget class="QWidget" name="scrollAreaWidgetContents">
-      <property name="geometry">
-       <rect>
-        <x>0</x>
-        <y>0</y>
-        <width>678</width>
-        <height>1143</height>
-       </rect>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout_5">
+     <widget class="QWidget" name="tab">
+      <attribute name="title">
+       <string>Pages</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_7">
        <item>
-        <widget class="QLabel" name="label_2">
-         <property name="font">
-          <font>
-           <weight>75</weight>
-           <bold>true</bold>
-          </font>
-         </property>
-         <property name="text">
-          <string>Page Display</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="Line" name="line_2">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-        </widget>
-       </item>
-       <item>
         <layout class="QVBoxLayout" name="verticalLayout_2">
          <item>
           <widget class="QCheckBox" name="showImagesCheckBox">
@@ -87,6 +62,13 @@
           </widget>
          </item>
          <item>
+          <widget class="QCheckBox" name="showRulersCheckBox">
+           <property name="text">
+            <string>Show Rulers</string>
+           </property>
+          </widget>
+         </item>
+         <item>
           <widget class="QCheckBox" name="showRulersRelativeToPageCheckBox">
            <property name="text">
             <string>Show Rulers Relative to Page</string>
@@ -154,7 +136,7 @@
         </spacer>
        </item>
        <item>
-        <widget class="QLabel" name="label_3">
+        <widget class="QLabel" name="label_8">
          <property name="font">
           <font>
            <weight>75</weight>
@@ -162,18 +144,68 @@
           </font>
          </property>
          <property name="text">
-          <string>Scratch Space</string>
+          <string>Gaps Between Pages</string>
          </property>
         </widget>
        </item>
        <item>
-        <widget class="Line" name="line_3">
+        <widget class="Line" name="line_4">
          <property name="orientation">
           <enum>Qt::Horizontal</enum>
          </property>
         </widget>
        </item>
        <item>
+        <layout class="QFormLayout" name="formLayout_2">
+         <property name="fieldGrowthPolicy">
+          <enum>QFormLayout::FieldsStayAtSizeHint</enum>
+         </property>
+         <property name="formAlignment">
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_9">
+           <property name="text">
+            <string>Horizontal:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="1">
+          <widget class="ScrSpinBox" name="pageGapHorizontalSpinBox"/>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_10">
+           <property name="text">
+            <string>Vertical:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="1">
+          <widget class="ScrSpinBox" name="pageGapVerticalSpinBox"/>
+         </item>
+        </layout>
+       </item>
+       <item>
+        <spacer name="verticalSpacer_8">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>4</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_2">
+      <attribute name="title">
+       <string>Scratch Space</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_6">
+       <item>
         <layout class="QFormLayout" name="formLayout">
          <property name="formAlignment">
           <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
@@ -221,108 +253,26 @@
         </layout>
        </item>
        <item>
-        <spacer name="verticalSpacer_2">
+        <spacer name="verticalSpacer_7">
          <property name="orientation">
           <enum>Qt::Vertical</enum>
          </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Fixed</enum>
-         </property>
          <property name="sizeHint" stdset="0">
           <size>
            <width>20</width>
-           <height>20</height>
+           <height>195</height>
           </size>
          </property>
         </spacer>
        </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_3">
+      <attribute name="title">
+       <string>Display Scaling</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_4">
        <item>
-        <widget class="QLabel" name="label_8">
-         <property name="font">
-          <font>
-           <weight>75</weight>
-           <bold>true</bold>
-          </font>
-         </property>
-         <property name="text">
-          <string>Gaps Between Pages</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="Line" name="line_4">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <layout class="QFormLayout" name="formLayout_2">
-         <property name="fieldGrowthPolicy">
-          <enum>QFormLayout::FieldsStayAtSizeHint</enum>
-         </property>
-         <property name="formAlignment">
-          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-         </property>
-         <item row="0" column="0">
-          <widget class="QLabel" name="label_9">
-           <property name="text">
-            <string>Horizontal:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1">
-          <widget class="ScrSpinBox" name="pageGapHorizontalSpinBox"/>
-         </item>
-         <item row="1" column="0">
-          <widget class="QLabel" name="label_10">
-           <property name="text">
-            <string>Vertical:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="1">
-          <widget class="ScrSpinBox" name="pageGapVerticalSpinBox"/>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer name="verticalSpacer_4">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Fixed</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item>
-        <widget class="QLabel" name="label_11">
-         <property name="font">
-          <font>
-           <weight>75</weight>
-           <bold>true</bold>
-          </font>
-         </property>
-         <property name="text">
-          <string>Adjust Display Size</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="Line" name="line_5">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-        </widget>
-       </item>
-       <item>
         <layout class="QHBoxLayout" name="horizontalLayout">
          <item>
           <widget class="QSlider" name="adjustDisplaySlider">
@@ -395,42 +345,26 @@
         </layout>
        </item>
        <item>
-        <spacer name="verticalSpacer_3">
+        <spacer name="verticalSpacer_6">
          <property name="orientation">
           <enum>Qt::Vertical</enum>
          </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Fixed</enum>
-         </property>
          <property name="sizeHint" stdset="0">
           <size>
            <width>20</width>
-           <height>20</height>
+           <height>263</height>
           </size>
          </property>
         </spacer>
        </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tab_4">
+      <attribute name="title">
+       <string>Colors</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout">
        <item>
-        <widget class="QLabel" name="label_12">
-         <property name="font">
-          <font>
-           <weight>75</weight>
-           <bold>true</bold>
-          </font>
-         </property>
-         <property name="text">
-          <string>Colors</string>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="Line" name="line_6">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-        </widget>
-       </item>
-       <item>
         <layout class="QFormLayout" name="formLayout_3">
          <property name="fieldGrowthPolicy">
           <enum>QFormLayout::FieldsStayAtSizeHint</enum>
@@ -566,6 +500,19 @@
          </item>
         </layout>
        </item>
+       <item>
+        <spacer name="verticalSpacer_5">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>33</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
       </layout>
      </widget>
     </widget>




More information about the scribus-commit mailing list