[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [sflphone-kde/october2012_ui] src: [ #16349 ] Refactor the loadermanager so the whole loading part w
From:       Emmanuel Lepage Vallee <emmanuel.lepage () savoirfairelinux ! com>
Date:       2012-10-31 22:36:57
Message-ID: 20121031223657.C9115A6078 () git ! kde ! org
[Download RAW message or body]

Git commit ffe9bf3e6ee189699009794b6b61dac0932e0491 by Emmanuel Lepage Vallee.
Committed on 31/10/2012 at 23:36.
Pushed by lepagevalleeemmanuel into branch 'october2012_ui'.

[ #16349 ] Refactor the loadermanager so the whole loading part will be part of the \
tip. Tips are not SVG based anymore, but QPainter based

M  +1    -1    src/CMakeLists.txt
M  +4    -4    src/callview.cpp
M  +2    -2    src/callview.h
D  +0    -103  src/icons/tips/dial_with_dialpad.svg
A  +65   -0    src/icons/tips/downArrow.svg
A  +67   -0    src/icons/tips/keyboard.svg
M  +1    -1    src/klib/CMakeLists.txt
M  +75   -37   src/klib/tip.cpp
M  +17   -3    src/klib/tip.h
M  +14   -6    src/klib/tipanimationwrapper.cpp
M  +4    -4    src/klib/tipanimationwrapper.h
R  +17   -50   src/klib/tipmanager.cpp [from: src/klib/svgtiploader.cpp - 069% \
similarity] R  +8    -8    src/klib/tipmanager.h [from: src/klib/svgtiploader.h - \
085% similarity]

http://commits.kde.org/sflphone-kde/ffe9bf3e6ee189699009794b6b61dac0932e0491

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b5f0d59..62e319e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -123,4 +123,4 @@ INSTALL( FILES icons/hold_grayscale.png          DESTINATION  \
${DATA_INSTALL_DIR  INSTALL( FILES icons/unhold_grayscale.png        DESTINATION  \
${DATA_INSTALL_DIR}/sflphone-client-kde      )  INSTALL( FILES \
icons/refuse_grayscale.png        DESTINATION  \
${DATA_INSTALL_DIR}/sflphone-client-kde      )  INSTALL( FILES \
icons/pickup_grayscale.png        DESTINATION  \
                ${DATA_INSTALL_DIR}/sflphone-client-kde      )
-INSTALL( FILES icons/tips/dial_with_dialpad.svg  DESTINATION  \
${DATA_INSTALL_DIR}/sflphone-client-kde/tips ) +INSTALL( FILES \
icons/tips/keyboard.svg           DESTINATION  \
                ${DATA_INSTALL_DIR}/sflphone-client-kde/tips )
diff --git a/src/callview.cpp b/src/callview.cpp
index d32d807..a64f31d 100644
--- a/src/callview.cpp
+++ b/src/callview.cpp
@@ -50,7 +50,7 @@
 #include "sflphoneaccessibility.h"
 #include "widgets/conferencebox.h"
 #include "widgets/callviewoverlaytoolbar.h"
-#include "klib/svgtiploader.h"
+#include "klib/tipmanager.h"
 
 ///CallTreeItemDelegate: Delegates for CallTreeItem
 class CallTreeItemDelegate : public QStyledItemDelegate
@@ -275,10 +275,10 @@ CallView::CallView(QWidget* parent) : \
QTreeWidget(parent),m_pActiveOverlay(0),m_  QGridLayout* gl    = new QGridLayout     \
( m_pTransferOverlay );  QLabel* lblImg     = new QLabel          ( image             \
);  m_pCanvasToolbar   = new CallViewOverlayToolbar(this);
-   m_pTip             = new SvgTipLoader(this,
+   m_pTip             = new TipManager(this,
                                  KStandardDirs::locate("data",
-                                          \
                "sflphone-client-kde/tips/dial_with_dialpad.svg"),
-                                          i18n("Use the dialpad below or start \
typing a number. "),4); +                                          \
"sflphone-client-kde/tips/keyboard.svg"), +                                          \
i18n("Use the dialpad below or start typing a number. Use the dialpad below or start \
typing a number. Use the dsadasdialpad below or start typing a number. Use thasdasde \
dialpad below or sasdasdtart typing a number. "),4);  
    m_pTransferOverlay->setVisible(false);
    m_pTransferOverlay->resize(size());
diff --git a/src/callview.h b/src/callview.h
index 46bffd2..833fb27 100644
--- a/src/callview.h
+++ b/src/callview.h
@@ -38,7 +38,7 @@ class KLineEdit;
 class CallTreeItem;
 class CallTreeItemDelegate;
 class CallViewOverlayToolbar;
-class SvgTipLoader;
+class TipManager;
 
 //Typedef
 typedef CallModel<CallTreeItem*,QTreeWidgetItem*> TreeWidgetCallModel;
@@ -116,7 +116,7 @@ class CallView : public QTreeWidget {
       CallViewOverlay*        m_pActiveOverlay      ;
       Call*                   m_pCallPendingTransfer;
       CallViewOverlayToolbar* m_pCanvasToolbar      ;
-      SvgTipLoader*           m_pTip                ;
+      TipManager*             m_pTip                ;
 
    protected:
       //Reimlementation
diff --git a/src/icons/tips/dial_with_dialpad.svg \
b/src/icons/tips/dial_with_dialpad.svg deleted file mode 100644
index 8f8334d..0000000
--- a/src/icons/tips/dial_with_dialpad.svg
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="295.40631"
-   height="159.43761"
-   id="svg15622"
-   version="1.1"
-   inkscape:version="0.48.3.1 r9886"
-   sodipodi:docname="dial_tip2.svg">
-  <defs
-     id="defs15624" />
-  <sodipodi:namedview
-     id="base"
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1.0"
-     inkscape:pageopacity="0.0"
-     inkscape:pageshadow="2"
-     inkscape:zoom="1.979899"
-     inkscape:cx="195.92694"
-     inkscape:cy="86.27628"
-     inkscape:document-units="px"
-     inkscape:current-layer="layer1"
-     showgrid="false"
-     fit-margin-top="0"
-     fit-margin-left="0"
-     fit-margin-right="0"
-     fit-margin-bottom="0"
-     inkscape:window-width="1600"
-     inkscape:window-height="853"
-     inkscape:window-x="-2"
-     inkscape:window-y="-3"
-     inkscape:window-maximized="1" />
-  <metadata
-     id="metadata15627">
-    <rdf:RDF>
-      <cc:Work
-         rdf:about="">
-        <dc:format>image/svg+xml</dc:format>
-        <dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
-        <dc:title />
-      </cc:Work>
-    </rdf:RDF>
-  </metadata>
-  <g
-     inkscape:label="Calque 1"
-     inkscape:groupmode="layer"
-     id="layer1"
-     transform="translate(-263.72542,-409.78624)">
-    <path
-       inkscape:connector-curvature="0"
-       style="opacity:1;fill:BACKGROUD_COLOR_ROLE;fill-opacity:1;stroke:none"
-       d="m 274.22542,409.78624 c -5.8074,2e-4 -10.5,4.7351 -10.5,10.625 l \
0,138.1876 c 0,5.8899 4.6926,10.625 10.5,10.625 l 274.4376,0 c 5.8074,-2e-4 \
10.4687,-4.7351 10.4687,-10.625 l 0,-138.1876 c 0,-5.8899 -4.6613,-10.625 \
-10.4687,-10.625 l -274.4376,0 z m 28.9376,80.8126 a 3.8052008,3.8052008 0 0 1 \
0.375,0 l 32.3437,0 a 3.8052008,3.8052008 0 0 1 3.8125,3.7812 l 0,28.5625 14.4688,0 a \
3.8052008,3.8052008 0 0 1 2.375,6.7813 l -34.125,26.9062 a 3.8052008,3.8052008 0 0 1 \
-4.6876,0 l -34.75,-26.9375 a 3.8052008,3.8052008 0 0 1 2.3126,-6.8125 l 14.4374,0 \
0,-28.5 a 3.8052008,3.8052008 0 0 1 3.4376,-3.7812 z m 108.4687,2.4062 114.5625,0 c \
0.1027,-0.01 0.2097,0 0.3125,0 1.5417,0 3.0882,0.448 4.3437,1.3438 1.8708,1.2934 \
3.0757,3.519 3.125,5.8124 0.01,11.3127 0,22.6249 0,33.9376 0.068,1.6776 \
-0.4065,3.3705 -1.4062,4.7187 -1.3089,1.817 -3.4916,2.961 -5.75,3 l -114.6875,0 c \
-1.6429,0.07 -3.3168,-0.3569 -4.6563,-1.3125 -1.8705,-1.2935 -3.0755,-3.5191 \
-3.125,-5.8125 -0.01,-11.3125 0,-22.6249 0,-33.9375 -0.069,-1.6902 0.4227,-3.3972 \
1.4376,-4.75 1.328,-1.8261 3.5656,-2.99 5.8437,-3 z m 1.5313,4.4375 c -0.1956,0.042 \
-0.3836,0.162 -0.4376,0.375 -0.083,0.511 -0.011,1.0444 -0.031,1.5625 -0.064,0.3257 \
0.1387,0.68 0.4688,0.75 0.9356,0.044 1.8751,0 2.8124,0 0.3178,0.035 0.7607,-0.039 \
0.8438,-0.4062 0.034,-0.5096 -0.014,-1.0194 0,-1.5313 0.038,-0.2989 -0.068,-0.6598 \
-0.4062,-0.7187 -0.5394,-0.055 -1.0805,-0.015 -1.625,-0.031 -0.4385,0 -0.8741,-0.01 \
-1.3126,0 -0.036,-0.01 -0.087,0 -0.125,0 -0.066,-10e-5 -0.1224,-0.014 -0.1874,0 z m \
7.25,0 c -0.1956,0.042 -0.3524,0.162 -0.4063,0.375 -0.083,0.511 -0.011,1.0444 \
-0.031,1.5625 -0.064,0.3257 0.1075,0.68 0.4376,0.75 0.9356,0.044 1.8751,0 2.8124,0 \
0.3178,0.035 0.7607,-0.039 0.8438,-0.4062 0.033,-0.5096 0.017,-1.0194 0.031,-1.5313 \
0.038,-0.2989 -0.099,-0.6598 -0.4374,-0.7187 -0.5394,-0.055 -1.0805,-0.015 \
-1.625,-0.031 -0.4385,0 -0.8741,-0.01 -1.3126,0 -0.036,-0.01 -0.087,0 -0.125,0 \
-0.066,-10e-5 -0.1224,-0.014 -0.1874,0 z m 7.4062,0 c -0.2492,0.011 -0.4954,0.1103 \
-0.5625,0.375 -0.083,0.5111 -0.011,1.0442 -0.031,1.5625 -0.074,0.3558 0.1901,0.735 \
0.5626,0.75 7.9303,0.017 15.8507,0.01 23.7812,0 0.3155,0.039 0.7618,-0.043 \
0.8438,-0.4062 0.032,-0.5405 -0.01,-1.0823 0,-1.625 0.045,-0.3093 -0.1387,-0.6433 \
-0.4688,-0.6563 -4.0258,-0.024 -8.0654,0.01 -12.0938,0 -3.9465,0 -7.897,-0.01 \
-11.8437,0 l -0.125,0 -0.062,0 z m 28.4375,0 c -0.2492,0.011 -0.5267,0.1103 \
-0.5937,0.375 -0.084,0.5111 -0.011,1.0442 -0.031,1.5625 -0.074,0.3558 0.19,0.735 \
0.5625,0.75 7.9305,0.017 15.8508,0.01 23.7812,0 0.3157,0.039 0.7618,-0.043 \
0.8438,-0.4062 0.032,-0.5406 -0.01,-1.0823 0,-1.625 0.045,-0.3093 -0.1386,-0.6433 \
-0.4688,-0.6563 -4.0256,-0.024 -8.0654,0.01 -12.0937,0 -3.9467,0 -7.8973,-0.01 \
-11.8437,0 l -0.125,0 -0.031,0 z m 28.3125,0 c -0.2493,0.011 -0.4954,0.1103 \
-0.5625,0.375 -0.083,0.5111 -0.011,1.0442 -0.031,1.5625 -0.074,0.3558 0.1588,0.735 \
0.5313,0.75 7.9308,0.017 15.8816,0.01 23.8125,0 0.3155,0.039 0.7305,-0.043 \
0.8125,-0.4062 0.032,-0.5406 0.021,-1.0823 0.031,-1.625 0.045,-0.3093 -0.1701,-0.6433 \
-0.5,-0.6563 -4.0263,-0.024 -8.0651,0.01 -12.0938,0 -3.9467,0 -7.8971,-0.01 \
-11.8438,0 l -0.125,0 -0.031,0 z m 28.2188,0 c -0.1956,0.042 -0.3836,0.162 \
-0.4376,0.375 -0.083,0.511 -0.011,1.0444 -0.031,1.5625 -0.064,0.3257 0.1387,0.68 \
0.4688,0.75 0.936,0.044 1.8746,0 2.8124,0 0.3169,0.035 0.7622,-0.039 0.8438,-0.4062 \
0.034,-0.5096 -0.014,-1.0194 0,-1.5313 0.037,-0.2987 -0.068,-0.6598 -0.4062,-0.7187 \
-0.5398,-0.055 -1.0801,-0.015 -1.625,-0.031 -0.4385,0 -0.8741,-0.01 -1.3126,0 \
-0.036,-0.01 -0.087,0 -0.125,0 -0.066,-10e-5 -0.1224,-0.014 -0.1874,0 z m 7.2812,0 c \
-0.1954,0.042 -0.3836,0.162 -0.4375,0.375 -0.083,0.511 -0.011,1.0444 -0.031,1.5625 \
-0.064,0.3257 0.1388,0.68 0.4688,0.75 0.9358,0.044 1.875,0 2.8125,0 0.3176,0.035 \
0.7294,-0.039 0.8125,-0.4062 0.033,-0.5096 0.017,-1.0194 0.031,-1.5313 0.038,-0.2989 \
-0.068,-0.6598 -0.4062,-0.7187 -0.5392,-0.055 -1.0804,-0.015 -1.625,-0.031 -0.4383,0 \
-0.9053,-0.01 -1.3438,0 -0.036,-0.01 -0.056,0 -0.094,0 -0.066,-10e-5 -0.1224,-0.014 \
-0.1875,0 z m -212.75,0.75 0,28.4687 a 3.8052008,3.8052008 0 0 1 -3.7812,3.8126 l \
-7.125,0 23.625,18.3437 23.1874,-18.2813 -7.3437,0 a 3.8052008,3.8052008 0 0 1 \
-3.8125,-3.7812 l 0,-28.5625 -24.75,0 z m 105.7812,5 c -0.228,0.05 -0.4445,0.2244 \
-0.4687,0.4687 -0.041,1.0004 0.012,2.0294 0,3.0313 -0.064,0.3242 0.1065,0.667 \
0.4375,0.75 0.6573,0.059 1.3393,0.021 2,0.031 0.3187,0.039 0.7224,-0.069 \
0.7812,-0.4376 0.015,-0.9742 -0.01,-1.9621 0,-2.9374 0.017,-0.3068 0.043,-0.7249 \
-0.3124,-0.8438 -0.2026,-0.044 -0.4116,-0.073 -0.625,-0.062 -0.2137,0 -0.4467,0.014 \
-0.6563,0 -0.3178,0 -0.6197,-0.01 -0.9375,0 -0.075,-0.01 -0.1427,-0.017 -0.2188,0 z m \
6.4376,0 c -0.2701,0.01 -0.5651,0.1786 -0.5938,0.4687 -0.041,1.0004 0.012,1.9982 0,3 \
-0.068,0.334 0.1245,0.7093 0.4688,0.7813 1.0429,0.044 2.08,0.031 3.125,0.031 \
0.3216,0.042 0.7523,-0.062 0.8124,-0.4376 0.015,-1.0218 0.026,-2.0395 0.031,-3.0624 \
0.04,-0.2985 -0.069,-0.6922 -0.4063,-0.75 -0.5887,-0.055 -1.2182,-0.015 \
-1.8124,-0.031 -0.5121,0 -1.0194,0.021 -1.5313,0.031 -0.038,-0.01 -0.055,-0.031 \
-0.094,-0.031 z m 7.5624,0 c -0.2699,0.01 -0.5338,0.1786 -0.5624,0.4687 -0.041,1.0004 \
-0.02,1.9982 -0.031,3 -0.068,0.334 0.1247,0.7093 0.4687,0.7813 1.0433,0.044 \
2.0802,0.031 3.125,0.031 0.3219,0.042 0.7522,-0.062 0.8126,-0.4376 0.015,-1.0218 \
0.026,-2.0395 0.031,-3.0624 0.04,-0.2985 -0.069,-0.6922 -0.4062,-0.75 -0.589,-0.055 \
-1.187,-0.015 -1.7813,-0.031 -0.512,0 -1.0506,0.021 -1.5625,0.031 -0.038,-0.01 \
-0.055,-0.031 -0.094,-0.031 z m 7.5626,0 c -0.2701,0.01 -0.5338,0.1786 -0.5626,0.4687 \
-0.041,1.0004 -0.02,1.9982 -0.031,3 -0.068,0.334 0.1245,0.7093 0.4688,0.7813 \
1.0429,0.044 2.1114,0.031 3.1562,0.031 0.3218,0.042 0.7523,-0.062 0.8125,-0.4376 \
0.015,-1.0218 -0.01,-2.0395 0,-3.0624 0.039,-0.2988 -0.069,-0.6922 -0.4063,-0.75 \
-0.5887,-0.055 -1.1869,-0.015 -1.7812,-0.031 -0.512,0 -1.0195,0.021 -1.5312,0.031 \
-0.038,-0.01 -0.087,-0.031 -0.125,-0.031 z m 7.5624,0 c -0.2699,0.01 -0.5338,0.1786 \
-0.5624,0.4687 -0.041,1.0004 0.011,1.9982 0,3 -0.068,0.334 0.093,0.7093 0.4374,0.7813 \
1.0433,0.044 2.1115,0.031 3.1563,0.031 0.3218,0.042 0.7523,-0.062 0.8125,-0.4376 \
0.015,-1.0218 -0.01,-2.0395 0,-3.0624 0.04,-0.2985 -0.069,-0.6922 -0.4062,-0.75 \
-0.589,-0.055 -1.187,-0.015 -1.7813,-0.031 -0.512,0 -1.0192,0.021 -1.5313,0.031 \
-0.038,-0.01 -0.086,-0.031 -0.125,-0.031 z m 7.5626,0 c -0.2701,0.01 -0.5337,0.1786 \
-0.5626,0.4687 -0.041,1.0004 0.012,1.9982 0,3 -0.068,0.334 0.1248,0.7093 \
0.4688,0.7813 1.0559,0.044 2.0986,0.031 3.1562,0.031 0.3125,0.041 0.7259,-0.08 \
0.7813,-0.4376 0.015,-1.0218 -0.01,-2.0395 0,-3.0624 0.039,-0.2985 -0.069,-0.6922 \
-0.4063,-0.75 -0.5891,-0.055 -1.1865,-0.015 -1.7812,-0.031 -0.512,0 -1.0194,0.021 \
-1.5312,0.031 -0.038,-0.01 -0.087,-0.031 -0.125,-0.031 z m 7.5624,0 c -0.2699,0.01 \
-0.5337,0.1788 -0.5624,0.4687 -0.041,1.0004 0.011,1.9982 0,3 -0.068,0.3341 \
0.124,0.7103 0.4687,0.7813 1.043,0.044 2.0802,0.031 3.125,0.031 0.3218,0.042 \
0.7523,-0.062 0.8125,-0.4376 0.015,-1.0218 0.026,-2.0395 0.031,-3.0624 0.04,-0.2985 \
-0.069,-0.6922 -0.4062,-0.75 -0.5892,-0.055 -1.2179,-0.015 -1.8125,-0.031 -0.512,0 \
-1.0192,0.021 -1.5313,0.031 -0.038,-0.01 -0.086,-0.031 -0.125,-0.031 z m 7.5938,0 c \
-0.2697,0.01 -0.533,0.1794 -0.5625,0.4687 -0.041,1.0004 -0.02,1.9982 -0.031,3 \
-0.068,0.3336 0.1234,0.7083 0.4688,0.7813 1.0432,0.044 2.0802,0.031 3.125,0.031 \
0.3218,0.042 0.7523,-0.062 0.8125,-0.4376 0.015,-1.0218 0.026,-2.0395 0.031,-3.0624 \
0.039,-0.2985 -0.069,-0.6922 -0.4063,-0.75 -0.5892,-0.055 -1.2178,-0.015 \
-1.8125,-0.031 -0.512,0 -1.0195,0.021 -1.5312,0.031 -0.038,-0.01 -0.055,-0.031 \
-0.094,-0.031 z m 7.5625,0 c -0.2696,0.01 -0.5339,0.1791 -0.5625,0.4687 -0.041,1.0004 \
-0.02,1.9982 -0.031,3 -0.068,0.334 0.1246,0.7093 0.4687,0.7813 1.0431,0.044 \
2.1113,0.031 3.1563,0.031 0.3216,0.042 0.721,-0.062 0.7812,-0.4376 0.015,-1.0218 \
0.026,-2.0395 0.031,-3.0624 0.04,-0.2985 -0.069,-0.6922 -0.4062,-0.75 -0.5892,-0.055 \
-1.1867,-0.015 -1.7812,-0.031 -0.5121,0 -1.0505,0.021 -1.5626,0.031 -0.038,-0.01 \
-0.055,-0.031 -0.094,-0.031 z m 7.5625,0 c -0.2699,0.01 -0.5338,0.1786 -0.5625,0.4687 \
-0.041,1.0004 0.011,1.9982 0,3 -0.068,0.334 0.093,0.7093 0.4375,0.7813 1.0431,0.044 \
2.1114,0.031 3.1562,0.031 0.322,0.042 0.7523,-0.062 0.8126,-0.4376 0.014,-1.0218 \
-0.01,-2.0395 0,-3.0624 0.039,-0.2985 -0.069,-0.6922 -0.4063,-0.75 -0.5889,-0.055 \
-1.1869,-0.015 -1.7813,-0.031 -0.5118,0 -1.0192,0.021 -1.5312,0.031 -0.038,-0.01 \
-0.086,-0.031 -0.125,-0.031 z m 7.5,0 c -0.2699,0.01 -0.5338,0.1786 -0.5625,0.4687 \
-0.041,1.0004 -0.02,1.9982 -0.031,3 -0.068,0.334 0.1247,0.7093 0.4688,0.7813 \
1.0431,0.044 2.1114,0.031 3.1562,0.031 0.3219,0.042 0.7211,-0.062 0.7813,-0.4376 \
0.015,-1.0218 0.026,-2.0395 0.031,-3.0624 0.039,-0.2985 -0.069,-0.6922 -0.4063,-0.75 \
-0.5888,-0.055 -1.1869,-0.015 -1.7813,-0.031 -0.5119,0 -1.0193,0.021 -1.5312,0.031 \
-0.038,-0.01 -0.086,-0.031 -0.125,-0.031 z m 7.625,0 c -0.2699,0.01 -0.5338,0.1786 \
-0.5625,0.4687 -0.041,1.0004 0.012,1.9982 0,3 -0.068,0.334 0.1247,0.7093 \
0.4687,0.7813 1.0432,0.044 2.0802,0.031 3.125,0.031 0.3219,0.042 0.7522,-0.062 \
0.8126,-0.4376 0.014,-1.0218 -0.01,-2.0395 0,-3.0624 0.039,-0.2985 -0.069,-0.6922 \
-0.4063,-0.75 -0.5889,-0.055 -1.1869,-0.015 -1.7813,-0.031 -0.5118,0 -1.0193,0.021 \
-1.5312,0.031 -0.038,-0.01 -0.086,-0.031 -0.125,-0.031 z m 7.5625,0 c -0.2666,0.01 \
-0.5342,0.1833 -0.5625,0.4687 -0.041,1.0004 0.011,1.9982 0,3 -0.072,0.3446 \
0.14,0.7596 0.5,0.8126 1.8615,0.034 3.7315,-10e-5 5.5938,0 0.3156,0.041 0.7232,-0.074 \
0.7812,-0.4376 0.014,-1.0342 0,-2.0583 0,-3.0937 0.042,-0.299 -0.1064,-0.6737 \
-0.4375,-0.7187 -0.9922,-0.043 -1.9727,-0.019 -2.9687,-0.031 -0.9249,0 -1.8566,0.021 \
-2.7813,0.031 -0.038,-0.01 -0.087,-0.031 -0.125,-0.031 z m 10.125,0 c -0.2699,0.01 \
-0.5651,0.1791 -0.5937,0.4687 -0.041,1.006 0.012,2.024 0,3.0313 -0.073,0.349 \
0.1662,0.7451 0.5312,0.7813 3.3375,0.029 6.6623,0.01 10,0 0.3184,0.043 0.7536,-0.07 \
0.8125,-0.4376 0.014,-1.0466 0,-2.1085 0,-3.1562 0.043,-0.301 -0.1422,-0.6292 \
-0.4687,-0.6562 -1.7279,-0.031 -3.4565,-0.021 -5.1876,-0.031 -1.6653,0 -3.3345,0.021 \
-5,0.031 -0.038,-0.01 -0.055,-0.031 -0.094,-0.031 z m 2.625,7.3125 c -0.8389,0 \
-1.6611,0.021 -2.5,0.031 -0.3163,-0.048 -0.6512,0.1639 -0.6563,0.5 -0.021,3.4285 \
0.01,6.8839 0,10.3126 -0.065,0.3413 0.1786,0.6827 0.5313,0.7187 3.3499,0.029 \
6.681,0.041 10.0313,0.031 0.3201,0.047 0.7488,-0.1004 0.7812,-0.4688 10e-4,-3.4652 \
0,-6.9405 0,-10.4062 0.046,-0.3026 -0.1402,-0.6595 -0.4688,-0.6876 -1.7276,-0.031 \
-3.4565,0.01 -5.1874,0 l -2.5313,0 0,-0.031 z m -102.2187,0.031 c -0.2701,0.01 \
-0.5337,0.1787 -0.5626,0.4688 -0.041,1.0003 -0.02,2.0294 -0.031,3.0312 -0.068,0.3338 \
0.1245,0.7103 0.4688,0.7813 1.043,0.044 2.1114,0 3.1562,0 0.3218,0.042 0.7211,-0.062 \
0.7812,-0.4375 0.015,-1.0219 0.026,-2.0396 0.031,-3.0625 0.04,-0.2986 -0.069,-0.692 \
-0.4063,-0.75 -0.5887,-0.055 -1.1869,-0.015 -1.7812,-0.031 -0.512,0 -1.0505,0.021 \
-1.5625,0.031 -0.038,-0.01 -0.055,-0.031 -0.094,-0.031 z m 7.6562,0 c -0.2699,0.01 \
-0.5338,0.1787 -0.5625,0.4688 -0.041,1.0003 -0.02,2.0294 -0.031,3.0312 -0.068,0.3338 \
0.1247,0.7103 0.4688,0.7813 1.0431,0.044 2.1114,0 3.1562,0 0.3219,0.042 0.721,-0.062 \
0.7813,-0.4375 0.015,-1.0219 0.026,-2.0396 0.031,-3.0625 0.039,-0.2986 -0.069,-0.692 \
-0.4063,-0.75 -0.5889,-0.055 -1.1869,-0.015 -1.7813,-0.031 -0.5118,0 -1.0506,0.021 \
-1.5624,0.031 -0.038,-0.01 -0.055,-0.031 -0.094,-0.031 z m 7.5625,0 c -0.2699,0.01 \
-0.5338,0.1787 -0.5625,0.4688 -0.041,1.0003 0.012,2.0294 0,3.0312 -0.068,0.3338 \
0.093,0.7103 0.4375,0.7813 1.0431,0.044 2.1113,0 3.1563,0 0.3217,0.042 0.7523,-0.062 \
0.8124,-0.4375 0.015,-1.0219 0,-2.0396 0,-3.0625 0.04,-0.2986 -0.069,-0.692 \
-0.4062,-0.75 -0.5888,-0.055 -1.187,-0.015 -1.7812,-0.031 -0.5121,0 -1.0194,0.021 \
-1.5313,0.031 -0.038,-0.01 -0.086,-0.031 -0.125,-0.031 z m 7.5625,0 c -0.2699,0.01 \
-0.5338,0.1787 -0.5625,0.4688 -0.041,1.0003 0.012,2.0294 0,3.0312 -0.068,0.3338 \
0.1247,0.7103 0.4687,0.7813 1.0432,0.044 2.0802,0 3.125,0 0.322,0.042 0.7523,-0.062 \
0.8126,-0.4375 0.015,-1.0219 -0.01,-2.0396 0,-3.0625 0.039,-0.2987 -0.07,-0.692 \
-0.4063,-0.75 -0.5889,-0.055 -1.1869,-0.015 -1.7813,-0.031 -0.5118,0 -1.0193,0.021 \
-1.5312,0.031 -0.038,-0.01 -0.086,-0.031 -0.125,-0.031 z m 7.5625,0 c -0.2699,0.01 \
-0.5338,0.1787 -0.5625,0.4688 -0.041,1.0003 0.011,2.0294 0,3.0312 -0.068,0.3338 \
0.1245,0.7103 0.4688,0.7813 1.043,0.044 2.08,0 3.125,0 0.3217,0.042 0.7523,-0.062 \
0.8124,-0.4375 0.015,-1.0219 0,-2.0396 0,-3.0625 0.04,-0.2986 -0.069,-0.692 \
-0.4062,-0.75 -0.5889,-0.055 -1.1869,-0.015 -1.7812,-0.031 -0.5121,0 -1.0193,0.021 \
-1.5313,0.031 -0.038,-0.01 -0.086,-0.031 -0.125,-0.031 z m 7.5937,0 c -0.2699,0.01 \
-0.565,0.1787 -0.5937,0.4688 -0.041,1.0003 0.012,2.0294 0,3.0312 -0.068,0.3338 \
0.1248,0.7103 0.4687,0.7813 1.056,0.044 2.0986,0 3.1563,0 0.3123,0.041 0.7258,-0.08 \
0.7813,-0.4375 0.014,-1.0219 0.026,-2.0396 0.031,-3.0625 0.039,-0.2983 -0.069,-0.692 \
-0.4062,-0.75 -0.5894,-0.055 -1.2178,-0.015 -1.8126,-0.031 -0.5118,0 -1.0192,0.021 \
-1.5312,0.031 -0.038,-0.01 -0.055,-0.031 -0.094,-0.031 z m 7.5626,0 c -0.2701,0.01 \
-0.5337,0.1787 -0.5626,0.4688 -0.041,1.0003 -0.02,2.0294 -0.031,3.0312 -0.068,0.3341 \
0.1238,0.7103 0.4688,0.7813 1.0429,0.044 2.08,0 3.125,0 0.3216,0.042 0.7522,-0.062 \
0.8124,-0.4375 0.015,-1.0219 0.026,-2.0396 0.031,-3.0625 0.04,-0.2986 -0.069,-0.692 \
-0.4063,-0.75 -0.5891,-0.055 -1.1866,-0.015 -1.7812,-0.031 -0.512,0 -1.0506,0.021 \
-1.5625,0.031 -0.038,-0.01 -0.055,-0.031 -0.094,-0.031 z m 7.5624,0 c -0.2695,0.01 \
-0.5329,0.1793 -0.5624,0.4688 -0.041,1.0003 -0.02,2.0294 -0.031,3.0312 -0.068,0.3334 \
0.1234,0.7083 0.4687,0.7813 1.0433,0.044 2.1115,0 3.1563,0 0.3218,0.042 0.7523,-0.062 \
0.8125,-0.4375 0.015,-1.0219 -0.01,-2.0396 0,-3.0625 0.04,-0.2986 -0.069,-0.692 \
-0.4062,-0.75 -0.5894,-0.055 -1.1866,-0.015 -1.7813,-0.031 -0.512,0 -1.0194,0.021 \
-1.5313,0.031 -0.038,-0.01 -0.086,-0.031 -0.125,-0.031 z m 7.5626,0 c -0.2697,0.01 \
-0.5338,0.1792 -0.5626,0.4688 -0.041,1.0003 0.011,2.0294 0,3.0312 -0.068,0.3338 \
0.093,0.7103 0.4376,0.7813 1.0429,0.044 2.1114,0 3.1562,0 0.3218,0.042 0.7522,-0.062 \
0.8125,-0.4375 0.015,-1.0219 -0.01,-2.0396 0,-3.0625 0.04,-0.2986 -0.069,-0.692 \
-0.4063,-0.75 -0.5891,-0.055 -1.1865,-0.015 -1.7812,-0.031 -0.512,0 -1.0194,0.021 \
-1.5312,0.031 -0.038,-0.01 -0.087,-0.031 -0.125,-0.031 z m 7.5624,0 c -0.2699,0.01 \
-0.5338,0.1787 -0.5624,0.4688 -0.041,1.0003 0.011,2.0294 0,3.0312 -0.068,0.3338 \
0.1246,0.7103 0.4687,0.7813 1.0431,0.044 2.0802,0 3.125,0 0.3218,0.042 0.7523,-0.062 \
0.8125,-0.4375 0.015,-1.0219 -0.01,-2.0396 0,-3.0625 0.04,-0.2986 -0.069,-0.692 \
-0.4062,-0.75 -0.589,-0.055 -1.187,-0.015 -1.7813,-0.031 -0.512,0 -1.0192,0.021 \
-1.5313,0.031 -0.038,-0.01 -0.086,-0.031 -0.125,-0.031 z m 7.5626,0 c -0.2701,0.01 \
-0.5337,0.1787 -0.5626,0.4688 -0.041,1.0003 0.012,2.0294 0,3.0312 -0.068,0.3338 \
0.1247,0.7103 0.4688,0.7813 1.0431,0.044 2.0802,0 3.125,0 0.3218,0.042 0.7523,-0.062 \
0.8125,-0.4375 0.015,-1.0219 -0.01,-2.0396 0,-3.0625 0.04,-0.2986 -0.069,-0.692 \
-0.4063,-0.75 -0.5887,-0.055 -1.1869,-0.015 -1.7812,-0.031 -0.512,0 -1.0194,0.021 \
-1.5312,0.031 -0.038,-0.01 -0.087,-0.031 -0.125,-0.031 z m 7.5937,0 c -0.2699,0.01 \
-0.5338,0.1787 -0.5625,0.4688 -0.041,1.0003 -0.02,2.0294 -0.031,3.0312 -0.068,0.3338 \
0.1246,0.7103 0.4687,0.7813 1.0431,0.044 2.0801,0 3.125,0 0.3218,0.042 0.7522,-0.062 \
0.8125,-0.4375 0.015,-1.0219 0.026,-2.0396 0.031,-3.0625 0.04,-0.2986 -0.069,-0.692 \
-0.4062,-0.75 -0.5888,-0.055 -1.2182,-0.015 -1.8125,-0.031 -0.512,0 -1.0192,0.021 \
-1.5313,0.031 -0.038,-0.01 -0.055,-0.031 -0.094,-0.031 z m 7.5625,0 c -0.2736,0.01 \
-0.5334,0.1739 -0.5625,0.4688 -0.041,1.0003 -0.02,2.0294 -0.031,3.0312 -0.072,0.3446 \
0.1402,0.7273 0.5,0.7813 1.4201,0.033 2.8606,0 4.2813,0 0.3122,0.04 0.6934,-0.081 \
0.75,-0.4375 0.014,-1.0343 0.027,-2.0582 0.031,-3.0938 0.042,-0.2988 -0.1065,-0.6737 \
-0.4376,-0.7187 -0.7687,-0.043 -1.5396,-0.018 -2.3124,-0.031 -0.6943,0 -1.3997,0.021 \
-2.0938,0.031 -0.038,-0.01 -0.086,-0.031 -0.125,-0.031 z m -91,7.2813 c -0.2625,0.012 \
-0.5347,0.1888 -0.5625,0.4687 -0.041,1.0004 0.011,1.9982 0,3 -0.072,0.3444 \
0.14,0.7273 0.5,0.7813 1.4692,0.033 2.9363,0.031 4.4063,0.031 0.3123,0.04 \
0.7245,-0.081 0.7812,-0.4376 0.014,-1.0342 0,-2.0897 0,-3.125 0.042,-0.2988 \
-0.1064,-0.6424 -0.4375,-0.6874 -0.7937,-0.043 -1.5773,-0.019 -2.375,-0.031 -0.7306,0 \
-1.4882,-0.01 -2.2187,0 -0.037,-0.01 -0.056,0 -0.094,0 z m 8.8125,0 c -0.2699,0.01 \
-0.5338,0.1788 -0.5625,0.4687 -0.041,1.0006 0.011,1.9982 0,3 -0.068,0.3338 \
0.093,0.7093 0.4375,0.7813 1.0431,0.044 2.1113,0.031 3.1563,0.031 0.3217,0.041 \
-       id="rect15570" />
-    <text
-       xml:space="preserve"
-       style="font-size:12px;font-style:normal;font-weight:bold;line-height:125%;lett \
er-spacing:0px;word-spacing:0px;fill:BASE_ROLE_COLOR;fill-opacity:1;stroke:none;font-family:Sans"
                
-       x="278.7287"
-       y="430.77933"
-       id="text15574"
-       ><tspan
-         x="278.7287"
-         y="430.77933"
-         id="TLline1"></tspan></text>
-    <text
-       id="text15664"
-       y="445.93161"
-       x="278.7287"
-       style="font-size:12px;font-style:normal;font-weight:bold;line-height:125%;lett \
er-spacing:0px;word-spacing:0px;fill:BASE_ROLE_COLOR;fill-opacity:1;stroke:none;font-family:Sans"
                
-       xml:space="preserve"><tspan
-         y="445.93161"
-         x="278.7287"
-         id="TLline2"></tspan></text>
-    <text
-       xml:space="preserve"
-       style="font-size:12px;font-style:normal;font-weight:bold;line-height:125%;lett \
er-spacing:0px;word-spacing:0px;fill:BASE_ROLE_COLOR;fill-opacity:1;stroke:none;font-family:Sans"
                
-       x="278.7287"
-       y="461.08389"
-       id="text15672"><tspan
-         x="278.7287"
-         y="461.08389"
-         id="TLline3"></tspan></text>
-    <text
-       id="TLline4"
-       y="476.23618"
-       x="278.7287"
-       style="font-size:12px;font-style:normal;font-weight:bold;line-height:125%;lett \
er-spacing:0px;word-spacing:0px;fill:BASE_ROLE_COLOR;fill-opacity:1;stroke:none;font-family:Sans"
                
-       xml:space="preserve"
-       ><tspan
-         y="476.23618"
-         x="278.7287"
-         id="TLline4"></tspan></text>
-  </g>
-</svg>
diff --git a/src/icons/tips/downArrow.svg b/src/icons/tips/downArrow.svg
new file mode 100644
index 0000000..823a514
--- /dev/null
+++ b/src/icons/tips/downArrow.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="76.470284"
+   height="66.843346"
+   id="svg4670"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="New document 5">
+  <defs
+     id="defs4672" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.8"
+     inkscape:cx="-22.78032"
+     inkscape:cy="13.588757"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:window-width="1600"
+     inkscape:window-height="853"
+     inkscape:window-x="-2"
+     inkscape:window-y="-3"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata4675">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-344.622,-427.51194)">
+    <path
+       inkscape:connector-curvature="0"
+       style="fill:#0000ff;fill-rule:evenodd;stroke:none"
+       d="m 366.2833,427.51656 a 3.8052008,3.8052008 0 0 0 -3.4375,3.78125 l 0,28.5 \
-14.4375,0 a 3.8052008,3.8052008 0 0 0 -2.3125,6.8125 l 34.75,26.9375 a \
3.8052008,3.8052008 0 0 0 4.6875,0 l 34.125,-26.90625 a 3.8052008,3.8052008 0 0 0 \
-2.375,-6.78125 l -14.46875,0 0,-28.5625 a 3.8052008,3.8052008 0 0 0 -3.8125,-3.78125 \
l -32.34375,0 a 3.8052008,3.8052008 0 0 0 -0.375,0 z m 4.15625,7.59375 24.75,0 \
0,28.5625 a 3.8052008,3.8052008 0 0 0 3.8125,3.78125 l 7.34375,0 -23.1875,18.28125 \
-23.625,-18.34375 7.125,0 a 3.8052008,3.8052008 0 0 0 3.78125,-3.8125 l 0,-28.46875 \
z" +       id="rect4655" />
+  </g>
+</svg>
diff --git a/src/icons/tips/keyboard.svg b/src/icons/tips/keyboard.svg
new file mode 100644
index 0000000..c566b80
--- /dev/null
+++ b/src/icons/tips/keyboard.svg
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.0"
+   width="3146"
+   height="1214"
+   id="svg2"
+   inkscape:version="0.48.3.1 r9886"
+   sodipodi:docname="keyboard.svg">
+  <metadata
+     id="metadata78">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview76"
+     showgrid="false"
+     inkscape:zoom="0.094723458"
+     inkscape:cx="1573"
+     inkscape:cy="607"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg2" />
+  <defs
+     id="defs5" />
+  <rect
+     style="fill:BACKGROUD_COLOR_ROLE;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 +     id="rect2983"
+     width="3103.7717"
+     height="1182.3893"
+     x="0"
+     y="21.053692"
+     rx="0"
+     ry="0" />
+  <path
+     style="fill:BASE_ROLE_COLOR;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
 +     d="M 73.90625 -42.28125 C -13.822807 -42.28125 -84.46875 28.333442 -84.46875 \
116.0625 L -84.46875 1140.0938 C -84.46875 1227.8229 -13.822807 1298.4688 73.90625 \
1298.4688 L 3103.7812 1298.4688 C 3191.5104 1298.4688 3262.125 1227.8229 3262.125 \
1140.0938 L 3262.125 116.0625 C 3262.125 28.333442 3191.5104 -42.28125 3103.7812 \
-42.28125 L 73.90625 -42.28125 z M 138.03125 78.25 C 155.64121 78.269071 172.9863 \
78.3681 177.5625 78.46875 C 186.715 78.67004 194.7039 83.54411 194.9375 95.9375 C \
195.1713 108.58045 194.5931 124.94321 194.9375 137.28125 C 195.2892 149.87328 185.556 \
154.82323 177.5625 155 C 169.8171 155.17678 106.70241 155.4828 96.96875 155 C \
87.23495 154.5172 79.82385 145.58631 80.09375 137.28125 C 80.36365 128.97619 79.76245 \
105.34946 80.09375 95.9375 C 80.42465 86.53769 85.80045 78.82261 96.96875 78.46875 C \
102.55288 78.291815 120.42129 78.230929 138.03125 78.25 z M 333.03125 78.25 C \
350.64121 78.269071 367.9863 78.3681 372.5625 78.46875 C 381.715 78.67004 389.7039 \
83.54411 389.9375 95.9375 C 390.1713 108.58045 389.5931 124.94321 389.9375 137.28125 \
C 390.2892 149.87328 380.556 154.82323 372.5625 155 C 364.8171 155.17678 301.70241 \
155.4828 291.96875 155 C 282.23495 154.5172 274.82385 145.58631 275.09375 137.28125 C \
275.36365 128.97619 274.76245 105.34946 275.09375 95.9375 C 275.42465 86.53769 \
280.80045 78.82261 291.96875 78.46875 C 297.55288 78.291815 315.42129 78.230929 \
333.03125 78.25 z M 811.53125 78.25 C 970.6412 78.269071 1129.4863 78.3681 1134.0625 \
78.46875 C 1143.215 78.67004 1151.2039 83.54411 1151.4375 95.9375 C 1151.6713 \
108.58045 1151.0931 124.94321 1151.4375 137.28125 C 1151.7892 149.87328 1142.056 \
154.82323 1134.0625 155 C 1126.3171 155.17678 497.20241 155.4828 487.46875 155 C \
477.73495 154.5172 470.32385 145.58631 470.59375 137.28125 C 470.86365 128.97619 \
470.26245 105.34946 470.59375 95.9375 C 470.92465 86.53769 476.30045 78.82261 \
487.46875 78.46875 C 493.05288 78.291815 652.4213 78.230929 811.53125 78.25 z M \
1575.0312 78.25 C 1734.1412 78.269071 1892.9863 78.3681 1897.5625 78.46875 C 1906.715 \
78.67004 1914.7039 83.54411 1914.9375 95.9375 C 1915.1713 108.58045 1914.5931 \
124.94321 1914.9375 137.28125 C 1915.2892 149.87328 1905.556 154.82323 1897.5625 155 \
C 1889.8171 155.17678 1260.7024 155.4828 1250.9688 155 C 1241.235 154.5172 1233.8238 \
145.58631 1234.0938 137.28125 C 1234.3637 128.97619 1233.7624 105.34946 1234.0938 \
95.9375 C 1234.4246 86.53769 1239.8005 78.82261 1250.9688 78.46875 C 1256.5529 \
78.291815 1415.9213 78.230929 1575.0312 78.25 z M 2336.2812 78.25 C 2495.3912 \
78.269071 2654.2676 78.3681 2658.8438 78.46875 C 2667.9963 78.67004 2675.9851 \
83.54411 2676.2188 95.9375 C 2676.4525 108.58044 2675.8744 124.94321 2676.2188 \
137.28125 C 2676.5705 149.87328 2666.8373 154.82323 2658.8438 155 C 2651.0984 \
155.17678 2021.9836 155.4828 2012.25 155 C 2002.5162 154.5172 1995.1051 145.58631 \
1995.375 137.28125 C 1995.6449 128.97619 1995.0437 105.34945 1995.375 95.9375 C \
1995.7059 86.53769 2001.0817 78.82261 2012.25 78.46875 C 2017.8341 78.291815 \
2177.1713 78.230929 2336.2812 78.25 z M 2815.5938 78.25 C 2833.2037 78.269071 \
2850.5801 78.3681 2855.1562 78.46875 C 2864.3088 78.67004 2872.2976 83.54411 \
2872.5312 95.9375 C 2872.765 108.58045 2872.1869 124.94321 2872.5312 137.28125 C \
2872.883 149.87328 2863.1498 154.82323 2855.1562 155 C 2847.4109 155.17678 2784.2649 \
155.4828 2774.5312 155 C 2764.7975 154.5172 2757.3863 145.58631 2757.6562 137.28125 C \
2757.9261 128.97619 2757.325 105.34946 2757.6562 95.9375 C 2757.9871 86.53769 \
2763.363 78.82261 2774.5312 78.46875 C 2780.1154 78.291815 2797.9838 78.230929 \
2815.5938 78.25 z M 3011.0312 78.25 C 3028.6412 78.269071 3045.9863 78.3681 3050.5625 \
78.46875 C 3059.715 78.67004 3067.7039 83.54411 3067.9375 95.9375 C 3068.1713 \
108.58045 3067.5931 124.94321 3067.9375 137.28125 C 3068.2892 149.87328 3058.556 \
154.82323 3050.5625 155 C 3042.8171 155.17678 2979.7023 155.4828 2969.9688 155 C \
2960.235 154.5172 2952.8239 145.58631 2953.0938 137.28125 C 2953.3636 128.97619 \
2952.7624 105.34946 2953.0938 95.9375 C 2953.4246 86.53769 2958.8005 78.82261 \
2969.9688 78.46875 C 2975.5529 78.291815 2993.4213 78.230929 3011.0312 78.25 z M \
124.03125 233.25 C 135.64121 233.26907 146.9863 233.3681 151.5625 233.46875 C 160.715 \
233.67004 168.7039 238.54411 168.9375 250.9375 C 169.1713 263.58045 168.5931 \
321.94321 168.9375 334.28125 C 169.2892 346.87328 159.556 351.82323 151.5625 352 C \
143.8171 352.17678 104.70241 352.4828 94.96875 352 C 85.23495 351.5172 77.82385 \
342.58631 78.09375 334.28125 C 78.36365 325.97619 77.76245 260.34946 78.09375 \
250.9375 C 78.42465 241.53769 83.80045 233.82261 94.96875 233.46875 C 100.55288 \
233.29181 112.42129 233.23093 124.03125 233.25 z M 309.78125 233.25 C 329.39121 \
233.26907 348.7363 233.3681 353.3125 233.46875 C 362.465 233.67004 370.4539 238.54411 \
370.6875 250.9375 C 370.9213 263.58045 370.3431 321.94321 370.6875 334.28125 C \
371.0392 346.87328 361.306 351.82323 353.3125 352 C 345.5671 352.17678 274.45241 \
352.4828 264.71875 352 C 254.98495 351.5172 247.57385 342.58631 247.84375 334.28125 C \
248.11365 325.97619 247.51245 260.34946 247.84375 250.9375 C 248.17465 241.53769 \
253.55045 233.82261 264.71875 233.46875 C 270.30288 233.29181 290.17129 233.23093 \
309.78125 233.25 z M 513.1875 233.25 C 532.79746 233.26907 552.14255 233.3681 \
556.71875 233.46875 C 565.87125 233.67004 573.86015 238.54411 574.09375 250.9375 C \
574.32755 263.58045 573.74935 321.94321 574.09375 334.28125 C 574.44545 346.87328 \
564.71225 351.82323 556.71875 352 C 548.97335 352.17678 477.8587 352.4828 468.125 352 \
C 458.3912 351.5172 450.9801 342.58631 451.25 334.28125 C 451.5199 325.97619 450.9187 \
260.34946 451.25 250.9375 C 451.5809 241.53769 456.9567 233.82261 468.125 233.46875 C \
473.70915 233.29181 493.57754 233.23093 513.1875 233.25 z M 716.59375 233.25 C \
736.20371 233.26907 755.58005 233.3681 760.15625 233.46875 C 769.30875 233.67004 \
777.2664 238.54411 777.5 250.9375 C 777.7338 263.58045 777.1556 321.94321 777.5 \
334.28125 C 777.8517 346.87328 768.14975 351.82323 760.15625 352 C 752.41085 \
352.17678 681.26495 352.4828 671.53125 352 C 661.79745 351.5172 654.38635 342.58631 \
654.65625 334.28125 C 654.92615 325.97619 654.32495 260.34946 654.65625 250.9375 C \
654.98715 241.53769 660.36295 233.82261 671.53125 233.46875 C 677.1154 233.29181 \
696.98379 233.23093 716.59375 233.25 z M 920 233.25 C 939.60996 233.26907 958.9863 \
233.3681 963.5625 233.46875 C 972.715 233.67004 980.7039 238.54411 980.9375 250.9375 \
C 981.1713 263.58045 980.5931 321.94321 980.9375 334.28125 C 981.2892 346.87328 \
971.556 351.82323 963.5625 352 C 955.8171 352.17678 884.6712 352.4828 874.9375 352 C \
865.2037 351.5172 857.7926 342.58631 858.0625 334.28125 C 858.3324 325.97619 857.7312 \
260.34946 858.0625 250.9375 C 858.3934 241.53769 863.7692 233.82261 874.9375 \
233.46875 C 880.52165 233.29181 900.39004 233.23093 920 233.25 z M 1123.4062 233.25 C \
1143.0162 233.26907 1162.3926 233.3681 1166.9688 233.46875 C 1176.1212 233.67004 \
1184.1102 238.54411 1184.3438 250.9375 C 1184.5775 263.58045 1183.9994 321.94321 \
1184.3438 334.28125 C 1184.6954 346.87328 1174.9622 351.82323 1166.9688 352 C \
1159.2233 352.17678 1088.1087 352.4828 1078.375 352 C 1068.6412 351.5172 1061.2301 \
342.58631 1061.5 334.28125 C 1061.7699 325.97619 1061.1687 260.34946 1061.5 250.9375 \
C 1061.8309 241.53769 1067.2067 233.82261 1078.375 233.46875 C 1083.9592 233.29181 \
1103.7963 233.23093 1123.4062 233.25 z M 1326.8125 233.25 C 1346.4225 233.26907 \
1365.7988 233.3681 1370.375 233.46875 C 1379.5275 233.67004 1387.5164 238.54411 \
1387.75 250.9375 C 1387.9838 263.58045 1387.4056 321.94321 1387.75 334.28125 C \
1388.1017 346.87328 1378.3685 351.82323 1370.375 352 C 1362.6296 352.17678 1291.5149 \
352.4828 1281.7812 352 C 1272.0475 351.5172 1264.6363 342.58631 1264.9062 334.28125 C \
1265.1762 325.97619 1264.575 260.34946 1264.9062 250.9375 C 1265.2371 241.53769 \
1270.613 233.82261 1281.7812 233.46875 C 1287.3654 233.29181 1307.2025 233.23093 \
1326.8125 233.25 z M 1530.25 233.25 C 1549.86 233.26907 1569.205 233.3681 1573.7812 \
233.46875 C 1582.9337 233.67004 1590.9226 238.54411 1591.1562 250.9375 C 1591.39 \
263.58045 1590.8119 321.94321 1591.1562 334.28125 C 1591.5079 346.87328 1581.7748 \
351.82323 1573.7812 352 C 1566.0358 352.17678 1494.9212 352.4828 1485.1875 352 C \
1475.4537 351.5172 1468.0426 342.58631 1468.3125 334.28125 C 1468.5824 325.97619 \
1467.9812 260.34946 1468.3125 250.9375 C 1468.6434 241.53769 1474.0192 233.82261 \
1485.1875 233.46875 C 1490.7717 233.29181 1510.64 233.23093 1530.25 233.25 z M \
1733.6562 233.25 C 1753.2662 233.26907 1772.6113 233.3681 1777.1875 233.46875 C \
1786.34 233.67004 1794.3289 238.54411 1794.5625 250.9375 C 1794.7963 263.58045 \
1794.2181 321.94321 1794.5625 334.28125 C 1794.9142 346.87328 1785.181 351.82323 \
1777.1875 352 C 1769.4421 352.17678 1698.3274 352.4828 1688.5938 352 C 1678.86 \
351.5172 1671.4488 342.58631 1671.7188 334.28125 C 1671.9887 325.97619 1671.3875 \
260.34946 1671.7188 250.9375 C 1672.0496 241.53769 1677.4255 233.82261 1688.5938 \
233.46875 C 1694.1779 233.29181 1714.0463 233.23093 1733.6562 233.25 z M 1937.0625 \
233.25 C 1956.6725 233.26907 1976.0176 233.3681 1980.5938 233.46875 C 1989.7462 \
233.67004 1997.7352 238.54411 1997.9688 250.9375 C 1998.2025 263.58045 1997.6244 \
321.94321 1997.9688 334.28125 C 1998.3204 346.87328 1988.5872 351.82323 1980.5938 352 \
C 1972.8483 352.17678 1901.7337 352.4828 1892 352 C 1882.2662 351.5172 1874.8551 \
342.58631 1875.125 334.28125 C 1875.3949 325.97619 1874.7937 260.34946 1875.125 \
250.9375 C 1875.4559 241.53769 1880.8317 233.82261 1892 233.46875 C 1897.5842 \
233.29181 1917.4525 233.23093 1937.0625 233.25 z M 2138.4688 233.25 C 2158.0787 \
233.26907 2177.4238 233.3681 2182 233.46875 C 2191.1525 233.67004 2199.1414 238.54411 \
2199.375 250.9375 C 2199.6088 263.58045 2199.0306 321.94321 2199.375 334.28125 C \
2199.7267 346.87328 2189.9935 351.82323 2182 352 C 2174.2546 352.17678 2103.1399 \
352.4828 2093.4062 352 C 2083.6725 351.5172 2076.2613 342.58631 2076.5312 334.28125 C \
2076.8011 325.97619 2076.2 260.34946 2076.5312 250.9375 C 2076.8621 241.53769 \
2082.2379 233.82261 2093.4062 233.46875 C 2098.9904 233.29181 2118.8588 233.23093 \
2138.4688 233.25 z M 2343.875 233.25 C 2363.485 233.26907 2382.8301 233.3681 \
2387.4062 233.46875 C 2396.5588 233.67004 2404.5477 238.54411 2404.7812 250.9375 C \
2405.015 263.58045 2404.4369 321.94321 2404.7812 334.28125 C 2405.133 346.87328 \
2395.3997 351.82323 2387.4062 352 C 2379.6609 352.17678 2308.5462 352.4828 2298.8125 \
352 C 2289.0787 351.5172 2281.6676 342.58631 2281.9375 334.28125 C 2282.2074 \
325.97619 2281.6062 260.34946 2281.9375 250.9375 C 2282.2684 241.53769 2287.6442 \
233.82261 2298.8125 233.46875 C 2304.3966 233.29181 2324.265 233.23093 2343.875 \
233.25 z M 2580.2812 233.25 C 2616.3912 233.26907 2652.2363 233.3681 2656.8125 \
233.46875 C 2665.965 233.67004 2673.9539 238.54411 2674.1875 250.9375 C 2674.4213 \
263.58045 2673.8431 321.94321 2674.1875 334.28125 C 2674.5392 346.87328 2664.806 \
351.82323 2656.8125 352 C 2649.0671 352.17678 2511.9524 352.4828 2502.2188 352 C \
2492.485 351.5172 2485.0738 342.58631 2485.3438 334.28125 C 2485.6136 325.97619 \
2485.0125 260.34946 2485.3438 250.9375 C 2485.6746 241.53769 2491.0504 233.82261 \
2502.2188 233.46875 C 2507.8029 233.29181 2544.1713 233.23093 2580.2812 233.25 z M \
2911.5312 233.25 C 2977.6412 233.26907 3043.4863 233.3681 3048.0625 233.46875 C \
3057.215 233.67004 3065.2039 238.54411 3065.4375 250.9375 C 3065.6713 263.58045 \
3065.0931 321.94321 3065.4375 334.28125 C 3065.7892 346.87328 3056.056 351.82323 \
3048.0625 352 C 3040.3171 352.17678 2783.2023 352.4828 2773.4688 352 C 2763.735 \
351.5172 2756.3239 342.58631 2756.5938 334.28125 C 2756.8636 325.97619 2756.2624 \
260.34946 2756.5938 250.9375 C 2756.9246 241.53769 2762.3005 233.82261 2773.4688 \
233.46875 C 2779.0529 233.29181 2845.4213 233.23093 2911.5312 233.25 z M 2913.0312 \
430.25 C 2979.1412 430.26907 3044.9863 430.3681 3049.5625 430.46875 C 3058.715 \
430.67004 3066.7039 435.54411 3066.9375 447.9375 C 3067.1713 460.58045 3066.5931 \
714.94321 3066.9375 727.28125 C 3067.2892 739.87328 3057.556 744.82323 3049.5625 745 \
C 3041.8171 745.17678 2784.7023 745.4828 2774.9688 745 C 2765.235 744.5172 2757.8239 \
735.58631 2758.0938 727.28125 C 2758.3636 718.97619 2757.7624 457.34946 2758.0938 \
447.9375 C 2758.4246 438.53769 2763.8005 430.82261 2774.9688 430.46875 C 2780.5529 \
430.29182 2846.9213 430.23093 2913.0312 430.25 z M 142.03125 430.75 C 161.64121 \
430.76906 180.9863 430.8681 185.5625 430.96875 C 194.715 431.17005 202.7039 436.0441 \
202.9375 448.4375 C 203.1713 461.0805 202.5931 519.44325 202.9375 531.78125 C \
203.2892 544.37325 193.556 549.3232 185.5625 549.5 C 177.8171 549.6767 106.70245 \
549.9828 96.96875 549.5 C 87.23495 549.0172 79.82385 540.08635 80.09375 531.78125 C \
80.36365 523.47615 79.76245 457.8495 80.09375 448.4375 C 80.42465 439.0377 85.80045 \
431.32265 96.96875 430.96875 C 102.5529 430.79185 122.42129 430.73094 142.03125 \
430.75 z M 347.78125 430.75 C 367.39121 430.76906 386.7363 430.8681 391.3125 \
430.96875 C 400.465 431.17005 408.4539 436.0441 408.6875 448.4375 C 408.9213 461.0805 \
408.3431 519.44325 408.6875 531.78125 C 409.0392 544.37325 399.306 549.3232 391.3125 \
549.5 C 383.5671 549.6767 312.45245 549.9828 302.71875 549.5 C 292.98495 549.0172 \
285.57385 540.08635 285.84375 531.78125 C 286.11365 523.47615 285.51245 457.8495 \
285.84375 448.4375 C 286.17465 439.0377 291.55045 431.32265 302.71875 430.96875 C \
308.3029 430.79185 328.17129 430.73094 347.78125 430.75 z M 551.1875 430.75 C \
570.79746 430.76906 590.14255 430.8681 594.71875 430.96875 C 603.87125 431.17005 \
611.86015 436.0441 612.09375 448.4375 C 612.32755 461.0805 611.74935 519.44325 \
612.09375 531.78125 C 612.44545 544.37325 602.71225 549.3232 594.71875 549.5 C \
586.97335 549.6767 515.8587 549.9828 506.125 549.5 C 496.3912 549.0172 488.9801 \
540.08635 489.25 531.78125 C 489.5199 523.47615 488.9187 457.8495 489.25 448.4375 C \
489.5809 439.0377 494.9567 431.32265 506.125 430.96875 C 511.70915 430.79185 \
531.57754 430.73094 551.1875 430.75 z M 754.59375 430.75 C 774.20371 430.76906 \
793.58005 430.8681 798.15625 430.96875 C 807.30875 431.17005 815.2664 436.0441 815.5 \
448.4375 C 815.7338 461.0805 815.1556 519.44325 815.5 531.78125 C 815.8517 544.37325 \
806.14975 549.3232 798.15625 549.5 C 790.41085 549.6767 719.26495 549.9828 709.53125 \
549.5 C 699.79745 549.0172 692.38635 540.08635 692.65625 531.78125 C 692.92615 \
523.47615 692.32495 457.8495 692.65625 448.4375 C 692.98715 439.0377 698.36295 \
431.32265 709.53125 430.96875 C 715.1154 430.79185 734.98379 430.73094 754.59375 \
430.75 z M 958 430.75 C 977.60996 430.76906 996.98629 430.8681 1001.5625 430.96875 C \
1010.715 431.17005 1018.7039 436.0441 1018.9375 448.4375 C 1019.1713 461.0805 \
1018.5931 519.44325 1018.9375 531.78125 C 1019.2892 544.37325 1009.556 549.3232 \
1001.5625 549.5 C 993.81708 549.6767 922.6712 549.9828 912.9375 549.5 C 903.2037 \
549.0172 895.7926 540.08635 896.0625 531.78125 C 896.3324 523.47615 895.7312 457.8495 \
896.0625 448.4375 C 896.3934 439.0377 901.7692 431.32265 912.9375 430.96875 C \
918.52165 430.79185 938.39004 430.73094 958 430.75 z M 1161.4062 430.75 C 1181.0162 \
430.76906 1200.3926 430.8681 1204.9688 430.96875 C 1214.1212 431.17005 1222.1101 \
436.0441 1222.3438 448.4375 C 1222.5775 461.0805 1221.9994 519.44325 1222.3438 \
531.78125 C 1222.6954 544.37325 1212.9623 549.3232 1204.9688 549.5 C 1197.2233 \
549.6767 1126.1087 549.9828 1116.375 549.5 C 1106.6412 549.0172 1099.2301 540.08635 \
1099.5 531.78125 C 1099.7699 523.47615 1099.1687 457.8495 1099.5 448.4375 C 1099.8309 \
439.0377 1105.2067 431.32265 1116.375 430.96875 C 1121.9592 430.79185 1141.7963 \
430.73094 1161.4062 430.75 z M 1364.8125 430.75 C 1384.4225 430.76906 1403.7988 \
430.8681 1408.375 430.96875 C 1417.5275 431.17005 1425.5164 436.0441 1425.75 448.4375 \
C 1425.9838 461.0805 1425.4056 519.44325 1425.75 531.78125 C 1426.1017 544.37325 \
1416.3685 549.3232 1408.375 549.5 C 1400.6296 549.6767 1329.5149 549.9828 1319.7812 \
549.5 C 1310.0475 549.0172 1302.6363 540.08635 1302.9062 531.78125 C 1303.1762 \
523.47615 1302.575 457.8495 1302.9062 448.4375 C 1303.2371 439.0377 1308.613 \
431.32265 1319.7812 430.96875 C 1325.3654 430.79185 1345.2025 430.73094 1364.8125 \
430.75 z M 1568.25 430.75 C 1587.86 430.76906 1607.205 430.8681 1611.7812 430.96875 C \
1620.9337 431.17005 1628.9226 436.0441 1629.1562 448.4375 C 1629.39 461.0805 \
1628.8119 519.44325 1629.1562 531.78125 C 1629.5079 544.37325 1619.7748 549.3232 \
+     id="rect3055" />
+  <g
+     id="g4296" />
+</svg>
diff --git a/src/klib/CMakeLists.txt b/src/klib/CMakeLists.txt
index ee3361b..bac9ef8 100644
--- a/src/klib/CMakeLists.txt
+++ b/src/klib/CMakeLists.txt
@@ -32,7 +32,7 @@ set( ksflphone_LIB_SRCS
    akonadibackend.cpp
    sortabledockcommon.cpp
    configurationskeleton.cpp
-   svgtiploader.cpp
+   tipmanager.cpp
    tip.cpp
    tipanimationwrapper.cpp
 )
diff --git a/src/klib/tip.cpp b/src/klib/tip.cpp
index 691572b..c714e9f 100644
--- a/src/klib/tip.cpp
+++ b/src/klib/tip.cpp
@@ -20,44 +20,26 @@
 //Qt
 #include <QtSvg/QSvgRenderer>
 #include <QtGui/QPainter>
+#include <QtGui/QFontMetrics>
 #include <QtCore/QFile>
 
 //KDE
 #include <KDebug>
 
 //SFLPhone
-#include "svgtiploader.h"
+#include "tipmanager.h"
 
 ///Constructor
 Tip::Tip(QWidget* parent,const QString& path, const QString& text, int maxLine) : \
QObject(parent),m_OriginalText(text),m_MaxLine(maxLine),m_Position(TipPosition::Bottom),m_IsMaxSize(false),m_pR(nullptr),
                
-m_OriginalPalette(parent->palette()),m_AnimationIn(TipAnimation::TranslationTop),m_AnimationOut(TipAnimation::TranslationTop)
 +m_OriginalPalette(parent->palette()),m_AnimationIn(TipAnimation::TranslationTop),m_AnimationOut(TipAnimation::TranslationTop),m_pFont(nullptr)
  {
-   QFile file(path);
-   if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
-      kDebug() << "The tip" << path << "failed to load: No such file";
-   }
-   else {
-      m_OriginalFile = file.readAll();
-      m_OriginalFile.replace("BACKGROUD_COLOR_ROLE",brightOrDarkBase()?"#000000":"#ffffff");
                
-      int lastIndexOf = -1;
-      QStringList lines = \
                SvgTipLoader::stringToLineArray(parent->font(),m_OriginalText,250);
-      for (int i=(maxLine < lines.size())?maxLine:lines.size();i;i--) {
-         m_OriginalFile.replace("BASE_ROLE_COLOR",m_OriginalPalette.base().color().name().toAscii());
                
-         int idx = m_OriginalFile.lastIndexOf(QString("TLline" + \
                QString::number(i)).toAscii(), lastIndexOf);
-         if (idx > 0) {
-            lastIndexOf = idx;
-            if (i==maxLine && maxLine < lines.size())
-               lines[i-1] += "...";
-            m_OriginalFile.insert(idx+9,lines[i-1].toAscii());
-         }
-      }
-   }
+   loadSvg(path);
 }
 
 ///Destructor
 Tip::~Tip()
 {
-   
+   if (m_pFont) delete m_pFont;
 }
 
 /**
@@ -68,35 +50,91 @@ QSize Tip::reload(const QRect& availableSize)
 {
    if (m_CurrentRect != availableSize && !(m_IsMaxSize && m_CurrentSize.width()*1.25 \
< availableSize.width())) {  m_CurrentRect = availableSize;
-      int wwidth(availableSize.width()),wheight((availableSize.width())*0.539723102);
 +      m_CurrentRect.setHeight(PADDING);
 
-      if (wheight > 170) {
-         wheight = 170;
-         wwidth  = wheight*1.85280192;
-         m_IsMaxSize = true;
-      }
-      else {
-         m_IsMaxSize = false;
+      //One 1000px wide line is not so useful, this may change later (variable)
+      if (m_CurrentRect.width() > MAX_WIDTH) {
+         m_CurrentRect.setWidth( MAX_WIDTH );
       }
-      m_CurrentImage = QImage(QSize(wwidth,wheight),QImage::Format_RGB888);
+      m_CurrentRect.setWidth(m_CurrentRect.width());
+
+      //Get area required to display the text
+      QRect textRect = getTextRect(m_OriginalText);
+      m_CurrentRect.setHeight(m_CurrentRect.height() + textRect.height() + PADDING + \
getDecorationRect().height()); +
+      //Create the background image
+      m_CurrentImage = \
QImage(QSize(m_CurrentRect.width(),m_CurrentRect.height()),QImage::Format_RGB888);  \
m_CurrentImage.fill(m_OriginalPalette.base().color() );  QPainter p(&m_CurrentImage);
+      p.setRenderHint(QPainter::Antialiasing, true);
+      p.setFont(font());
+
 
-      if (!m_pR)
-         m_pR = new QSvgRenderer(m_OriginalFile);
+      //Draw the tip rectangle
+      p.setPen(QPen(m_OriginalPalette.base().color()));
+      p.setBrush(QBrush(brightOrDarkBase()?Qt::black:Qt::white));
+      p.drawRoundedRect(QRect(0,0,m_CurrentRect.width(),m_CurrentRect.height()),10,10);
  
-      m_CurrentSize = QSize(wwidth,wheight);
+      //Draw the wrapped text in textRectS
+      p.drawText(textRect,Qt::TextWordWrap|Qt::AlignJustify,m_OriginalText);
 
-      if (availableSize.height() >= wheight)
-         m_pR->render(&p,QRect(0,0,wwidth,wheight));
+
+      //If the widget is subclassed, this would allow decorations to be added like \
images +      paintDecorations(p,textRect);
+      
+      //Set the size from the RECT //TODO redundant
+      m_CurrentSize = QSize(m_CurrentRect.width(),m_CurrentRect.height());
    }
    return m_CurrentSize;
 }
 
+QRect Tip::getTextRect(const QString& text)
+{
+   QFontMetrics metric(font());
+   QRect rect = metric.boundingRect(QRect(PADDING,PADDING,m_CurrentRect.width()-2*PADDING,999999),Qt::AlignJustify|Qt::TextWordWrap,text);
 +   return rect;
+}
+
 ///Check if the thene color scheme is darker than #888888
 ///@return true = bright, false = dark
 bool Tip::brightOrDarkBase()
 {
    QColor color = m_OriginalPalette.base().color();
    return (color.red() > 128 && color.green() > 128 && color.blue() > 128);
+}
+
+
+QRect Tip::getDecorationRect()
+{
+   return QRect(0,0,m_CurrentSize.width()-2*PADDING,60);
+}
+
+void Tip::paintDecorations(QPainter& p, const QRect& textRect)
+{
+   if (!m_pR)
+      m_pR = new QSvgRenderer(m_OriginalFile);
+   m_pR->render(&p,QRect(m_CurrentRect.width() - PADDING - 50*2.59143327842 - 10 \
,textRect.y()+textRect.height() + 10,50*2.59143327842,50)); +}
+
+const QFont& Tip::font()
+{
+   if (!m_pFont) {
+      m_pFont = new QFont();
+      m_pFont->setBold(true);
+   }
+   return (const QFont&) *m_pFont;
+}
+
+QString Tip::loadSvg(const QString& path)
+{
+   QFile file(path);
+   if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
+      kDebug() << "The tip" << path << "failed to load: No such file";
+   }
+   else {
+      m_OriginalFile = file.readAll();
+      m_OriginalFile.replace("BACKGROUD_COLOR_ROLE",brightOrDarkBase()?"#000000":"#ffffff");
 +      m_OriginalFile.replace("BASE_ROLE_COLOR",m_OriginalPalette.base().color().name().toAscii());
 +   }
+   return m_OriginalFile;
 }
\ No newline at end of file
diff --git a/src/klib/tip.h b/src/klib/tip.h
index b49a5a2..648c232 100644
--- a/src/klib/tip.h
+++ b/src/klib/tip.h
@@ -32,12 +32,15 @@ class QSvgRenderer;
 //SFLPhone
 #include "../lib/typedefs.h"
 
+//Qt
+class QPainter;
+
 ///A tip to be passed to the TipLoader
 class Tip : public QObject
 {
    Q_OBJECT
 public:
-   friend class SvgTipLoader;
+   friend class TipManager;
    friend class TipAnimationWrapper;
    Tip(QWidget* parent = nullptr,const QString& path="", const QString& text="", int \
maxLine=4);  virtual ~Tip();
@@ -48,7 +51,7 @@ public:
       Middle,
       Bottom
    };
-   
+
    enum TipAnimation {
       Fade,
       TranslationTop,
@@ -57,7 +60,7 @@ public:
       TranslationRight,
       None
    };
-   
+
    //Mutator
    QSize reload(const QRect& availableSize);
 
@@ -76,9 +79,20 @@ protected:
    QPalette      m_OriginalPalette;
    TipAnimation  m_AnimationIn    ;
    TipAnimation  m_AnimationOut   ;
+   QFont*        m_pFont          ;
+
+   static const int PADDING = 15;
+   static const int MAX_WIDTH = 350;
 
    //Helper
    bool brightOrDarkBase();
+   QString loadSvg(const QString& path);
+
+   //To reimplement if needed
+   virtual QRect getTextRect(const QString& text);
+   virtual QRect getDecorationRect();
+   virtual void  paintDecorations(QPainter& p, const QRect& textRect);
+   virtual const QFont& font();
 };
 
 #endif
\ No newline at end of file
diff --git a/src/klib/tipanimationwrapper.cpp b/src/klib/tipanimationwrapper.cpp
index e3a8c20..607d95a 100644
--- a/src/klib/tipanimationwrapper.cpp
+++ b/src/klib/tipanimationwrapper.cpp
@@ -23,11 +23,11 @@
 
 //SFLPhone
 #include "tip.h"
-#include "svgtiploader.h"
+#include "tipmanager.h"
 
-TipAnimationWrapper::TipAnimationWrapper(Tip* aTip, SvgTipLoader* parent) : \
QObject(parent),m_MaxStep(15),m_Step(0),m_pTimer(nullptr),m_pTip(aTip),m_TipSize(QSize(0,0))
 +TipAnimationWrapper::TipAnimationWrapper(Tip* aTip, TipManager* parent) : \
QObject(parent),m_MaxStep(15),m_Step(0),m_pTimer(nullptr),m_pTip(aTip),m_TipSize(QSize(0,0))
  {
-   connect(parent,SIGNAL(sizeChanged(QRect)),this,SLOT(sizeChanged(QRect)));
+   connect(parent,SIGNAL(sizeChanged(QRect,bool)),this,SLOT(sizeChanged(QRect,bool)));
  }
 
 TipAnimationWrapper::~TipAnimationWrapper()
@@ -35,13 +35,20 @@ TipAnimationWrapper::~TipAnimationWrapper()
    
 }
 
-void TipAnimationWrapper::sizeChanged(QRect rect)
+void TipAnimationWrapper::sizeChanged(QRect rect,bool ignoreAnim)
 {
    if (m_pTip) {
       m_TipSize = m_pTip->reload(QRect(0,0,rect.width(),rect.height()));
       m_CurrentImage = m_pTip->m_CurrentImage;
    }
    m_ParentRect = rect;
+   if (!ignoreAnim) {
+      Tip::TipAnimation anim = m_CurrentAnimation;
+      m_CurrentAnimation = Tip::None;
+      m_Step = 0;
+      step();
+      m_CurrentAnimation = anim;
+   }
 }
 
 const QImage& TipAnimationWrapper::currentImage()
@@ -79,9 +86,10 @@ void TipAnimationWrapper::start(bool show)
 void TipAnimationWrapper::step()
 {
    m_Step++;
-   if (m_Step > m_MaxStep && m_pTimer) {
+   if (m_Step > m_MaxStep) {
       m_Step = 0;
-      m_pTimer->stop();
+      if (m_pTimer)
+         m_pTimer->stop();
       emit animationEnded();
    }
    else {
diff --git a/src/klib/tipanimationwrapper.h b/src/klib/tipanimationwrapper.h
index a006050..a7c2ab3 100644
--- a/src/klib/tipanimationwrapper.h
+++ b/src/klib/tipanimationwrapper.h
@@ -27,7 +27,7 @@ class QTimer;
 
 //SFLPhone
 #include "tip.h"
-class SvgTipLoader;
+class TipManager;
 
 //Structs
 struct FrameDescription {
@@ -40,12 +40,12 @@ class TipAnimationWrapper : public QObject
 {
    Q_OBJECT
 public:
-   TipAnimationWrapper(Tip* aTip, SvgTipLoader* parent);
+   TipAnimationWrapper(Tip* aTip, TipManager* parent);
    virtual ~TipAnimationWrapper();
 
    //Mutator
    void start(bool show = true);
-   
+
    //Getter
    const QImage& currentImage();
    QSize tipSize();
@@ -68,7 +68,7 @@ protected:
 
 private slots:
    void step();
-   void sizeChanged(QRect rect);
+   void sizeChanged(QRect rect,bool ignoreAnim);
 
 signals:
    void animationStep(FrameDescription desc);
diff --git a/src/klib/svgtiploader.cpp b/src/klib/tipmanager.cpp
similarity index 69%
rename from src/klib/svgtiploader.cpp
rename to src/klib/tipmanager.cpp
index 71da381..b034c2e 100644
--- a/src/klib/svgtiploader.cpp
+++ b/src/klib/tipmanager.cpp
@@ -15,7 +15,7 @@
  *   You should have received a copy of the GNU General Public License      *
  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
  ***************************************************************************/
-#include "svgtiploader.h"
+#include "tipmanager.h"
 
 //Qt
 #include <QtGui/QPainter>
@@ -37,7 +37,7 @@ bool ResizeEventFilter::eventFilter(QObject *obj, QEvent *event)
 }
 
 ///Constructor
-SvgTipLoader::SvgTipLoader(QTreeView* parent, const QString& path, const QString& \
text, int maxLine):QObject(parent), +TipManager::TipManager(QTreeView* parent, const \
QString& path, const QString& text, int maxLine):QObject(parent),  \
m_OriginalPalette(parent->palette()),m_pParent(parent),m_BottomMargin(0),m_TopMargin(0),m_Tip(parent,path,text,maxLine),
  m_pAnim(&m_Tip,this)
 {
@@ -49,13 +49,13 @@ m_pAnim(&m_Tip,this)
 }
 
 ///Get the current image
-QImage SvgTipLoader::getImage()
+QImage TipManager::getImage()
 {
    return m_CurrentImage;
 }
 
 ///Reload the SVG with new size
-void SvgTipLoader::reload()
+void TipManager::reload()
 {
    int width(m_pParent->width()),height(m_pParent->height());
    int effectiveHeight = height-m_BottomMargin-m_TopMargin;
@@ -74,77 +74,44 @@ void SvgTipLoader::reload()
    m_pParent->setPalette(p2);
 }
 
-/**
- * Take a long string and manually wrap it using a specific font. This is needed \
                because SVG
- * does not natively support wrapping and Qt does not implement the few hacks around \
                this
- * so it is better to create a <text> field for each line
- */
-QStringList SvgTipLoader::stringToLineArray(const QFont& font, QString text, int \
                width )
-{
-   QFontMetrics metric(font);
-   int total = 0;
-   QStringList result;
-   QStringList words = text.split(' ');
-
-   QString tmp;
-   foreach(QString word, words) {
-      int mW = metric.width(word+' ');
-      if (mW + total > width){
-         result << tmp;
-         tmp = QString();
-         total = 0;
-      }
-      total += mW;
-      tmp += word + ' ';
-   }
-   if (tmp.size()) {
-      result << tmp;
-   }
-
-   return result;
-}
-
 ///Set the top margin
-void SvgTipLoader::setTopMargin(int margin)
+void TipManager::setTopMargin(int margin)
 {
    bool changed = !(m_TopMargin == margin);
    m_TopMargin = margin;
-   if (changed) changeSize();
+   if (changed) changeSize(true);
 }
 
 ///Set the bottom margin
-void SvgTipLoader::setBottomMargin(int margin)
+void TipManager::setBottomMargin(int margin)
 {
    bool changed = !(m_BottomMargin == margin);
    m_BottomMargin = margin;
-   if (changed) changeSize();
+   if (changed) changeSize(true);
 }
 
 ///Set the current tip, hide the previous one, if any
-void SvgTipLoader::setCurrentTip(bool tip)
+void TipManager::setCurrentTip(bool tip)
 {
-   m_pCurrentTip =  tip;
-   /*if (tip) {
+   if (tip != m_pCurrentTip) {
+      m_pCurrentTip =  tip;
+      m_pAnim.start(tip);
+      changeSize(true);
    }
-   else {
-      //m_CurrentFrame = {QPoint(0,0),QRect(0,0,0,0),0};
-   }*/
-   m_pAnim.start(tip);
-   changeSize();
 }
 
 ///Callback for new animation frame
-void SvgTipLoader::animationStep(FrameDescription desc)
+void TipManager::animationStep(FrameDescription desc)
 {
    m_CurrentFrame = desc;
    reload();
 }
 
 ///Callback when size change
-void SvgTipLoader::changeSize()
+void TipManager::changeSize(bool ignoreAnim)
 {
    int width(m_pParent->width()),height(m_pParent->height());
    int effectiveHeight = height-m_BottomMargin-m_TopMargin;
-   qDebug() << height << (height-effectiveHeight) << effectiveHeight << (width-30);
-   emit sizeChanged(QRect(15,m_TopMargin,width-30,effectiveHeight));
+//    qDebug() << height << (height-effectiveHeight) << effectiveHeight << \
(width-30); +   emit \
sizeChanged(QRect(15,m_TopMargin,width-30,effectiveHeight),ignoreAnim);  }
\ No newline at end of file
diff --git a/src/klib/svgtiploader.h b/src/klib/tipmanager.h
similarity index 85%
rename from src/klib/svgtiploader.h
rename to src/klib/tipmanager.h
index 5c44486..5224818 100644
--- a/src/klib/svgtiploader.h
+++ b/src/klib/tipmanager.h
@@ -30,30 +30,30 @@ class QSvgRenderer;
 #include "../lib/typedefs.h"
 #include "tip.h"
 #include "tipanimationwrapper.h"
-class SvgTipLoader;
+class TipManager;
 
 //Classes
 class ResizeEventFilter : public QObject
 {
    Q_OBJECT
 public:
-   ResizeEventFilter(SvgTipLoader* parent) : QObject(0) {
+   ResizeEventFilter(TipManager* parent) : QObject(0) {
       m_pLoader =  parent;
    }
 protected:
    bool eventFilter(QObject *obj, QEvent *event);
 private:
-   SvgTipLoader* m_pLoader;
+   TipManager* m_pLoader;
 };
 
 ///This class create a background brush for a QWidget with a tip window
-class LIB_EXPORT SvgTipLoader : public QObject
+class LIB_EXPORT TipManager : public QObject
 {
    Q_OBJECT
    friend class ResizeEventFilter;
 public:
    //Constructor
-   SvgTipLoader(QTreeView* parent, const QString& path, const QString& text, int \
maxLine); +   TipManager(QTreeView* parent, const QString& path, const QString& text, \
int maxLine);  
    //Getter
    QImage getImage();
@@ -64,7 +64,7 @@ public:
    void setCurrentTip(bool tip);
 
    //Helper
-   static QStringList stringToLineArray(const QFont& font, QString text, int width = \
-1); +//    static QStringList stringToLineArray(const QFont& font, QString text, int \
width = -1);  
 private:
    //Methods
@@ -83,10 +83,10 @@ private:
 
 private slots:
    void animationStep(FrameDescription desc);
-   void changeSize();
+   void changeSize(bool ignoreAnim = false);
 
 signals:
-   void sizeChanged(QRect newRect);
+   void sizeChanged(QRect newRect,bool ignoreAnim);
 
 };
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic