changeset 17699:1be2993d3656

improve appearance of gui's dcoumentation browser * arrow_down.png, arrow_left.png, arrow_right.png: new image files * arrow_up.png, redled.png, bookmark.png: updated image files * file_editor_tab.cc(constructor): use bookmark.png as marker for actual line * module.mk: new image files * resource.qrc: new image files * parser.cc(replace_links): prevent linebreaks within node-links, smaller bookmark icons; (replace_colons): enclosed words are formatted bold and blue; (info_to_html): 'Menu' bold, underlined; 'See also' italic, darkred; (node_text_to_html): news icon for anchor of searched function and general navigation, select a monospace font for preformatted text sections; (global_search): smaller bookmark icons;
author Torsten <ttl@justmail.de>
date Sat, 19 Oct 2013 19:51:23 +0200
parents 9bb5d3f63cdd
children dba2e06dcdb5
files libgui/src/icons/arrow_down.png libgui/src/icons/arrow_left.png libgui/src/icons/arrow_right.png libgui/src/icons/arrow_up.png libgui/src/icons/bookmark.png libgui/src/icons/redled.png libgui/src/m-editor/file-editor-tab.cc libgui/src/module.mk libgui/src/qtinfo/parser.cc libgui/src/resource.qrc
diffstat 10 files changed, 28 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
Binary file libgui/src/icons/arrow_down.png has changed
Binary file libgui/src/icons/arrow_left.png has changed
Binary file libgui/src/icons/arrow_right.png has changed
Binary file libgui/src/icons/arrow_up.png has changed
Binary file libgui/src/icons/bookmark.png has changed
Binary file libgui/src/icons/redled.png has changed
--- a/libgui/src/m-editor/file-editor-tab.cc	Sat Oct 19 07:33:59 2013 -0700
+++ b/libgui/src/m-editor/file-editor-tab.cc	Sat Oct 19 19:51:23 2013 +0200
@@ -89,7 +89,7 @@
   _edit_area->markerDefine (QsciScintilla::RightTriangle, bookmark);
   _edit_area->markerDefine (QPixmap (":/actions/icons/redled.png"),
                             breakpoint);
