mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsWindow: add method to set background image in window classes
- setBodyBGImage() exists as member of base class CCDraw and had no visual effect in this class, because visibility of window container is disabled. This additional member overloads the original methode and is using functionality from window body object. Example for buildinfo added. TODO: - background behavior of embedded objects must be global adapted if a background image is used
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
||||||
|
|
||||||
Copyright (C) 2013, M. Liebmann 'micha-bbg'
|
Copyright (C) 2013, M. Liebmann 'micha-bbg'
|
||||||
Copyright (C) 2013-2014, Thilo Graf 'dbt'
|
Copyright (C) 2013-2017, Thilo Graf 'dbt'
|
||||||
|
|
||||||
License: GPL
|
License: GPL
|
||||||
|
|
||||||
@@ -40,6 +40,7 @@ using namespace std;
|
|||||||
CBuildInfo::CBuildInfo(bool show) : CComponentsWindow(0, 0, CCW_PERCENT 85, CCW_PERCENT 85, LOCALE_BUILDINFO_MENU, NEUTRINO_ICON_INFO)
|
CBuildInfo::CBuildInfo(bool show) : CComponentsWindow(0, 0, CCW_PERCENT 85, CCW_PERCENT 85, LOCALE_BUILDINFO_MENU, NEUTRINO_ICON_INFO)
|
||||||
{
|
{
|
||||||
initVarBuildInfo();
|
initVarBuildInfo();
|
||||||
|
setBodyBGImage(DATADIR "/neutrino/icons/start.jpg");
|
||||||
if (show)
|
if (show)
|
||||||
exec(NULL, "");
|
exec(NULL, "");
|
||||||
else
|
else
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
||||||
|
|
||||||
Classes for generic GUI-related components.
|
Classes for generic GUI-related components.
|
||||||
Copyright (C) 2012-2016 Thilo Graf 'dbt'
|
Copyright (C) 2012-2017 Thilo Graf 'dbt'
|
||||||
Copyright (C) 2012, Michael Liebmann 'micha-bbg'
|
Copyright (C) 2012, Michael Liebmann 'micha-bbg'
|
||||||
|
|
||||||
License: GPL
|
License: GPL
|
||||||
@@ -444,3 +444,8 @@ void CComponentsWindow::paint(bool do_save_bg)
|
|||||||
//paint form contents
|
//paint form contents
|
||||||
paintForm(do_save_bg);
|
paintForm(do_save_bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CComponentsWindow::setBodyBGImage(const std::string& image_path)
|
||||||
|
{
|
||||||
|
return getBodyObject()->setBodyBGImage(image_path);
|
||||||
|
}
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
||||||
|
|
||||||
Classes for generic GUI-related components.
|
Classes for generic GUI-related components.
|
||||||
Copyright (C) 2012-2016, Thilo Graf 'dbt'
|
Copyright (C) 2012-2017, Thilo Graf 'dbt'
|
||||||
|
|
||||||
License: GPL
|
License: GPL
|
||||||
|
|
||||||
@@ -435,6 +435,12 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes
|
|||||||
* @note use addExitKey() if new exec key is required
|
* @note use addExitKey() if new exec key is required
|
||||||
*/
|
*/
|
||||||
virtual void removeExitKeys(){getBodyObject()->removeExitKeys();}
|
virtual void removeExitKeys(){getBodyObject()->removeExitKeys();}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets an image for window background.
|
||||||
|
* @note The assigned image is assigned into body object! Main container, header and footer will be not touched.
|
||||||
|
*/
|
||||||
|
bool setBodyBGImage(const std::string& image_path);
|
||||||
};
|
};
|
||||||
|
|
||||||
class CComponentsWindowMax : public CComponentsWindow
|
class CComponentsWindowMax : public CComponentsWindow
|
||||||
|
Reference in New Issue
Block a user