mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 20:54:15 +02:00
style and resizing fix
This commit is contained in:
10
README.md
10
README.md
@@ -1,7 +1,10 @@
|
|||||||
## bauh
|
## bauh
|
||||||
|
|
||||||
Non-official graphical user interface for Flatpak / Snap application management (old **fpakman**). It is a tray icon that let the user known when new updates are available and
|
Graphical user interface to manage your Linux applications (packages) (old **fpakman**). It currently only supports Flatpak and Snaps packaging types. When you launch **bauh** you will see
|
||||||
an application management panel where you can search, update, install and uninstall applications.
|
a management panel where you can search, update, install and uninstall applications. You can also downgrade some apps depending on the package type.
|
||||||
|
|
||||||
|
It has a **tray mode** (see **Settings** below) that attaches the application icon to the system tray providing a quick way to launch it. Also the icon will get red when updates are available.
|
||||||
|
|
||||||
|
|
||||||
### Developed with:
|
### Developed with:
|
||||||
- Python3 and Qt5.
|
- Python3 and Qt5.
|
||||||
@@ -20,7 +23,7 @@ an application management panel where you can search, update, install and uninst
|
|||||||
### Distribution
|
### Distribution
|
||||||
**PyPi**
|
**PyPi**
|
||||||
```
|
```
|
||||||
sudo pip3 install bauh
|
pip3 install bauh
|
||||||
```
|
```
|
||||||
|
|
||||||
**AUR**
|
**AUR**
|
||||||
@@ -54,6 +57,7 @@ You can change some application settings via environment variables or arguments
|
|||||||
- **BAUH_CHECK_PACKAGING_ONCE**: If the available supported packaging types should be checked ONLY once. It improves the application speed if enabled, but can generate errors if you uninstall any packaging technology while using it, and every time a supported packaging type is installed it will only be available after a restart. Use **0** (disable, default) or **1** (enable).
|
- **BAUH_CHECK_PACKAGING_ONCE**: If the available supported packaging types should be checked ONLY once. It improves the application speed if enabled, but can generate errors if you uninstall any packaging technology while using it, and every time a supported packaging type is installed it will only be available after a restart. Use **0** (disable, default) or **1** (enable).
|
||||||
- **BAUH_TRAY**: If the tray icon and update-check daemon should be created. Use **0** (disable, default) or **1** (enable).
|
- **BAUH_TRAY**: If the tray icon and update-check daemon should be created. Use **0** (disable, default) or **1** (enable).
|
||||||
- **BAUH_SUGGESTIONS**: If application suggestions should be displayed if no app is installed (runtimes do not count as apps). Use **0** (disable) or **1** (enable, default).
|
- **BAUH_SUGGESTIONS**: If application suggestions should be displayed if no app is installed (runtimes do not count as apps). Use **0** (disable) or **1** (enable, default).
|
||||||
|
- **BAUH_THEME**:
|
||||||
|
|
||||||
### How to improve the application performance
|
### How to improve the application performance
|
||||||
- If you don't care about a specific packaging technology and don't want the app to deal with it, just disable it via the specific argument or environment variable. For instance, if I don't care
|
- If you don't care about a specific packaging technology and don't want the app to deal with it, just disable it via the specific argument or environment variable. For instance, if I don't care
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
__version__ = '0.5.1'
|
__version__ = '0.5.2'
|
||||||
__app_name__ = 'bauh'
|
__app_name__ = 'bauh'
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ parser.add_argument('--snap', action="store", default=os.getenv('BAUH_SNAP', 1),
|
|||||||
parser.add_argument('-co', '--check-packaging-once', action="store", default=os.getenv('BAUH_CHECK_PACKAGING_ONCE', 0), choices=[0, 1], type=int, help='If the available supported packaging types should be checked ONLY once. It improves the application speed if enabled, but can generate errors if you uninstall any packaging technology while using it, and every time a supported packaging type is installed it will only be available after a restart. Default: %(default)s')
|
parser.add_argument('-co', '--check-packaging-once', action="store", default=os.getenv('BAUH_CHECK_PACKAGING_ONCE', 0), choices=[0, 1], type=int, help='If the available supported packaging types should be checked ONLY once. It improves the application speed if enabled, but can generate errors if you uninstall any packaging technology while using it, and every time a supported packaging type is installed it will only be available after a restart. Default: %(default)s')
|
||||||
parser.add_argument('--tray', action="store", default=os.getenv('BAUH_TRAY', 0), choices=[0, 1], type=int, help='If the tray icon and update-check daemon should be created. Default: %(default)s')
|
parser.add_argument('--tray', action="store", default=os.getenv('BAUH_TRAY', 0), choices=[0, 1], type=int, help='If the tray icon and update-check daemon should be created. Default: %(default)s')
|
||||||
parser.add_argument('--sugs', action="store", default=os.getenv('BAUH_SUGGESTIONS', 1), choices=[0, 1], type=int, help='If app suggestions should be displayed if no app is installed (runtimes do not count as apps). Default: %(default)s')
|
parser.add_argument('--sugs', action="store", default=os.getenv('BAUH_SUGGESTIONS', 1), choices=[0, 1], type=int, help='If app suggestions should be displayed if no app is installed (runtimes do not count as apps). Default: %(default)s')
|
||||||
|
parser.add_argument('--theme', action="store", default=os.getenv('BAUH_THEME'), type=str, help='Define a custom QT theme (style) for the application. If not defined, it will be using breeze or fusion depending on your desktop environment')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.cache_exp < 0:
|
if args.cache_exp < 0:
|
||||||
@@ -118,6 +119,12 @@ app.setApplicationName(__app_name__)
|
|||||||
app.setApplicationVersion(__version__)
|
app.setApplicationVersion(__version__)
|
||||||
app.setWindowIcon(QIcon(resource.get_path('img/logo.svg')))
|
app.setWindowIcon(QIcon(resource.get_path('img/logo.svg')))
|
||||||
|
|
||||||
|
|
||||||
|
if args.theme:
|
||||||
|
app.setStyle(args.theme)
|
||||||
|
elif not app.style().objectName().lower() not in {'fusion', 'breeze'}:
|
||||||
|
app.setStyle('fusion')
|
||||||
|
|
||||||
screen_size = app.primaryScreen().size()
|
screen_size = app.primaryScreen().size()
|
||||||
|
|
||||||
manage_window = ManageWindow(locale_keys=locale_keys,
|
manage_window = ManageWindow(locale_keys=locale_keys,
|
||||||
|
|||||||
@@ -517,11 +517,20 @@ class ManageWindow(QWidget):
|
|||||||
filters_layout.addWidget(checkbox_app_type)
|
filters_layout.addWidget(checkbox_app_type)
|
||||||
|
|
||||||
def resize_and_center(self, accept_lower_width: bool = True):
|
def resize_and_center(self, accept_lower_width: bool = True):
|
||||||
new_width = reduce(operator.add, [self.table_apps.columnWidth(i) for i in range(len(self.table_apps.column_names))]) * 1.05
|
if self.apps:
|
||||||
|
new_width = reduce(operator.add, [self.table_apps.columnWidth(i) for i in range(self.table_apps.columnCount())])
|
||||||
|
|
||||||
|
if self.ref_bt_upgrade.isVisible():
|
||||||
|
new_width *= 1.07
|
||||||
|
else:
|
||||||
|
new_width = self.toolbar_top.width()
|
||||||
|
|
||||||
if accept_lower_width or new_width > self.width():
|
if accept_lower_width or new_width > self.width():
|
||||||
self.resize(new_width, self.height())
|
self.resize(new_width, self.height())
|
||||||
|
|
||||||
|
if self.ref_bt_upgrade.isVisible() and self.bt_upgrade.visibleRegion().isEmpty():
|
||||||
|
self.adjustSize()
|
||||||
|
|
||||||
self.centralize()
|
self.centralize()
|
||||||
|
|
||||||
def update_selected(self):
|
def update_selected(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user