This commit is contained in:
yumoqing 2021-01-30 11:14:03 +08:00
parent 0552c5b76f
commit 2d2eb97300
2 changed files with 34 additions and 0 deletions

31
docs/blocks/box.md Normal file
View File

@ -0,0 +1,31 @@
# Box
Box is a BoxLayout widget with a BGColorBehavior class, when add a Text, or widget contains Text, it will set the Text color as Box's fgcolor.
It use normal_bgcolor as the background color, and normal_fgcolor as the text color if the Box is not selected, when the Box is selected, it show selected_bgcolor background color, and reset the Text's color inside the Box with selected_fgcolor
## options
### color_level
default is 0, the main color seials, color level for this widget, please reference to block color for further information
### radius: default is [], means not Box corner without radius. if present, it must be a list of 4 float value, indicate radius for the four corners[ top=left, top-right, bottom-right, bottom-left]
### others options
each options accepte by BoxLayout is also accepted by Box
## Method
### selected
selected draws Box's background with selected_bgcolor, set all the Text widgets's color with selected_fgcolor
### unselected
this method draws Box's background with normal_bgcolor, set all Text widgets's color with normal_fgcolor
## event
no new events
## refence
Horizonal Box[HBox](./hbox.md)
Vertical Box[VBox](./vbox.md)
Text [Text](./text.md)

3
github-speed-up.md Normal file
View File

@ -0,0 +1,3 @@
github.com 加速
git config --global url."https://github.com.cnpmjs.org".insteadOf "https://github.com"