Skip to content

Commit

Permalink
Add RibbonBar.autoHideRibbon method (#92)
Browse files Browse the repository at this point in the history
* Close auto hide mode when clicked the collapse button

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update ribbonbar.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
haiiliin and pre-commit-ci[bot] authored Aug 7, 2024
1 parent ee84b1d commit 8a889da
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyqtribbon/ribbonbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ def __init__(self, *args, **kwargs):
self._titleWidget.tabBar().currentChanged.connect(self.showCategoryByIndex) # type: ignore
self.setRibbonStyle(RibbonStyle.Default)

def autoHideRibbon(self) -> bool:
"""Return whether the ribbon bar is automatically hidden when the mouse is pressed outside the ribbon bar.
:return: Whether the ribbon bar is automatically hidden.
"""
return self._autoHideRibbon

def setAutoHideRibbon(self, autoHide: bool):
"""Set whether the ribbon bar is automatically hidden when the mouse is pressed outside the ribbon bar.
Expand Down

0 comments on commit 8a889da

Please sign in to comment.