TOC Widget beautification by Stefan Schimanski:

* 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
This commit is contained in:
Abdelrazak Younes 2007-05-04 17:37:05 +00:00
parent 1becd845c1
commit ab2324315b
7 changed files with 227 additions and 78 deletions

View 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

View 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 \

31
lib/images/demote.xpm Normal file
View File

@ -0,0 +1,31 @@
/* XPM */
static char *demote[] = {
/* columns rows colors chars-per-pixel */
"20 20 5 1",
" c black",
". c #0000BC",
"X c blue",
"o c #C71302",
"O c None",
/* pixels */
"OOOOOOOOOOOOOOOOOOOO",
"OOOO OOOOOOOOOOOOOOO",
"OOO OOOOOOOOOOOOOOO",
"OOOO OOOO OOO",
"OOOO OOOOOOOOOOOOOOO",
"OOOO OOOOOOOOX.OOOOO",
"OOOOOOOOOOOOOXX.OOOO",
"OOOO OOOOOOOOXXX.OOO",
"OOO O OOXXXXXXXXX.OO",
"OOOOO OOXXXXXXXXXX.O",
"OOOO OOOXXXXXXXXX.OO",
"OOO OOOOOOOXXX.OOO",
"OOOOOOOOOOOOOXX.OOOO",
"OOO OOOOOOOOX.OOOOO",
"OOOOO OOOOOOOOOOOOOO",
"OOOO OOOO OOO",
"OOOOO OOOOOOOOOOOOOO",
"OOO OOOOOOOOOOOOOOO",
"OOOOOOOOOOOOOOOOOOOO",
"OOOOOOOOOOOOOOOOOOOO"
};

30
lib/images/promote.xpm Normal file
View File

@ -0,0 +1,30 @@
/* XPM */
static char *promote[] = {
/* columns rows colors chars-per-pixel */
"20 20 4 1",
" c black",
". c #0000BC",
"X c blue",
"o c None",
/* pixels */
"oooooooooooooooooooo",
"oooo ooooooooooooooo",
"ooo ooooooooooooooo",
"oooo oooo ooo",
"oooo ooooooooooooooo",
"oooo o.Xoooooooooooo",
"ooooo.XXoooooooooooo",
"oooo.XXXoooooo oooo ",
"ooo.XXXXXXXXX o oo ",
"oo.XXXXXXXXXXoo ooo ",
"ooo.XXXXXXXXXo oooo ",
"oooo.XXXooooo o o ",
"ooooo.XXoooooooooooo",
"oooo o.Xoooooooooooo",
"ooo o oooooooooooooo",
"ooooo ooo ooo",
"oooo ooooooooooooooo",
"ooo oooooooooooooo",
"oooooooooooooooooooo",
"oooooooooooooooooooo"
};

28
lib/images/reload.xpm Normal file
View File

@ -0,0 +1,28 @@
/* XPM */
static char *reload[] = {
/* columns rows colors chars-per-pixel */
"16 16 6 1",
" c black",
". c #004000",
"X c #008000",
"o c #00C000",
"O c green",
"+ c gray100",
/* pixels */
"++++++ +++++",
"++++ Ooo . +++",
"+++ OooX ++ ++",
"+++ ooX +++++ ++",
"++ OoX +++++++ +",
"++ ooX +++++++++",
" OOooooX ++ +++",
"+ OoooX ++ ++",
"++ OoX ++ +",
"+++ X ++ ",
"++++ +++++ ++",
"+ ++++++++ ++",
"++ ++++++ +++",
"++ ++ +++",
"+++ ++++",
"+++++ ++++++"
};

View 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:
///

View 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" >
@ -22,94 +22,125 @@
<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" >
<property name="toolTip" >
<string>Decrease nesting depth of selected item</string>
</property>
<property name="text" >
<string>&lt;- P&amp;romote</string>
</property>
</widget>
</item>
<item row="1" column="2" >
<widget class="QPushButton" name="moveDownPB" >
<property name="toolTip" >
<string>Move selected item down by one</string>
</property>
<property name="text" >
<string>D&amp;own</string>
</property>
</widget>
</item>
<item row="0" column="1" >
<widget class="QPushButton" name="moveInPB" >
<property name="toolTip" >
<string>Increase nesting depth of selected item</string>
</property>
<property name="text" >
<string>De&amp;mote -></string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2" >
<widget class="QPushButton" name="updatePB" >
<item>
<widget class="QToolButton" name="updateTB" >
<property name="toolTip" >
<string>Update navigation tree</string>
</property>
<property name="text" >
<string>Upd&amp;ate</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="0" column="2" >
<widget class="QPushButton" name="moveUpPB" >
<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>Decrease nesting depth of selected item</string>
</property>
<property name="text" >
<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>
<widget class="QToolButton" name="moveInTB" >
<property name="toolTip" >
<string>Increase nesting depth of selected item</string>
</property>
<property name="text" >
<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>
<widget class="QToolButton" name="moveDownTB" >
<property name="toolTip" >
<string>Move selected item down by one</string>
</property>
<property name="text" >
<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>
<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>
@ -131,7 +162,19 @@
</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>
@ -141,16 +184,27 @@
</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>