diff options
author | Armin Berres <armin.berres@basyskom.de> | 2010-12-07 16:49:09 +0100 |
---|---|---|
committer | Armin Berres <armin.berres@basyskom.de> | 2010-12-09 17:31:06 +0100 |
commit | 8d1739f0eb365b3bd5ef7ef898a9128c96e6810d (patch) | |
tree | fa1b10bb99bb602e3f487953e3b5138e52f22fe9 /src/corelib/style/mwindowstyle.h | |
parent | 51d394d2f25a83db648dc1d1c3abe1cea7442958 (diff) |
Changes: allow nothing, pixmap or color as default background filling at app startup
RevBy: Peter Penz, Stanislav Ionascu
Details:
So far when running with the meego graphicssystem we fill all windows
with a pixmap specified via the theming system. If no pixmap is found
the window will be initialized with black.
With this patch we do not fill with black but with the actual color set
via the style.
If an application does not want the background filling it can disable it
with a CSS snippet like this:
/----
MWindowStyle {
x11-startup-pixmap: ;
startup-fill-color: ;
}
MWindowStyle.Landscape {
x11-startup-pixmap: ;
startup-fill-color: ;
}
\----
This is interesting e.g. for all applications starting during boot to keep
the framebuffer intact.
Diffstat (limited to 'src/corelib/style/mwindowstyle.h')
-rw-r--r-- | src/corelib/style/mwindowstyle.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/corelib/style/mwindowstyle.h b/src/corelib/style/mwindowstyle.h index 55d1d693..0f69fb03 100644 --- a/src/corelib/style/mwindowstyle.h +++ b/src/corelib/style/mwindowstyle.h @@ -23,6 +23,8 @@ #include <mstyle.h> #include <QColor> +class QPixmap; + //! \internal /** \brief Defines a style for a MWindow class. @@ -33,14 +35,19 @@ class MWindowStyle : public MStyle M_STYLE_INTERNAL(MWindowStyle) /*! - \brief Sets the default background color when opening a window. - */ - M_STYLE_ATTRIBUTE(QColor, backgroundColor, BackgroundColor) + Sets the default background color when opening a window. If + x11StartupPixmap is defined the color will be ignored. + */ + M_STYLE_ATTRIBUTE(QColor, startupFillColor, StartupFillColor) /*! - \brief Sets the default background image when opening a window. + The pixmap used to initially fill the window before it is shown. + The pixmap needs to be an X11 pixmap, to ensure this make sure it has + forcex11 in its filename. */ - M_STYLE_ATTRIBUTE(QString, backgroundImage, BackgroundImage) + M_STYLE_PTR_ATTRIBUTE(QPixmap *, x11StartupPixmap, X11StartupPixmap) + + }; class MWindowStyleContainer : public MStyleContainer |