added height theme item

This commit is contained in:
fluxgen 2003-08-27 20:13:32 +00:00
parent 99c95b1435
commit 20012d911a
2 changed files with 10 additions and 4 deletions

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: ToolbarTheme.cc,v 1.10 2003/08/16 13:36:52 fluxgen Exp $
// $Id: ToolbarTheme.cc,v 1.11 2003/08/27 20:13:32 fluxgen Exp $
#include "ToolbarTheme.hh"
@ -50,6 +50,7 @@ ToolbarTheme::ToolbarTheme(int screen_num):
m_bevel_width(*this, "toolbar.bevelWidth", "Toolbar.BevelWidth"),
m_shape(*this, "toolbar.shaped", "Toolbar.Shaped"),
m_alpha(*this, "toolbar.alpha", "Toolbar.Alpha"),
m_height(*this, "toolbar.height", "Toolbar.Height"),
m_display(FbTk::App::instance()->display()) {
// set default value
*m_bevel_width = 0;
@ -70,4 +71,9 @@ void ToolbarTheme::reconfigTheme() {
if (*m_bevel_width > 20)
*m_bevel_width = 20;
if (*m_height > 100)
*m_height = 100;
else if (*m_height < 0)
*m_height = 0;
}

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: ToolbarTheme.hh,v 1.8 2003/08/13 15:12:39 fluxgen Exp $
// $Id: ToolbarTheme.hh,v 1.9 2003/08/27 20:13:32 fluxgen Exp $
#ifndef TOOLBARTHEME_HH
#define TOOLBARTHEME_HH
@ -45,14 +45,14 @@ public:
inline int bevelWidth() const { return *m_bevel_width; }
inline bool shape() const { return *m_shape; }
inline unsigned char alpha() const { return *m_alpha; }
inline int height() const { return *m_height; }
private:
FbTk::ThemeItem<FbTk::Texture> m_toolbar;
BorderTheme m_border;
FbTk::ThemeItem<int> m_bevel_width;
FbTk::ThemeItem<bool> m_shape;
FbTk::ThemeItem<int> m_alpha;
FbTk::ThemeItem<int> m_alpha, m_height;
Display *m_display;