additional background default alignment to 'right top' (from 'left top') (#9239)
This commit is contained in:
Родитель
536e240fbf
Коммит
39d7579053
|
@ -68,11 +68,12 @@ def test_additional_background_split_alignment(alignment, alignments_tuple):
|
|||
('top', 'repeat-x', 120, 92, 280, 0),
|
||||
('center', 'repeat-y', 680, 450, 280, -179),
|
||||
('left top', 'repeat', 120, 450, 0, 0),
|
||||
# alignment=None is 'left top'
|
||||
(None, 'repeat', 120, 450, 0, 0),
|
||||
# alignment=None is 'right top'
|
||||
(None, 'repeat', 120, 450, 560, 0),
|
||||
# tiling=None is 'no-repeat'
|
||||
('center', None, 680, 92, 280, -179),
|
||||
(None, None, 680, 92, 0, 0),
|
||||
# so this is alignment='right top'; tiling='no-repeat'
|
||||
(None, None, 680, 92, 560, 0),
|
||||
)
|
||||
)
|
||||
def test_additional_background(encode_header_image, alignment, tiling,
|
||||
|
|
|
@ -77,7 +77,7 @@ class AdditionalBackground(object):
|
|||
def __init__(self, path, alignment, tiling, header_root):
|
||||
# If there an unequal number of alignments or tiling to srcs the value
|
||||
# will be None so use defaults.
|
||||
self.alignment = (alignment or 'left top').lower()
|
||||
self.alignment = (alignment or 'right top').lower()
|
||||
self.tiling = (tiling or 'no-repeat').lower()
|
||||
self.src, self.width, self.height = encode_header_image(
|
||||
os.path.join(header_root, path))
|
||||
|
|
Загрузка…
Ссылка в новой задаче