Summary: | Konqueror should surround web page regions of not-yet-loaded bitmaps/images with a temporary frame | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Helge Deller <deller> |
Component: | khtml renderer | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 3.3 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | patch which enables this (can be enabled/disabled by KHTML configuration) |
Description
Helge Deller
2004-11-13 18:12:59 UTC
Created attachment 8634 [details]
patch which enables this (can be enabled/disabled by KHTML configuration)
this patch is a first draft to fix this feature.
The configuration entry "UnfinishedImageFrame" enables/disables this feature.
A patch to kcontrol to check this value with GUI is still missing..
CVS commit by deller: show frames around not yet fully loaded images; this feature is off by default right now (was this the result on kfm-devel or should I turn it on by default?) Germain Garand's "contrast detection enhancement" is not applied with this commit yet, neither is the "inset enhancement" by Leo (would you please apply as you like...) CCMAIL: Germain Garand <germain@ebooksfrance.org>, Leo Savernik <l.savernik@aon.at> FEATURE: 93213 M +9 -0 kdebase/kcontrol/konqhtml/htmlopts.cpp 1.88 M +1 -0 kdebase/kcontrol/konqhtml/htmlopts.h 1.36 M +9 -0 kdelibs/khtml/khtml_settings.cc 1.108 M +1 -0 kdelibs/khtml/khtml_settings.h 1.43 M +12 -0 kdelibs/khtml/rendering/render_image.cpp 1.139 M +1 -0 kdelibs/khtml/rendering/render_image.h 1.57 IMO, the option should be off by default. CVS commit by savernik: Added image loading indicator icon to Helge's image loading frame patch. By discussion with Germain, it is grayscale. Additionally, I've given it a 50% transparency to make it even less intrusive. CCMAIL: 93213@bugs.kde.org, germain@ebooksfrance.org A pics/img-loading.png 1.1 A rendering/loading_icon.cpp 1.1 [no copyright] M +3 -0 rendering/Makefile.am 1.38 M +11 -0 rendering/render_image.cpp 1.140 --- kdelibs/khtml/rendering/Makefile.am #1.37:1.38 @@ -50,3 +50,6 @@ kdoc -H -d $(SRCDOC_DEST) kdecore -lqt +## maintainer: regen loading icon +loading-icon: + bin2c -sploading_icon $(srcdir)/../pics/img-loading.png > $(srcdir)/loading_icon.cpp --- kdelibs/khtml/rendering/render_image.cpp #1.139:1.140 @@ -50,4 +50,6 @@ #include <math.h> +#include "loading_icon.cpp" + using namespace DOM; using namespace khtml; @@ -239,7 +241,16 @@ void RenderImage::paint(PaintInfo& paint // paint frame around image as long as it is not completely loaded from web. if (bUnfinishedImageFrame && paintInfo.phase == PaintActionForeground && cWidth > 2 && cHeight > 2 && !complete()) { + static QPixmap *loadingIcon; paintInfo.p->setPen(QPen(Qt::gray, 1)); paintInfo.p->setBrush( Qt::NoBrush ); paintInfo.p->drawRect(_tx, _ty, m_width, m_height); + if (!(m_width <= 5 || m_height <= 5)) { + if (!loadingIcon) { + loadingIcon = new QPixmap(); + loadingIcon->loadFromData(loading_icon_data, loading_icon_len); + } + paintInfo.p->drawPixmap(_tx + 4, _ty + 4, *loadingIcon, 0, 0, m_width - 5, m_height - 5); + } + } CVS commit by ggarand: use contrast detection for determining the loading-image-frame color, so that it is visible on every background. CCBUG: 93213 M +71 -0 misc/helper.cpp 1.59 M +6 -0 misc/helper.h 1.19 M +4 -1 rendering/render_image.cpp 1.141 M +3 -71 rendering/render_text.cpp 1.259 |