Skip to content

Commit

Permalink
Merge pull request #1977 from eirannejad/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jmcouffin authored Oct 23, 2023
2 parents 5e924c0 + cb209f4 commit db4bb76
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 11 deletions.
13 changes: 13 additions & 0 deletions docs/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
h1 {
font-weight: bolder;
font-size: 2rem;
}
h2 {
font-weight: bold;
font-size: 1.5rem;
}

h3 {
font-weight: bold;
font-size: 1rem;
}
16 changes: 12 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@ theme:
features:
- content.code.select
- content.code.copy
- toc.follow
- navigation.top
- navigation.path
- navigation.expand
- navigation.tabs
- navigation.tabs.sticky
- navigation.tracking
- navigation.instant
- navigation.instant.prefetch
- navigation.sections
palette:

# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/brightness-7
name: Switch to dark mode

# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
Expand All @@ -28,7 +36,7 @@ theme:
name: Switch to light mode

extra_css:
- style.css
- docs/styles.css

watch:
- pyrevitlib/pyrevit
Expand Down Expand Up @@ -70,8 +78,8 @@ markdown_extensions:
- pymdownx.superfences
- pymdownx.caret
- pymdownx.keys
- pymdownx.highlight
- admonition
- codehilite
- md_in_html
- toc

Expand Down
2 changes: 1 addition & 1 deletion pyrevitlib/pyrevit/forms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2808,7 +2808,7 @@ def select_family_parameters(family_doc,
def alert(msg, title=None, sub_msg=None, expanded=None, footer='',
ok=True, cancel=False, yes=False, no=False, retry=False,
warn_icon=True, options=None, exitscript=False):
"""Show a task dialog with given message.
r"""Show a task dialog with given message.
Args:
msg (str): message to be displayed
Expand Down
10 changes: 4 additions & 6 deletions pyrevitlib/pyrevit/revit/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,16 @@ def get_ribbon_roottype():


def get_current_theme():
"""
Get the current UI theme.
"""Get the current UI theme.
Returns:
UITheme: The current UI theme.
"""
return UIThemeManager.CurrentTheme


def set_current_theme(theme='Dark'):
"""
Sets the current UI theme to either 'Dark' or 'Light'.
"""Sets the current UI theme to either 'Dark' or 'Light'.
Args:
theme (str, optional): The theme to set. Defaults to 'Dark'.
Expand All @@ -150,8 +149,7 @@ def set_current_theme(theme='Dark'):


def resolve_icon_file(directory, icon_name):
"""
Resolves the icon file path based on the current UI theme.
"""Resolves the icon file path based on the current UI theme.
Args:
directory (str): The directory where the icon file is located.
Expand Down

0 comments on commit db4bb76

Please sign in to comment.