r14808 by fschmid - Partly fixed Bug 8808: "Resolution Warning "Ã la Text Overflow Warning" in Image frames"
scribus-commit
scribus-commit at lists.scribus.net
Wed Feb 24 20:10:19 CET 2010
Revision: 14808
Author: fschmid
Date: 2010-02-24T19:01:02.580311Z
Commit message: Partly fixed Bug 8808: "Resolution Warning "Ã la Text Overflow Warning" in Image frames"
Changeset:
M /trunk/Scribus/scribus/pageitem.cpp
Diffs:
Index: scribus/pageitem.cpp
===================================================================
--- scribus/pageitem.cpp (revision 14807)
+++ scribus/pageitem.cpp (revision 14808)
@@ -69,6 +69,7 @@
#include "util_math.h"
#include "util_text.h"
#include "util_file.h"
+#include "util_icon.h"
#ifdef HAVE_CAIRO
#include <cairo.h>
#endif
@@ -1576,6 +1577,26 @@
#endif
p->strokePath();
}
+ if (itemType()==ImageFrame)
+ {
+ double minres = m_Doc->checkerProfiles[m_Doc->curCheckProfile].minResolution;
+ double maxres = m_Doc->checkerProfiles[m_Doc->curCheckProfile].maxResolution;
+ bool checkres = m_Doc->checkerProfiles[m_Doc->curCheckProfile].checkResolution;
+ if ((((72.0 / imageXScale()) < minres)
+ || ((72.0 / imageYScale()) < minres)
+ || ((72.0 / imageXScale()) > maxres)
+ || ((72.0 / imageYScale()) > maxres))
+ && (isRaster) && (checkres) && (!view->m_canvas->isPreviewMode()))
+ {
+ double ofx = Width - 22.0;
+ double ofy = Height - 22.0;
+ p->save();
+ p->translate(ofx, ofy);
+ QImage ico = loadIcon("22/dialog-warning.png").toImage();
+ p->drawImage(&ico);
+ p->restore();
+ }
+ }
if ((m_Doc->guidesSettings.layerMarkersShown) && (m_Doc->layerCount() > 1) && (!m_Doc->layerOutline(LayerID)) && ((isGroupControl) || (Groups.count() == 0)) && (!view->m_canvas->isPreviewMode()))
{
p->setPen(Qt::black, 0.5/ m_Doc->view()->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
More information about the scribus-commit
mailing list