|
| 1 | +<h1 align="center">Flet ReStyle Documentation v1.0.0.</h1> |
| 2 | +<h3 align="center"><code>FletReStyleConfig</code></h3> |
1 | 3 |
|
| 4 | +```python |
| 5 | +class FletReStyleConfig: |
| 6 | + """ReStyle Config.""" |
| 7 | + theme: Theme = Theme(colors.PURPLE_ACCENT_700, visual_density=ThemeVisualDensity.ADAPTIVEPLATFORMDENSITY, font_family='RobotoMono[wght]') |
| 8 | + |
| 9 | + font: tuple[str, str] = google_font('robotomono', 'RobotoMono[wght]') |
| 10 | + |
| 11 | + dark: bool = True |
| 12 | + |
| 13 | + background: str = colors.with_opacity(0.1, colors.WHITE) |
| 14 | + |
| 15 | + frameless: bool = True |
| 16 | + |
| 17 | + custom_title_bar: bool = True |
| 18 | + |
| 19 | + custom_title_bar_icon: str = icons.APPS |
| 20 | + |
| 21 | + custom_title_bar_title: str = 'Application' |
| 22 | + |
| 23 | + custom_title_bar_allowed_to_maximize: bool = True |
| 24 | + |
| 25 | + transparent_background: bool = True |
| 26 | +``` |
| 27 | +Used to create config and then apply to your page.<br> |
| 28 | +`frameless`, `custom_title_bar`, `custom_title_bar_icon`, `custom_title_bar_allowed_to_maximize`, `transparent_background` - Supported only in Desktop version.<br> |
| 29 | + |
| 30 | +<h3 align="center"><code>FletReStyle</code></h3> |
| 31 | + |
| 32 | +```python |
| 33 | +class FletReStyle: |
| 34 | + @staticmethod |
| 35 | + def apply_config(page: Page, config: FletReStyleConfig, _page_on_resize_event: Callable=None) -> None |
| 36 | +``` |
| 37 | +`apply_config` used to apply your config to page. `_page_on_resize_event` will be called on_resize. |
| 38 | + |
| 39 | +<h3 align="center"><code>google_font</code></h3> |
| 40 | + |
| 41 | +```python |
| 42 | +google_font(font_folder: str, font: str) -> tuple[str, str] # google_font('robotomono', 'RobotoMono[wght]') => https://github.com/google/fonts/raw/main/apache/robotomono/RobotoMono[wght].ttf |
| 43 | +``` |
| 44 | +Used to get google font easily. |
0 commit comments