summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-04-02 22:26:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-04-02 22:26:55 (GMT)
commit82069dbafc9025a2bae35eb162a645c5811bb0af (patch)
tree628758a2fb852b1827931038cbf65da189a9aba5
parent818721f59ac0739b02c113eec623a48669b85a1b (diff)
downloadtk-82069dbafc9025a2bae35eb162a645c5811bb0af.zip
tk-82069dbafc9025a2bae35eb162a645c5811bb0af.tar.gz
tk-82069dbafc9025a2bae35eb162a645c5811bb0af.tar.bz2
Complete fix for [85cea56c27]: The -underline option does not show an underline on ttk::label
1000 x thanks to François, for pinpointing the exact problem!
-rw-r--r--generic/ttk/ttkButton.c4
-rw-r--r--generic/ttk/ttkFrame.c4
-rw-r--r--generic/ttk/ttkNotebook.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/generic/ttk/ttkButton.c b/generic/ttk/ttkButton.c
index c9539d4..6854132 100644
--- a/generic/ttk/ttkButton.c
+++ b/generic/ttk/ttkButton.c
@@ -24,7 +24,7 @@ typedef struct
Tcl_Obj *textObj;
Tcl_Obj *justifyObj;
Tcl_Obj *textVariableObj;
- int underline;
+ Tcl_Obj *underlineObj;
Tcl_Obj *widthObj;
Ttk_TraceHandle *textVariableTrace;
@@ -66,7 +66,7 @@ static const Tk_OptionSpec BaseOptionSpecs[] =
offsetof(Base,base.textVariableObj), TCL_INDEX_NONE,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
{TK_OPTION_INDEX, "-underline", "underline", "Underline",
- TTK_OPTION_UNDERLINE_DEF(Base, base.underline), 0},
+ TTK_OPTION_UNDERLINE_DEF(Base, base.underlineObj), 0},
{TK_OPTION_STRING, "-width", "width", "Width",
NULL, offsetof(Base,base.widthObj), TCL_INDEX_NONE,
TK_OPTION_NULL_OK,0,GEOMETRY_CHANGED },
diff --git a/generic/ttk/ttkFrame.c b/generic/ttk/ttkFrame.c
index 942454a..48a0baf 100644
--- a/generic/ttk/ttkFrame.c
+++ b/generic/ttk/ttkFrame.c
@@ -235,7 +235,7 @@ static Ttk_Side LabelAnchorSide(Ttk_PositionSpec flags)
typedef struct {
Tcl_Obj *labelAnchorObj;
Tcl_Obj *textObj;
- int underline;
+ Tcl_Obj *underlineObj;
Tk_Window labelWidget;
Ttk_Manager *mgr;
@@ -259,7 +259,7 @@ static const Tk_OptionSpec LabelframeOptionSpecs[] = {
offsetof(Labelframe,label.textObj), TCL_INDEX_NONE,
0,0,GEOMETRY_CHANGED },
{TK_OPTION_INDEX, "-underline", "underline", "Underline",
- TTK_OPTION_UNDERLINE_DEF(Labelframe, label.underline), 0},
+ TTK_OPTION_UNDERLINE_DEF(Labelframe, label.underlineObj), 0},
{TK_OPTION_WINDOW, "-labelwidget", "labelWidget", "LabelWidget", NULL,
TCL_INDEX_NONE, offsetof(Labelframe,label.labelWidget),
TK_OPTION_NULL_OK,0,LABELWIDGET_CHANGED|GEOMETRY_CHANGED },
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 35088f8..2a2eead 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -44,7 +44,7 @@ typedef struct
Tcl_Obj *textObj;
Tcl_Obj *imageObj;
Tcl_Obj *compoundObj;
- int underline;
+ Tcl_Obj *underlineObj;
} Tab;
@@ -68,7 +68,7 @@ static const Tk_OptionSpec TabOptionSpecs[] =
NULL, offsetof(Tab,compoundObj), TCL_INDEX_NONE,
TK_OPTION_NULL_OK,ttkCompoundStrings,GEOMETRY_CHANGED },
{TK_OPTION_INDEX, "-underline", "underline", "Underline",
- TTK_OPTION_UNDERLINE_DEF(Tab, underline), GEOMETRY_CHANGED},
+ TTK_OPTION_UNDERLINE_DEF(Tab, underlineObj), GEOMETRY_CHANGED},
{TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0 }
};