[bt-devel] The splash screen

Martin Gruner mg.pub at gmx.net
Sun Dec 28 10:50:49 MST 2008


Hi Eeli,

good idea - we only need a simple splash screen.
Please replace.

mg

Am Samstag 27 Dezember 2008 10:39:27 schrieb Eeli Kaikkonen:
> I didn't get the splash screen working, it's broken with many Qt styles.
> I played with QSplashScreen and got nice results. Maybe we could replace
> our kstartuplogo with QSplashScreen? You can test it by disabling the
> creation of kstartuplogo from main.cpp and changing the bibletime.cpp
> constructor:
>
> #include <QSplashScreen>
> BibleTime::BibleTime() :
>     .....
> {
>     QPixmap pm;
>     if ( !pm.load(
> util::filesystem::DirectoryUtil::getPicsDir().canonicalPath().append("/star
>tuplogo.png")) ) {
>         qWarning("Can't load startuplogo! Check your installation.");
>     }
>     QSplashScreen splash(pm);
>     QString splashHtml("<div
> style='background-color:black;color:white;font-weight:bold'>%1</div>");
>     if (CBTConfig::get(CBTConfig::logo)) {
>         splash.show();
>     }
>     splash.showMessage(splashHtml.arg(tr("Initializing the Sword
> engine...")), Qt::AlignCenter);
>     initBackends();
>     splash.showMessage(splashHtml.arg(tr("Creating BibleTime's user
> interface...")), Qt::AlignCenter);
>     initView();
>     splash.showMessage(splashHtml.arg(tr("Initializing menu- and
> toolbars...")), Qt::AlignCenter);
>     initActions();
>     initConnections();
>     readSettings();
>     setPlainCaption(QString());
> }
>
>
> The current implementation is nice but it's quite much needless,
> regarding the nature of a splash screen in general. We would save couple
> of files and some code lines by using the Qt equivalent. This would also
> have the advantage of playing nicely with different text sizes and
> lengths. The current one has only one text line, hiding the text which
> doesn't fit, and when the display resolutions go higher the
> pixmap/splash window width will get smaller compared to text width.
>
> Using the Qt class would also be safe with all platforms. We don't know
> how the current one behaves e.g. on Windows.
>
>
> --Eeli Kaikkonen
>
> _______________________________________________
> bt-devel mailing list
> bt-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/bt-devel




More information about the bt-devel mailing list