diff --git a/doc/sources/gettingstarted/examples.rst b/doc/sources/gettingstarted/examples.rst index f8099f406..c79eb7be8 100644 --- a/doc/sources/gettingstarted/examples.rst +++ b/doc/sources/gettingstarted/examples.rst @@ -108,7 +108,7 @@ Examples .. |wdg_file2| replace:: asyncimage.py .. |wdg_desc2| replace:: Usage and Showcase of :class:`AsyncImage ` Widget. .. |wdg_file25| replace:: boxlayout_pos_hint.py -.. |wdg_desc25| replace:: Usage and Showcase of :class:`BoxLayout ` +.. |wdg_desc25| replace:: Showcase of pos_hint under BoxLayout :class:`BoxLayout ` .. |wdg_file3| replace:: bubble_test.py .. |wdg_desc3| replace:: Usage and Showcase of :class:`Bubble ` Widget. .. |wdg_file4| replace:: customcollide.py @@ -120,7 +120,11 @@ Examples .. |wdg_file7| replace:: keyboardlistener.py .. |wdg_desc7| replace:: listen to the keyboard input and spew result to console. .. |wdg_file8| replace:: label_mipmap.py -.. |wdg_desc8| replace:: How to use :class:`Label ` widget with mipmap. +.. |wdg_desc8| replace:: How to use :class:`Label ` widget with +.. |wdg_file81| replace:: label_with_markup.py +.. |wdg_desc81| replace:: Useage of :class:`Label ` widget with markup. +.. |wdg_file82| replace:: popup_with_kv.py +.. |wdg_desc82| replace:: Useage of :class:`Popup ` widget with ``kv`` language .. |wdg_file9| replace:: rstexample.py .. |wdg_desc9| replace:: Usage and Showcase of :class:`RstDocument ` Widget. .. |wdg_file10| replace:: scatter.py @@ -207,6 +211,8 @@ Examples | | - |wdg_file6| |- |wdg_desc6| | | | - |wdg_file7| |- |wdg_desc7| | | | - |wdg_file8| |- |wdg_desc8| | +| | - |wdg_file81||- |wdg_desc81| | +| | - |wdg_file82||- |wdg_desc82| | | | - |wdg_file9| |- |wdg_desc9| | | | - |wdg_file10||- |wdg_desc10| | | | - |wdg_file11||- |wdg_desc11| | diff --git a/doc/sources/images/anchorlayout.gif b/doc/sources/images/anchorlayout.gif index d312ab755..2932d979c 100644 Binary files a/doc/sources/images/anchorlayout.gif and b/doc/sources/images/anchorlayout.gif differ diff --git a/doc/sources/images/anchorlayout.png b/doc/sources/images/anchorlayout.png index 1dff5221b..dc5f34bcd 100644 Binary files a/doc/sources/images/anchorlayout.png and b/doc/sources/images/anchorlayout.png differ diff --git a/doc/sources/images/boxlayout.gif b/doc/sources/images/boxlayout.gif index b890621b6..d98a2a223 100644 Binary files a/doc/sources/images/boxlayout.gif and b/doc/sources/images/boxlayout.gif differ diff --git a/doc/sources/images/boxlayout.png b/doc/sources/images/boxlayout.png index 475ca990f..c1117fd42 100644 Binary files a/doc/sources/images/boxlayout.png and b/doc/sources/images/boxlayout.png differ diff --git a/doc/sources/images/floatlayout.gif b/doc/sources/images/floatlayout.gif index 227fe823b..311c52d88 100644 Binary files a/doc/sources/images/floatlayout.gif and b/doc/sources/images/floatlayout.gif differ diff --git a/doc/sources/images/gridlayout.gif b/doc/sources/images/gridlayout.gif index 934ec0fcc..dcb793ce6 100644 Binary files a/doc/sources/images/gridlayout.gif and b/doc/sources/images/gridlayout.gif differ diff --git a/doc/sources/images/gridlayout.png b/doc/sources/images/gridlayout.png index e84c4fc7b..e998d98c1 100644 Binary files a/doc/sources/images/gridlayout.png and b/doc/sources/images/gridlayout.png differ diff --git a/doc/sources/images/gridlayout_1.jpg b/doc/sources/images/gridlayout_1.jpg index 9a5c6287e..fb2602d01 100644 Binary files a/doc/sources/images/gridlayout_1.jpg and b/doc/sources/images/gridlayout_1.jpg differ diff --git a/doc/sources/images/gridlayout_2.jpg b/doc/sources/images/gridlayout_2.jpg index ae3acaac9..228f42fd8 100644 Binary files a/doc/sources/images/gridlayout_2.jpg and b/doc/sources/images/gridlayout_2.jpg differ diff --git a/doc/sources/images/gridlayout_3.jpg b/doc/sources/images/gridlayout_3.jpg index cea1614cb..1c2dbff22 100644 Binary files a/doc/sources/images/gridlayout_3.jpg and b/doc/sources/images/gridlayout_3.jpg differ diff --git a/doc/sources/images/stacklayout.gif b/doc/sources/images/stacklayout.gif index 842724a04..6ec194b77 100644 Binary files a/doc/sources/images/stacklayout.gif and b/doc/sources/images/stacklayout.gif differ diff --git a/doc/sources/images/stacklayout.png b/doc/sources/images/stacklayout.png index 9451503c0..02061c0e4 100644 Binary files a/doc/sources/images/stacklayout.png and b/doc/sources/images/stacklayout.png differ diff --git a/examples/demo/showcase/main.py b/examples/demo/showcase/main.py index 7c1923beb..0b50230dc 100644 --- a/examples/demo/showcase/main.py +++ b/examples/demo/showcase/main.py @@ -16,6 +16,7 @@ from kivy.properties import StringProperty from kivy.clock import Clock import random + class Showcase(FloatLayout): pass @@ -60,6 +61,7 @@ class BoxLayoutShowcase(FloatLayout): super(BoxLayoutShowcase, self).__init__(**kwargs) self.buttons = 0 self.txt = 'horizontal' + self.text_size = self.size Clock.schedule_once(self.add_button, 1) def add_button(self, *l): @@ -71,7 +73,10 @@ class BoxLayoutShowcase(FloatLayout): self.txt = self.blayout.orientation = 'horizontal' else: self.txt = self.blayout.orientation = 'vertical' - self.blayout.add_widget(Button(text = self.txt)) + + btn = Button(text=self.txt, halign='center', valign='middle') + btn.bind(size=btn.setter('text_size')) + self.blayout.add_widget(btn) Clock.schedule_once(self.add_button, 1) @@ -87,9 +92,9 @@ class FloatLayoutShowcase(FloatLayout): if self.buttons > 5: self.buttons = 0 self.flayout.clear_widgets() - self.flayout.add_widget(Button(text = 'no restrictions\n what so ever', - size_hint = (None, None), size = (150, 40), - pos_hint = {'x':random.random(), 'y': random.random()})) + self.flayout.add_widget(Button(text='no restrictions\n what so ever', + size_hint=(None, None), size=(150, 40), + pos_hint={'x': random.random(), 'y': random.random()})) Clock.schedule_once(self.add_button, 1) @@ -106,7 +111,7 @@ class GridLayoutShowcase(FloatLayout): def add_button(self, *l): self.buttons += 1 - if self.buttons > 20: + if self.buttons > 10: self.buttons = 0 self.glayout.clear_widgets() if self.txt == "rows = 3": @@ -117,7 +122,7 @@ class GridLayoutShowcase(FloatLayout): self.glayout.rows = 3 self.glayout.cols = 7 self.txt = "rows = 3" - self.glayout.add_widget(Button(text = self.txt)) + self.glayout.add_widget(Button(text=self.txt)) Clock.schedule_once(self.add_button, 1) @@ -157,9 +162,11 @@ class StandardWidgets(FloatLayout): class ComplexWidgets(FloatLayout): pass + class TreeViewWidgets(FloatLayout): pass + class ShowcaseApp(App): def on_select_node(self, instance, value):