Bug 88870

Summary: Host application name invisible in generated page
Product: [Applications] digikam Reporter: Jesper Pedersen <blackie>
Component: Plugin-Generic-HTMLGalleryAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 7.6.0
Attachments: Image showing the problem

Description Jesper Pedersen 2004-09-05 11:31:07 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

In the default generated page, the background color is black, and the link color of the word "kimdaba" in the text "Image gallery created with kimdaba on Sunday 05 September 2004" is also black.
Comment 1 Jesper Pedersen 2004-09-05 11:33:28 UTC
Created attachment 7411 [details]
Image showing the problem
Comment 2 Renchi Raju 2004-12-22 05:12:10 UTC
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;
 }