| Summary: | Host application name invisible in generated page | ||
|---|---|---|---|
| Product: | [Applications] digikam | Reporter: | Jesper Pedersen <blackie> |
| Component: | Plugin-Generic-HTMLGallery | Assignee: | Digikam Developers <digikam-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | 7.6.0 | |
| Sentry Crash Report: | |||
| Attachments: | Image showing the problem | ||
|
Description
Jesper Pedersen
2004-09-05 11:31:07 UTC
Created attachment 7411 [details]
Image showing the problem
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;
}
|