diff options
author | jenglish@flightlab.com <jenglish> | 2007-10-25 07:08:25 (GMT) |
---|---|---|
committer | jenglish@flightlab.com <jenglish> | 2007-10-25 07:08:25 (GMT) |
commit | 8432b1c2f54de4ea2d194fa410113a0efad36359 (patch) | |
tree | cc3ec59b3743ffde75e375f9a9f2c21fcfbf95a2 /generic/ttk/ttkScale.c | |
parent | 82d2040671447e9314544a6d93f93a98ae969f8e (diff) | |
download | tk-8432b1c2f54de4ea2d194fa410113a0efad36359.zip tk-8432b1c2f54de4ea2d194fa410113a0efad36359.tar.gz tk-8432b1c2f54de4ea2d194fa410113a0efad36359.tar.bz2 |
Move widget layout registration from TtkElements_Init()
to widget *_Init() routines.
Renaming/consistency: s/...ElementGeometry()/...ElementSize()/
Diffstat (limited to 'generic/ttk/ttkScale.c')
-rw-r--r-- | generic/ttk/ttkScale.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/generic/ttk/ttkScale.c b/generic/ttk/ttkScale.c index 1f32d13..063116d 100644 --- a/generic/ttk/ttkScale.c +++ b/generic/ttk/ttkScale.c @@ -1,4 +1,4 @@ -/* $Id: ttkScale.c,v 1.5 2007/01/11 14:49:47 jenglish Exp $ +/* $Id: ttkScale.c,v 1.6 2007/10/25 07:08:26 jenglish Exp $ * Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> * * ttk::scale widget. @@ -501,12 +501,27 @@ static WidgetSpec ScaleWidgetSpec = TtkWidgetDisplay /* displayProc */ }; +TTK_BEGIN_LAYOUT(VerticalScaleLayout) + TTK_GROUP("Vertical.Scale.trough", TTK_FILL_BOTH, + TTK_NODE("Vertical.Scale.slider", TTK_PACK_TOP) ) +TTK_END_LAYOUT + +TTK_BEGIN_LAYOUT(HorizontalScaleLayout) + TTK_GROUP("Horizontal.Scale.trough", TTK_FILL_BOTH, + TTK_NODE("Horizontal.Scale.slider", TTK_PACK_LEFT) ) +TTK_END_LAYOUT + /* * Initialization. */ MODULE_SCOPE void TtkScale_Init(Tcl_Interp *interp) { + Ttk_Theme theme = Ttk_GetDefaultTheme(interp); + + Ttk_RegisterLayout(theme, "Vertical.TScale", VerticalScaleLayout); + Ttk_RegisterLayout(theme, "Horizontal.TScale", HorizontalScaleLayout); + RegisterWidget(interp, "ttk::scale", &ScaleWidgetSpec); } |