Skip to content

Commit 4c32459

Browse files
committed
fix color example
1 parent 7fcf4c9 commit 4c32459

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

doc/sources/guide/widgets.rst

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,9 @@ proportions allowed to each child, or set fixed size for some of them.
142142
.. only:: html
143143

144144
.. image:: ../images/boxlayout.gif
145-
:align: left
146145
.. image:: ../images/gridlayout.gif
147-
:align: right
148146
.. image:: ../images/stacklayout.gif
149-
:align: left
150147
.. image:: ../images/anchorlayout.gif
151-
:align: right
152148
.. image:: ../images/floatlayout.gif
153149

154150
.. only:: latex
@@ -323,10 +319,9 @@ instance easily, as with adding a colored background:
323319
In Python::
324320

325321
with layout_instance.canvas.before:
326-
Color(rgba(0, 1, 0, 1)) # green; colors range from 0-1 instead of 0-255
327-
self.rect = Rectangle(
328-
size=layout_instance.size,
329-
pos=layout_instance.pos)
322+
Color(0, 1, 0, 1) # green; colors range from 0-1 instead of 0-255
323+
self.rect = Rectangle(size=layout_instance.size,
324+
pos=layout_instance.pos)
330325

331326
Unfortunately, this will only draw a rectangle at the layout's initial position
332327
and size. To make sure the rect is drawn inside the layout, when layout size/pos

0 commit comments

Comments
 (0)