Bug 88870 - Host application name invisible in generated page
Summary: Host application name invisible in generated page
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-HTMLGallery (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-05 11:31 UTC by Jesper Pedersen
Modified: 2022-01-17 12:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 7.6.0


Attachments
Image showing the problem (76.25 KB, image/jpeg)
2004-09-05 11:33 UTC, Jesper Pedersen
Details

Note You need to log in before you can comment on or make changes to this bug.
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;
 }