r19479 by craig - Splash\!\!\!

scribus-commit scribus-commit at lists.scribus.net
Fri Sep 5 19:28:02 UTC 2014


Author: craig
Date: Fri Sep  5 19:28:02 2014
New Revision: 19479

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19479
Log:
Splash\!\!\!

Added:
    trunk/Scribus/resources/icons/scribus_splash.png   (with props)
Modified:
    trunk/Scribus/scribus/scribuscore.cpp
    trunk/Scribus/scribus/ui/about.cpp
    trunk/Scribus/scribus/ui/splash.cpp
    trunk/Scribus/scribus/ui/splash.h
    trunk/Scribus/scribus/ui/tabruler.cpp

Modified: trunk/Scribus/scribus/scribuscore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19479&path=/trunk/Scribus/scribus/scribuscore.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuscore.cpp (original)
+++ trunk/Scribus/scribus/scribuscore.cpp Fri Sep  5 19:28:02 2014
@@ -224,10 +224,12 @@
 {
 	if (showSplash)
 	{
-        QPixmap pix = loadIcon("Splash.png", true);
+		//QPixmap pix = loadIcon("Splash.png", true);
+		QPixmap pix = loadIcon("scribus_splash.png", true);
+		//ScSplashScreen::writeVersion(&pix);
 		m_SplashScreen = new ScSplashScreen(pix, Qt::WindowStaysOnTopHint);
-        if (m_SplashScreen != NULL)
-            m_SplashScreen->show();
+		if (m_SplashScreen != NULL)
+			m_SplashScreen->show();
 		if (m_SplashScreen != NULL && m_SplashScreen->isVisible())
 			setSplashStatus(QObject::tr("Initializing..."));
 	}

Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19479&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Fri Sep  5 19:28:02 2014
@@ -108,7 +108,7 @@
 	tabLayout1->setSpacing( 6 );
 	tabLayout1->setMargin( 15 );
 	pixmapLabel1 = new QLabel( tab );
-	pixmapLabel1->setPixmap(loadIcon("Splash.png", true));
+	pixmapLabel1->setPixmap(loadIcon("scribus_splash.png", true));
 	pixmapLabel1->setFixedSize(QSize(pixmapLabel1->pixmap()->width(), pixmapLabel1->pixmap()->height()));
 	pixmapLabel1->setAlignment(Qt::AlignCenter);
 	tabLayout1->addWidget( pixmapLabel1 );

Modified: trunk/Scribus/scribus/ui/splash.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19479&path=/trunk/Scribus/scribus/ui/splash.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/splash.cpp (original)
+++ trunk/Scribus/scribus/ui/splash.cpp Fri Sep  5 19:28:02 2014
@@ -13,15 +13,30 @@
 #include <QPixmap>
 #include <QRegExp>
 
+#include "scconfig.h"
 #include "splash.h"
 
 #include "util.h"
 #include "util_icon.h"
 
+#ifdef HAVE_SVNVERSION
+	#include "svnversion.h"
+#endif
 
 ScSplashScreen::ScSplashScreen( const QPixmap & pixmap, Qt::WindowFlags f ) : QSplashScreen( pixmap, f)
 {
-
+#if defined _WIN32
+	QFont font("Lucida Sans Unicode", 9);
+#elif defined(__INNOTEK_LIBC__)
+	QFont font("WarpSans", 8);
+#elif defined(Q_OS_MAC)
+	QFont font("Helvetica Regular", 11);
+#else
+	QFont font("DejaVu Sans", 8);
+	if (!font.exactMatch())
+		font.setFamily("Bitstream Vera Sans");
+#endif
+	setFont(font);
 }
 
 void ScSplashScreen::setStatus( const QString &message )
@@ -39,18 +54,54 @@
 		}
 	}
 
-#if defined _WIN32
-	QFont font("Lucida Sans Unicode", 9);
-#elif defined(__INNOTEK_LIBC__)
-	QFont font("WarpSans", 8);
-#elif defined(Q_OS_MAC)
-	QFont font("Helvetica Regular", 11);
-#else
-	QFont font("DejaVu Sans", 8);
-	if (!font.exactMatch())
-		font.setFamily("Bitstream Vera Sans");
-#endif
-
-	setFont(font);
 	showMessage ( tmp, Qt::AlignRight | Qt::AlignBottom, Qt::white );
 }
