diff --git a/src/widgets/dapplication.cpp b/src/widgets/dapplication.cpp index 53f8da198..b28ac3539 100644 --- a/src/widgets/dapplication.cpp +++ b/src/widgets/dapplication.cpp @@ -391,6 +391,16 @@ bool DApplication::isDXcbPlatform() return qApp && (qApp->platformName() == DXCB_PLUGIN_KEY || qApp->property(DXCB_PLUGIN_SYMBOLIC_PROPERTY).toBool()); } +int DApplication::buildDtkVersion() +{ + return DtkBuildVersion::value; +} + +int DApplication::runtimeDtkVersion() +{ + return DTK_VERSION; +} + /** * @brief DApplication::productName returns the product name of this application. * @@ -704,4 +714,6 @@ bool DApplication::notify(QObject *obj, QEvent *event) return QApplication::notify(obj, event); } +int DtkBuildVersion::value = 0; + DWIDGET_END_NAMESPACE diff --git a/src/widgets/dapplication.h b/src/widgets/dapplication.h index 6e0acb6a1..09e8c7bac 100644 --- a/src/widgets/dapplication.h +++ b/src/widgets/dapplication.h @@ -66,6 +66,11 @@ class LIBDTKWIDGETSHARED_EXPORT DApplication : public QApplication, public DTK_C static bool loadDXcbPlugin(); static bool isDXcbPlatform(); + // return the libdtkwidget version of build application + static int buildDtkVersion(); + // return the libdtkwidget version of runing application + static int runtimeDtkVersion(); + // meta information that necessary to create a about dialog for the application. QString productName() const; void setProductName(const QString &productName); @@ -132,6 +137,22 @@ class LIBDTKWIDGETSHARED_EXPORT DApplication : public QApplication, public DTK_C friend class DMainWindowPrivate; }; +class DtkBuildVersion { +public: + static int value; +}; + +#ifndef LIBDTKWIDGET_LIBRARY +class Q_DECL_HIDDEN _DtkBuildVersion { +public: + _DtkBuildVersion() { + DtkBuildVersion::value = DTK_VERSION; + } +}; + +static _DtkBuildVersion _dtk_build_version; +#endif + DWIDGET_END_NAMESPACE #endif // DAPPLICATION_H diff --git a/src/widgets/dtitlebar.cpp b/src/widgets/dtitlebar.cpp index 46202dc66..c8ef5e608 100644 --- a/src/widgets/dtitlebar.cpp +++ b/src/widgets/dtitlebar.cpp @@ -474,6 +474,10 @@ DTitlebar::DTitlebar(QWidget *parent) : QFrame(parent), DObject(*new DTitlebarPrivate(this)) { + if (DApplication::buildDtkVersion() < DTK_VERSION_CHECK(2, 0, 6, 1)) { + setBackgroundTransparent(true); + } + DThemeManager::registerWidget(this, {"transparent"}); D_D(DTitlebar);