]> git.lyx.org Git - features.git/commitdiff
TOC Widget beautification by Stefan Schimanski:
authorAbdelrazak Younes <younes@lyx.org>
Fri, 4 May 2007 17:37:05 +0000 (17:37 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 4 May 2007 17:37:05 +0000 (17:37 +0000)
* lib/images: 3 new icons
* TocUi/TocWidget: Replace labeled button with icon buttons.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18202 a592a061-630c-0410-9148-cb99ea01b6c8

development/scons/scons_manifest.py
lib/Makefile.am
lib/images/demote.xpm [new file with mode: 0644]
lib/images/promote.xpm [new file with mode: 0644]
lib/images/reload.xpm [new file with mode: 0644]
src/frontends/qt4/TocWidget.h
src/frontends/qt4/ui/TocUi.ui

index fb3a3139ad6ff1295e6150eaacfc8d20d822f620..1c69a5f4d6758f98b05f9d5eb39fddf73061fb22 100644 (file)
@@ -1550,6 +1550,7 @@ lib_images_files = Split('''
     changes-track.xpm
     copy.xpm
     cut.xpm
+    demote.xpm
     depth-decrement.xpm
     depth-increment.xpm
     dialog-preferences.xpm
@@ -1599,11 +1600,13 @@ lib_images_files = Split('''
     note-insert.xpm
     note-next.xpm
     paste.xpm
+    promote.xpm
     psnfss1.xpm
     psnfss2.xpm
     psnfss3.xpm
     psnfss4.xpm
     redo.xpm
+    reload.xpm
     standard.xpm
     tabular-feature_align-center.xpm
     tabular-feature_align-left.xpm
index 092b4c1db6197c80cbf71c69473aa2db9608a51b..d262afe8bf408ea3a37d175869de1006b2bac216 100644 (file)
@@ -260,6 +260,7 @@ dist_images_DATA = \
        images/changes-track.xpm \
        images/copy.xpm \
        images/cut.xpm \
+       images/demote.xpm \
        images/depth-decrement.xpm \
        images/depth-increment.xpm \
        images/dialog-preferences.xpm \
@@ -309,11 +310,13 @@ dist_images_DATA = \
        images/note-insert.xpm \
        images/note-next.xpm \
        images/paste.xpm \
+       images/promote.xpm \
        images/psnfss1.xpm \
        images/psnfss2.xpm \
        images/psnfss3.xpm \
        images/psnfss4.xpm \
        images/redo.xpm \
+       images/reload.xpm \
        images/standard.xpm \
        images/tabular-feature_align-center.xpm \
        images/tabular-feature_align-left.xpm \
diff --git a/lib/images/demote.xpm b/lib/images/demote.xpm
new file mode 100644 (file)
index 0000000..0d7e3c3
--- /dev/null
@@ -0,0 +1,31 @@
+/* XPM */\r
+static char *demote[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"20 20 5 1",\r
+"  c black",\r
+". c #0000BC",\r
+"X c blue",\r
+"o c #C71302",\r
+"O c None",\r
+/* pixels */\r
+"OOOOOOOOOOOOOOOOOOOO",\r
+"OOOO OOOOOOOOOOOOOOO",\r
+"OOO  OOOOOOOOOOOOOOO",\r
+"OOOO OOOO        OOO",\r
+"OOOO OOOOOOOOOOOOOOO",\r
+"OOOO OOOOOOOOX.OOOOO",\r
+"OOOOOOOOOOOOOXX.OOOO",\r
+"OOOO OOOOOOOOXXX.OOO",\r
+"OOO O OOXXXXXXXXX.OO",\r
+"OOOOO OOXXXXXXXXXX.O",\r
+"OOOO OOOXXXXXXXXX.OO",\r
+"OOO   OOOOOOOXXX.OOO",\r
+"OOOOOOOOOOOOOXX.OOOO",\r
+"OOO  OOOOOOOOX.OOOOO",\r
+"OOOOO OOOOOOOOOOOOOO",\r
+"OOOO OOOO        OOO",\r
+"OOOOO OOOOOOOOOOOOOO",\r
+"OOO  OOOOOOOOOOOOOOO",\r
+"OOOOOOOOOOOOOOOOOOOO",\r
+"OOOOOOOOOOOOOOOOOOOO"\r
+};\r
diff --git a/lib/images/promote.xpm b/lib/images/promote.xpm
new file mode 100644 (file)
index 0000000..b0ec7a3
--- /dev/null
@@ -0,0 +1,30 @@
+/* XPM */\r
+static char *promote[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"20 20 4 1",\r
+"  c black",\r
+". c #0000BC",\r
+"X c blue",\r
+"o c None",\r
+/* pixels */\r
+"oooooooooooooooooooo",\r
+"oooo ooooooooooooooo",\r
+"ooo  ooooooooooooooo",\r
+"oooo oooo        ooo",\r
+"oooo ooooooooooooooo",\r
+"oooo o.Xoooooooooooo",\r
+"ooooo.XXoooooooooooo",\r
+"oooo.XXXoooooo oooo ",\r
+"ooo.XXXXXXXXX o oo  ",\r
+"oo.XXXXXXXXXXoo ooo ",\r
+"ooo.XXXXXXXXXo oooo ",\r
+"oooo.XXXooooo   o o ",\r
+"ooooo.XXoooooooooooo",\r
+"oooo o.Xoooooooooooo",\r
+"ooo o oooooooooooooo",\r
+"ooooo ooo        ooo",\r
+"oooo ooooooooooooooo",\r
+"ooo   oooooooooooooo",\r
+"oooooooooooooooooooo",\r
+"oooooooooooooooooooo"\r
+};\r
diff --git a/lib/images/reload.xpm b/lib/images/reload.xpm
new file mode 100644 (file)
index 0000000..b4d199c
--- /dev/null
@@ -0,0 +1,28 @@
+/* XPM */\r
+static char *reload[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"16 16 6 1",\r
+"  c black",\r
+". c #004000",\r
+"X c #008000",\r
+"o c #00C000",\r
+"O c green",\r
+"+ c gray100",\r
+/* pixels */\r
+"++++++     +++++",\r
+"++++  Ooo  . +++",\r
+"+++ OooX ++   ++",\r
+"+++ ooX +++++ ++",\r
+"++ OoX +++++++ +",\r
+"++ ooX +++++++++",\r
+" OOooooX ++  +++",\r
+"+ OoooX ++    ++",\r
+"++ OoX ++      +",\r
+"+++ X ++        ",\r
+"++++ +++++    ++",\r
+"+ ++++++++    ++",\r
+"++ ++++++    +++",\r
+"++   ++      +++",\r
+"+++         ++++",\r
+"+++++     ++++++"\r
+};\r
index b46f83452200fc5a913fd9d24e5070b121bcea08..a84c0025e01a0aeca636d36c45967eba2c76b5d0 100644 (file)
@@ -41,13 +41,13 @@ protected Q_SLOTS:
        void selectionChanged(const QModelIndex & current,
                const QModelIndex & previous);
 
-       void on_updatePB_clicked();
+       void on_updateTB_clicked();
        void on_depthSL_valueChanged(int depth);
        void on_typeCO_activated(int value);
-       void on_moveUpPB_clicked();
-       void on_moveDownPB_clicked();
-       void on_moveInPB_clicked();
-       void on_moveOutPB_clicked();
+       void on_moveUpTB_clicked();
+       void on_moveDownTB_clicked();
+       void on_moveInTB_clicked();
+       void on_moveOutTB_clicked();
 
 protected:
        ///
index 92f69f68537c23b9a460b121f50340039b1a5ad4..09c8a37815ac063c4b0196ebc9a61cb7694d55b9 100644 (file)
@@ -8,8 +8,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>257</width>
-    <height>404</height>
+    <width>251</width>
+    <height>378</height>
    </rect>
   </property>
   <property name="windowTitle" >
    <property name="spacing" >
     <number>6</number>
    </property>
-   <item row="3" column="0" colspan="2" >
-    <layout class="QGridLayout" >
+   <item row="4" column="0" >
+    <layout class="QHBoxLayout" >
      <property name="margin" >
       <number>0</number>
      </property>
      <property name="spacing" >
       <number>6</number>
      </property>
-     <item row="0" column="0" >
-      <widget class="QPushButton" name="moveOutPB" >
+     <item>
+      <widget class="QToolButton" name="updateTB" >
        <property name="toolTip" >
-        <string>Decrease nesting depth of selected item</string>
+        <string>Update navigation tree</string>
        </property>
        <property name="text" >
-        <string>&lt;- P&amp;romote</string>
+        <string>...</string>
+       </property>
+       <property name="icon" >
+        <iconset>../../../../lib/images/reload.xpm</iconset>
+       </property>
+       <property name="iconSize" >
+        <size>
+         <width>20</width>
+         <height>20</height>
+        </size>
        </property>
       </widget>
      </item>
-     <item row="1" column="2" >
-      <widget class="QPushButton" name="moveDownPB" >
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>16</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QToolButton" name="moveOutTB" >
        <property name="toolTip" >
-        <string>Move selected item down by one</string>
+        <string>Decrease nesting depth of selected item</string>
        </property>
        <property name="text" >
-        <string>D&amp;own</string>
+        <string>...</string>
+       </property>
+       <property name="icon" >
+        <iconset>../../../../lib/images/promote.xpm</iconset>
+       </property>
+       <property name="iconSize" >
+        <size>
+         <width>20</width>
+         <height>20</height>
+        </size>
        </property>
       </widget>
      </item>
-     <item row="0" column="1" >
-      <widget class="QPushButton" name="moveInPB" >
+     <item>
+      <widget class="QToolButton" name="moveInTB" >
        <property name="toolTip" >
         <string>Increase nesting depth of selected item</string>
        </property>
        <property name="text" >
-        <string>De&amp;mote -></string>
+        <string>...</string>
+       </property>
+       <property name="icon" >
+        <iconset>../../../../lib/images/demote.xpm</iconset>
+       </property>
+       <property name="iconSize" >
+        <size>
+         <width>20</width>
+         <height>20</height>
+        </size>
        </property>
       </widget>
      </item>
-     <item row="1" column="0" colspan="2" >
-      <widget class="QPushButton" name="updatePB" >
+     <item>
+      <widget class="QToolButton" name="moveDownTB" >
        <property name="toolTip" >
-        <string>Update navigation tree</string>
+        <string>Move selected item down by one</string>
        </property>
        <property name="text" >
-        <string>Upd&amp;ate</string>
+        <string>...</string>
+       </property>
+       <property name="icon" >
+        <iconset>../../../../lib/images/down.xpm</iconset>
+       </property>
+       <property name="iconSize" >
+        <size>
+         <width>20</width>
+         <height>20</height>
+        </size>
        </property>
       </widget>
      </item>
-     <item row="0" column="2" >
-      <widget class="QPushButton" name="moveUpPB" >
+     <item>
+      <widget class="QToolButton" name="moveUpTB" >
        <property name="toolTip" >
         <string>Move selected item up by one</string>
        </property>
        <property name="text" >
-        <string>&amp;Up</string>
+        <string>...</string>
+       </property>
+       <property name="icon" >
+        <iconset>../../../../lib/images/up.xpm</iconset>
+       </property>
+       <property name="iconSize" >
+        <size>
+         <width>20</width>
+         <height>20</height>
+        </size>
        </property>
       </widget>
      </item>
     </layout>
    </item>
-   <item row="0" column="1" >
-    <widget class="QComboBox" name="typeCO" >
-     <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>0</vsizetype>
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="toolTip" >
-      <string>Switch between table of contents, list of figures or list of tables, if available</string>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0" colspan="2" >
-    <widget class="QTreeView" name="tocTV" >
-     <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>7</vsizetype>
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="0" colspan="2" >
+   <item row="3" column="0" >
     <widget class="QSlider" name="depthSL" >
      <property name="toolTip" >
       <string>Adjust the depth of the navigation tree</string>
      </property>
     </widget>
    </item>
-   <item row="0" column="0" >
+   <item row="2" column="0" >
+    <widget class="QTreeView" name="tocTV" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>7</hsizetype>
+       <vsizetype>7</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+    </widget>
+   </item>
+   <item row="1" column="0" >
     <widget class="QLabel" name="typeLA" >
      <property name="text" >
       <string>&amp;Type:</string>
      </property>
     </widget>
    </item>
+   <item row="0" column="0" >
+    <widget class="QComboBox" name="typeCO" >
+     <property name="sizePolicy" >
+      <sizepolicy>
+       <hsizetype>7</hsizetype>
+       <vsizetype>0</vsizetype>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="toolTip" >
+      <string>Switch between table of contents, list of figures or list of tables, if available</string>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <tabstops>
   <tabstop>typeCO</tabstop>
   <tabstop>tocTV</tabstop>
   <tabstop>depthSL</tabstop>
-  <tabstop>moveUpPB</tabstop>
-  <tabstop>moveDownPB</tabstop>
-  <tabstop>moveInPB</tabstop>
-  <tabstop>moveOutPB</tabstop>
  </tabstops>
  <includes>
   <include location="local" >qt_helpers.h</include>