+
+void ScSplashScreen::drawContents(QPainter* painter)
+{
+	QFont f(font());
+	QSplashScreen::drawContents(painter);
+	QRect r = rect().adjusted(0, 0, -15, -60);
+	QFont lgf(font());
+#if defined _WIN32
+	lgf.setPointSize(30);
+#elif defined(__INNOTEK_LIBC__)
+	lgf.setPointSize(29);
+#elif defined(Q_OS_MAC)
+	lgf.setPointSize(32);
+#else
+	lgf.setPointSize(29);
+#endif
+	QString v(VERSION);
+	painter->setFont(lgf);
+	painter->drawText(r, Qt::AlignRight | Qt::AlignBottom, v );
+
+	if (v.contains("svn"))
+	{
+#ifdef HAVE_SVNVERSION
+	#ifdef SVNVERSION
+		QString revText;
+		revText=QString("SVN Revision: %1").arg(SVNVERSION);
+		QRect r2 = rect().adjusted(0, 0, -15, -50);
+		painter->setFont(f);
+		painter->drawText(r2, Qt::AlignRight | Qt::AlignBottom, revText );
+	#endif
+#endif
+		QFont wf(font());
+#if defined _WIN32
+	wf.setPointSize(10);
+#elif defined(__INNOTEK_LIBC__)
+	wf.setPointSize(9);
+#elif defined(Q_OS_MAC)
+	wf.setPointSize(12);
+#else
+	wf.setPointSize(9);
+#endif
+		painter->setFont(wf);
+		painter->setPen(QPen(Qt::red));
+		QString warningText("UNSTABLE. For testing purposes only!");
+		QRect r3 = rect().adjusted(0, 0, -15, -25);
+		painter->drawText(r3, Qt::AlignRight | Qt::AlignBottom, warningText );
+	}
+}
+

Modified: trunk/Scribus/scribus/ui/splash.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19479&path=/trunk/Scribus/scribus/ui/splash.h
==============================================================================
--- trunk/Scribus/scribus/ui/splash.h (original)
+++ trunk/Scribus/scribus/ui/splash.h Fri Sep  5 19:28:02 2014
@@ -7,6 +7,7 @@
 #ifndef SPLASHSCREEN_H
 #define SPLASHSCREEN_H
 
+#include <QLabel>
 #include <QSplashScreen>
 #include <QPixmap>
 #include <QString>
@@ -16,19 +17,22 @@
 //! \brief Scribus splash screen
 class SCRIBUS_API ScSplashScreen : public QSplashScreen
 {
-public:
-	/*!
-	\author Franz Schmid
-	\brief Constructor for SplashScreen
-	 */
-	ScSplashScreen ( const QPixmap & pixmap = QPixmap(), Qt::WindowFlags f = 0 );
-	~ScSplashScreen() {};
-	/*!
-	\author Franz Schmid
-	\brief Sets new status on SplashScreen and calls for a SplashScreen::repaint afterwards.
-	\param message const QString& message to display as actions are performed on startup when SplashScreen is displayed.
-	*/
-	void setStatus( const QString &message );
+	public:
+		/*!
+		\author Franz Schmid
+		\brief Constructor for SplashScreen
+		 */
+		ScSplashScreen ( const QPixmap & pixmap = QPixmap(), Qt::WindowFlags f = 0 );
+		~ScSplashScreen() {};
+		/*!
+		\author Franz Schmid
+		\brief Sets new status on SplashScreen and calls for a SplashScreen::repaint afterwards.
+		\param message const QString& message to display as actions are performed on startup when SplashScreen is displayed.
+		*/
+		void setStatus( const QString &message );
+
+	protected:
+		void drawContents(QPainter *painter);
 };
 
 #endif

Modified: trunk/Scribus/scribus/ui/tabruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19479&path=/trunk/Scribus/scribus/ui/tabruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabruler.cpp (original)
+++ trunk/Scribus/scribus/ui/tabruler.cpp Fri Sep  5 19:28:02 2014
@@ -79,7 +79,7 @@
 	p.begin(this);
 	p.drawLine(0, 24, width(), 24);
 	p.translate(-offset, 0);
-	p.setBrush(Qt::black);
+
 	p.setFont(font());
 	p.setPen(QPen(Qt::black, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin));
 	for (xl = 0; xl < width()+offset; xl += iter)




More information about the scribus-commit mailing list