Kaydet (Commit) ad1a3419 authored tarafından Ethan Furman's avatar Ethan Furman

Close issue6549: minor ttk.Style fixes

üst 95e09602
......@@ -381,7 +381,9 @@ class Style(object):
a sequence identifying the value for that option."""
if query_opt is not None:
kw[query_opt] = None
return _val_or_dict(self.tk, kw, self._name, "configure", style)
result = _val_or_dict(self.tk, kw, self._name, "configure", style)
if result or query_opt:
return result
def map(self, style, query_opt=None, **kw):
......@@ -466,12 +468,14 @@ class Style(object):
def element_names(self):
"""Returns the list of elements defined in the current theme."""
return self.tk.splitlist(self.tk.call(self._name, "element", "names"))
return tuple(n.lstrip('-') for n in self.tk.splitlist(
self.tk.call(self._name, "element", "names")))
def element_options(self, elementname):
"""Return the list of elementname's options."""
return self.tk.splitlist(self.tk.call(self._name, "element", "options", elementname))
return tuple(o.lstrip('-') for o in self.tk.splitlist(
self.tk.call(self._name, "element", "options", elementname)))
def theme_create(self, themename, parent=None, settings=None):
......
......@@ -61,6 +61,9 @@ Library
- Issue #15014: SMTP.auth() and SMTP.login() now support RFC 4954's optional
initial-response argument to the SMTP AUTH command.
- Issue #6549: Remove hyphen from ttk.Style().element options. Only return result
from ttk.Style().configure if a result was generated or a query submitted.
What's New in Python 3.5.0 beta 3?
==================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment