[Kde-imaging] [Bug 88870] Host application name invisible in generated page

Renchi Raju renchi at pooh.tam.uiuc.edu
Wed Dec 22 05:12:11 CET 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
        
http://bugs.kde.org/show_bug.cgi?id=88870        
renchi pooh tam uiuc edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From renchi pooh tam uiuc edu  2004-12-22 05:12 -------
CVS commit by pahlibar: 


use a simple hsv cycle algo to try and get contrasting colors for links. not
perfect, but will do
BUG: 88870


  M +19 -0     imagesgallery.cpp   1.42


--- kdeextragear-libs-1/kipi-plugins/imagesgallery/imagesgallery.cpp  #1.41:1.42
 @ -628,4 +628,21  @ void ImagesGallery::createCSSSection(QTe
     QString bordersImagesColor = m_bordersImagesColor.name();
 
+    // Since the link colors are not set by the config, they can become invisible
+    // because of the choice of the background color set by user. Find
+    // contrasting color so that it becomes distinguishable
+
+    int h,s,v;
+    m_backgroundColor.getHsv(&h, &s, &v);
+
+    h = (h+180) % 360;
+    v = (v+128) % 256;
+    QColor linkRegColor;
+    linkRegColor.setHsv(h, s, v);
+
+    h = (h+60)  % 360;
+    s = QMAX(s-60, 0);
+    QColor linkVisColor;
+    linkVisColor.setHsv(h, s, v);        
+    
     // Adding a touch of style
 
 @ -639,4 +656,6  @ void ImagesGallery::createCSSSection(QTe
     stream << "IMG.photo      { border: " << m_bordersImagesSize << "px solid "
            << bordersImagesColor << "; }" << endl;
+    stream << "a:link    { color: " << linkRegColor.name() << "; }" << endl;
+    stream << "a:visited { color: " << linkVisColor.name() << "; }" << endl;
     stream << "</style>" << endl;
 }


More information about the Kde-imaging mailing list