diff options
author | jenglish@flightlab.com <jenglish> | 2007-11-04 23:59:59 (GMT) |
---|---|---|
committer | jenglish@flightlab.com <jenglish> | 2007-11-04 23:59:59 (GMT) |
commit | 81238b59fe738dba22d95ad0ba29b49d2a6cd2e3 (patch) | |
tree | 9523baee5b18410a78198586173b77d780bb8122 /generic/ttk | |
parent | b815ac0f69eaac465195a2da4d088af2c0285f72 (diff) | |
download | tk-81238b59fe738dba22d95ad0ba29b49d2a6cd2e3.zip tk-81238b59fe738dba22d95ad0ba29b49d2a6cd2e3.tar.gz tk-81238b59fe738dba22d95ad0ba29b49d2a6cd2e3.tar.bz2 |
+ Use null "treearea" element for treeview owner-draw area
instead of "client", to avoid nameclash with Notebook.client element.
This was causing sizing anomalies in XP theme,
and introduced extraneous padding.
+ "alt" theme Treeitem.indicator element needs left margin now.
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkDefaultTheme.c | 4 | ||||
-rw-r--r-- | generic/ttk/ttkTreeview.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/generic/ttk/ttkDefaultTheme.c b/generic/ttk/ttkDefaultTheme.c index f73abd8..0e8c35d 100644 --- a/generic/ttk/ttkDefaultTheme.c +++ b/generic/ttk/ttkDefaultTheme.c @@ -1,4 +1,4 @@ -/* $Id: ttkDefaultTheme.c,v 1.8 2007/10/25 07:08:26 jenglish Exp $ +/* $Id: ttkDefaultTheme.c,v 1.9 2007/11/05 00:00:00 jenglish Exp $ * * Copyright (c) 2003, Joe English * @@ -1048,7 +1048,7 @@ static Ttk_ElementOptionSpec TreeitemIndicatorOptions[] = { "-diameter", TK_OPTION_PIXELS, Tk_Offset(TreeitemIndicator,diameterObj), "9" }, { "-indicatormargins", TK_OPTION_STRING, - Tk_Offset(TreeitemIndicator,marginObj), "0 2 4 2" }, + Tk_Offset(TreeitemIndicator,marginObj), "2 2 4 2" }, {NULL} }; diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c index 9d03683..73928c5 100644 --- a/generic/ttk/ttkTreeview.c +++ b/generic/ttk/ttkTreeview.c @@ -1,4 +1,4 @@ -/* $Id: ttkTreeview.c,v 1.19 2007/10/25 07:08:26 jenglish Exp $ +/* $Id: ttkTreeview.c,v 1.20 2007/11/05 00:00:00 jenglish Exp $ * Copyright (c) 2004, Joe English * * ttk::treeview widget implementation. @@ -1470,7 +1470,7 @@ static Ttk_Layout TreeviewGetLayout( static void TreeviewDoLayout(void *clientData) { Treeview *tv = clientData; - Ttk_LayoutNode *clientNode = Ttk_LayoutFindNode(tv->core.layout, "client"); + Ttk_LayoutNode *clientNode = Ttk_LayoutFindNode(tv->core.layout,"treearea"); int visibleRows; /* ASSERT: SLACKINVARIANT */ @@ -3044,7 +3044,7 @@ static WidgetSpec TreeviewWidgetSpec = TTK_BEGIN_LAYOUT(TreeviewLayout) TTK_GROUP("Treeview.field", TTK_FILL_BOTH|TTK_BORDER, TTK_GROUP("Treeview.padding", TTK_FILL_BOTH, - TTK_NODE("Treeview.client", TTK_FILL_BOTH))) + TTK_NODE("Treeview.treearea", TTK_FILL_BOTH))) TTK_END_LAYOUT TTK_BEGIN_LAYOUT(ItemLayout) @@ -3197,6 +3197,7 @@ void TtkTreeview_Init(Tcl_Interp *interp) &TreeitemIndicatorElementSpec, 0); Ttk_RegisterElement(interp, theme, "Treeitem.row", &RowElementSpec, 0); Ttk_RegisterElement(interp, theme, "Treeheading.cell", &RowElementSpec, 0); + Ttk_RegisterElement(interp, theme, "treearea", &ttkNullElementSpec, 0); Ttk_RegisterLayout(theme, TreeviewWidgetSpec.className, TreeviewLayout); Ttk_RegisterLayout(theme, "Item", ItemLayout); |