-  _edit_area->markerDefine (QPixmap (":/actions/icons/arrow_right.png"),
+  _edit_area->markerDefine (QPixmap (":/actions/icons/bookmark.png"),
                             debugger_position);
 
   connect (_edit_area, SIGNAL (marginClicked (int, int,
--- a/libgui/src/module.mk	Sat Oct 19 07:33:59 2013 -0700
+++ b/libgui/src/module.mk	Sat Oct 19 19:51:23 2013 +0200
@@ -6,6 +6,9 @@
 
 octave_gui_ICONS = \
   src/icons/arrow_right.png \
+  src/icons/arrow_left.png \
+  src/icons/arrow_up.png \
+  src/icons/arrow_down.png \
   src/icons/artsbuilderexecute.png \
   src/icons/bookmark.png \
   src/icons/bp_next.png \
--- a/libgui/src/qtinfo/parser.cc	Sat Oct 19 07:33:59 2013 -0700
+++ b/libgui/src/qtinfo/parser.cc	Sat Oct 19 19:51:23 2013 +0200
@@ -280,7 +280,14 @@
       QString type     = re.cap (1);
       QString note     = re.cap (3);
       QString url_link = re.cap (4);
-      QString link     = re.cap (4);
+      QString link     = re.cap (4) + re.cap(5);
+      QString spaces = QString("");
+      QRegExp re_linebreak ("\n([ ]*)([^ ]*)([ ]*)");
+      if (re_linebreak.indexIn (link,0) != -1)
+        {
+          link.replace (re_linebreak,"&nbsp;"+re_linebreak.cap (2)+"\n");   // prevent line breaks in links
+          spaces = re_linebreak.cap (1);
+        }
 
       if (url_link.isEmpty ())
         {
@@ -297,13 +304,13 @@
       QString href;
       if (type=="\n*")
         {
-          href="\n<img src=':/actions/icons/bookmark.png'/>";
+          href="\n<img src=':/actions/icons/bookmark.png' width=10/>";
         }
       else
         {
-          href="<img src=':/actions/icons/bookmark.png'/>";
+          href="<img src=':/actions/icons/bookmark.png' width=10/>";
         }
-      href += re.cap (2) + "<a href='" + url_link + "'>" + note + ":" + link + re.cap (5) + "</a>";
+      href += re.cap(2) + "<a href='" + url_link + "'>" + note + ":" + link + "</a>" + spaces;
       f = re.matchedLength ();
       text.replace (i,f,href);
       i += href.size ();
@@ -318,7 +325,7 @@
   while ( (i = re.indexIn (text, i)) != -1)
     {
       QString t = re.cap (1);
-      QString bold = "<b>`" + t + "</b>'";
+      QString bold = "<font style=\"color:Blue;font-weight:bold\">" + t + "</font>";
 
       f = re.matchedLength ();
       text.replace (i,f,bold);
@@ -333,8 +340,8 @@
   text.replace ("<", "&lt;");
   text.replace (">", "&gt;");
 
-  text.replace ("\n* Menu:", "\n<b>Menu:</b>");
-  text.replace ("*See also:*", "<b>See also:</b>");
+  text.replace ("\n* Menu:", "\n<font style=\"text-decoration:underline;font-weight:bold\">Menu:</font>");
+  text.replace ("See also:", "<font style=\"color:DarkRed;font-style:italic;font-weight:bold\">See also:</font>");
   replace_colons (text);
   replace_links (text);
 }
@@ -362,7 +369,7 @@
       info_to_html (text2);
 
       text = text1 + "<a name='" + anchor
-                   + "'/><img src=':/actions/icons/redled.png'><br>&nbsp;"
+                   + "'/><img src=':/actions/icons/arrow_down.png'><br>&nbsp;"
                    + text2;
     }
   else
@@ -373,10 +380,10 @@
     }
 
   QString navigationLinks = QString (
-        "<img src=':/actions/icons/arrow_right.png'/> <b>Section:</b> %1<br>"
-        "<b>Previous Section:</b> <a href='%2'>%3</a><br>"
-        "<b>Next Section:</b> <a href='%4'>%5</a><br>"
-        "<b>Up:</b> <a href='%6'>%7</a><br>\n"
+        "<b>Section:</b> %1<br>"
+        "<img src=':/actions/icons/arrow_left.png'/> <b>Previous Section:</b> <a href='%2'>%3</a><br>"
+        "<img src=':/actions/icons/arrow_right.png'/> <b>Next Section:</b> <a href='%4'>%5</a><br>"
+        "<img src=':/actions/icons/arrow_up.png'/> <b>Up:</b> <a href='%6'>%7</a><br>\n"
         )
       .arg (nodeName)
       .arg (QString (QUrl::toPercentEncoding (nodePrev, "", "'")))
@@ -387,7 +394,7 @@
       .arg (nodeUp);
 
 
-  text.prepend ("<hr>\n<pre>");
+  text.prepend ("<hr>\n<pre style=\"font-family:monospace\">");
   text.append ("</pre>\n<hr><hr>\n");
   text.prepend (navigationLinks);
   text.append (navigationLinks);
@@ -593,7 +600,7 @@
               if (founds == 0)
                 {
                   results.append(
-                        "<br>\n<img src=':/actions/icons/bookmark.png'> <a href='"
+                        "<br>\n<img src=':/actions/icons/bookmark.png' width=10> <a href='"
                         + QString(QUrl::toPercentEncoding(node,"","'")) +
                         "'>");
                   results.append (node);
--- a/libgui/src/resource.qrc	Sat Oct 19 07:33:59 2013 -0700
+++ b/libgui/src/resource.qrc	Sat Oct 19 19:51:23 2013 +0200
@@ -22,6 +22,9 @@
         <file>icons/filesaveas.png</file>
         <file>icons/redled.png</file>
         <file>icons/arrow_right.png</file>
+        <file>icons/arrow_left.png</file>
+        <file>icons/arrow_up.png</file>
+        <file>icons/arrow_down.png</file>
         <file>icons/bookmark.png</file>
         <file>icons/question.png</file>
         <file>icons/star.png</file>