[gen] Buttons can now be stretched to fit the size of the inner label.
This commit is contained in:
parent
2b1fc85512
commit
822e1a7c63
32 changed files with 91 additions and 61 deletions
|
@ -1352,4 +1352,15 @@ class ToolMixin(BaseMixin):
|
|||
"s.parentNode.insertBefore(ga, s);\n" \
|
||||
"})();\n" % gaId
|
||||
return code
|
||||
|
||||
def getButtonWidth(self, label):
|
||||
'''Determine button width, in pixels, corresponding to the button
|
||||
p_label.'''
|
||||
l = len(label)
|
||||
if l < 10:
|
||||
width = '130px'
|
||||
else:
|
||||
# Consider 1 char = 6 pixels wide.
|
||||
width = '%dpx' % (130 + ((l-10)*4))
|
||||
return 'width:%s' % width
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -855,7 +855,7 @@ class BaseMixin:
|
|||
can't trigger, but for which he needs to know for what reason he
|
||||
can't trigger it;
|
||||
* if p_includeNotShowable is True, it includes transitions for which
|
||||
show=False. Indeed, because "showability" is only a GUI concern,
|
||||
show=False. Indeed, because "showability" is only a UI concern,
|
||||
and not a security concern, in some cases it has sense to set
|
||||
includeNotShowable=True, because those transitions are triggerable
|
||||
from a security point of view.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue