diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-24 13:59:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-24 13:59:56 (GMT) |
commit | b4f6160e2b8ad824f6bed8367ab2734603fc1cd8 (patch) | |
tree | 6568b2087b36ca40786f6659b139b2087bade52d | |
parent | a9691e944874422823863ac020e3d905e554f2d3 (diff) | |
download | tk-b4f6160e2b8ad824f6bed8367ab2734603fc1cd8.zip tk-b4f6160e2b8ad824f6bed8367ab2734603fc1cd8.tar.gz tk-b4f6160e2b8ad824f6bed8367ab2734603fc1cd8.tar.bz2 |
Allow {} as magical value for the -padx/-pady default, in stead of the magical value -1, for message widget.
-rw-r--r-- | generic/tkMessage.c | 4 | ||||
-rw-r--r-- | tests/message.test | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkMessage.c b/generic/tkMessage.c index ee89b77..e0761a1 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -144,10 +144,10 @@ static const Tk_OptionSpec optionSpecs[] = { DEF_MESSAGE_JUSTIFY, TCL_INDEX_NONE, offsetof(Message, justify), TK_OPTION_ENUM_VAR, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", DEF_MESSAGE_PADX, offsetof(Message, padXPtr), - offsetof(Message, padX), 0, 0, 0}, + offsetof(Message, padX), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-pady", "padY", "Pad", DEF_MESSAGE_PADY, offsetof(Message, padYPtr), - offsetof(Message, padY), 0, 0, 0}, + offsetof(Message, padY), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", DEF_MESSAGE_RELIEF, TCL_INDEX_NONE, offsetof(Message, relief), 0, 0, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", diff --git a/tests/message.test b/tests/message.test index 4e9ad59..37e81b0 100644 --- a/tests/message.test +++ b/tests/message.test @@ -310,7 +310,7 @@ test message-1.30 {configuration option: "padx"} -setup { .m configure -padx 420x } -cleanup { destroy .m -} -returnCodes {error} -result {expected screen distance but got "420x"} +} -returnCodes {error} -result {expected screen distance or "" but got "420x"} test message-1.31 {configuration option: "pady"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} @@ -330,7 +330,7 @@ test message-1.32 {configuration option: "pady"} -setup { .m configure -pady 420x } -cleanup { destroy .m -} -returnCodes {error} -result {expected screen distance but got "420x"} +} -returnCodes {error} -result {expected screen distance or "" but got "420x"} test message-1.33 {configuration option: "relief"} -setup { message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold} |