mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
remove pype prefixes in tray tool
This commit is contained in:
parent
852676b751
commit
cd233c42f5
4 changed files with 23 additions and 24 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from .pype_tray import main
|
||||
from .tray import main
|
||||
|
||||
__all__ = (
|
||||
"main",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
try:
|
||||
from . import pype_tray
|
||||
from . import tray
|
||||
except ImportError:
|
||||
import pype_tray
|
||||
import tray
|
||||
|
||||
|
||||
pype_tray.main()
|
||||
tray.main()
|
||||
|
|
|
|||
|
|
@ -205,11 +205,11 @@ class CollapsibleWidget(QtWidgets.QWidget):
|
|||
self.content_widget.updateGeometry()
|
||||
|
||||
|
||||
class PypeInfoWidget(QtWidgets.QWidget):
|
||||
class InfoWidget(QtWidgets.QWidget):
|
||||
_resized = QtCore.Signal()
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(PypeInfoWidget, self).__init__(parent)
|
||||
super(InfoWidget, self).__init__(parent)
|
||||
|
||||
self._scroll_at_bottom = False
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ class PypeInfoWidget(QtWidgets.QWidget):
|
|||
self.setWindowTitle("AYON info")
|
||||
|
||||
scroll_area = QtWidgets.QScrollArea(self)
|
||||
info_widget = PypeInfoSubWidget(scroll_area)
|
||||
info_widget = InfoSubWidget(scroll_area)
|
||||
|
||||
scroll_area.setWidget(info_widget)
|
||||
scroll_area.setWidgetResizable(True)
|
||||
|
|
@ -250,14 +250,14 @@ class PypeInfoWidget(QtWidgets.QWidget):
|
|||
vertical_bar.setValue(vertical_bar.maximum())
|
||||
|
||||
def resizeEvent(self, event):
|
||||
super(PypeInfoWidget, self).resizeEvent(event)
|
||||
super(InfoWidget, self).resizeEvent(event)
|
||||
self._resized.emit()
|
||||
self.info_widget.set_content_height(
|
||||
self.scroll_area.height()
|
||||
)
|
||||
|
||||
def showEvent(self, event):
|
||||
super(PypeInfoWidget, self).showEvent(event)
|
||||
super(InfoWidget, self).showEvent(event)
|
||||
self.info_widget.set_content_height(
|
||||
self.scroll_area.height()
|
||||
)
|
||||
|
|
@ -314,18 +314,18 @@ class PypeInfoWidget(QtWidgets.QWidget):
|
|||
)
|
||||
|
||||
|
||||
class PypeInfoSubWidget(QtWidgets.QWidget):
|
||||
class InfoSubWidget(QtWidgets.QWidget):
|
||||
not_applicable = "N/A"
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super(PypeInfoSubWidget, self).__init__(parent)
|
||||
super(InfoSubWidget, self).__init__(parent)
|
||||
|
||||
self.env_view = None
|
||||
|
||||
main_layout = QtWidgets.QVBoxLayout(self)
|
||||
main_layout.setContentsMargins(0, 0, 0, 0)
|
||||
main_layout.setAlignment(QtCore.Qt.AlignTop)
|
||||
main_layout.addWidget(self._create_openpype_info_widget(), 0)
|
||||
main_layout.addWidget(self._create_info_widget(), 0)
|
||||
main_layout.addWidget(self._create_separator(), 0)
|
||||
main_layout.addWidget(self._create_workstation_widget(), 0)
|
||||
main_layout.addWidget(self._create_separator(), 0)
|
||||
|
|
@ -408,8 +408,8 @@ class PypeInfoSubWidget(QtWidgets.QWidget):
|
|||
|
||||
return env_widget
|
||||
|
||||
def _create_openpype_info_widget(self):
|
||||
"""Create widget with information about OpenPype application."""
|
||||
def _create_info_widget(self):
|
||||
"""Create widget with information about application."""
|
||||
|
||||
executable_args = get_ayon_launcher_args()
|
||||
username = "N/A"
|
||||
|
|
@ -25,7 +25,7 @@ from ayon_core.tools.utils import (
|
|||
get_ayon_qt_app,
|
||||
)
|
||||
|
||||
from .pype_info_widget import PypeInfoWidget
|
||||
from .info_widget import InfoWidget
|
||||
|
||||
|
||||
# TODO PixmapLabel should be moved to 'utils' in other future PR so should be
|
||||
|
|
@ -73,7 +73,7 @@ class TrayManager:
|
|||
def __init__(self, tray_widget, main_window):
|
||||
self.tray_widget = tray_widget
|
||||
self.main_window = main_window
|
||||
self.pype_info_widget = None
|
||||
self._info_widget = None
|
||||
self._restart_action = None
|
||||
|
||||
self.log = Logger.get_logger(self.__class__.__name__)
|
||||
|
|
@ -289,12 +289,12 @@ class TrayManager:
|
|||
self._addons_manager.on_exit()
|
||||
|
||||
def _on_version_action(self):
|
||||
if self.pype_info_widget is None:
|
||||
self.pype_info_widget = PypeInfoWidget()
|
||||
if self._info_widget is None:
|
||||
self._info_widget = InfoWidget()
|
||||
|
||||
self.pype_info_widget.show()
|
||||
self.pype_info_widget.raise_()
|
||||
self.pype_info_widget.activateWindow()
|
||||
self._info_widget.show()
|
||||
self._info_widget.raise_()
|
||||
self._info_widget.activateWindow()
|
||||
|
||||
|
||||
class SystemTrayIcon(QtWidgets.QSystemTrayIcon):
|
||||
|
|
@ -398,7 +398,7 @@ class SystemTrayIcon(QtWidgets.QSystemTrayIcon):
|
|||
QtCore.QCoreApplication.exit()
|
||||
|
||||
|
||||
class PypeTrayStarter(QtCore.QObject):
|
||||
class TrayStarter(QtCore.QObject):
|
||||
def __init__(self, app):
|
||||
app.setQuitOnLastWindowClosed(False)
|
||||
self._app = app
|
||||
|
|
@ -457,9 +457,8 @@ class PypeTrayStarter(QtCore.QObject):
|
|||
def main():
|
||||
app = get_ayon_qt_app()
|
||||
|
||||
starter = PypeTrayStarter(app)
|
||||
starter = TrayStarter(app)
|
||||
|
||||
# TODO remove when pype.exe will have an icon
|
||||
if not is_running_from_build() and os.name == "nt":
|
||||
import ctypes
|
||||
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
|
||||
Loading…
Add table
Add a link
Reference in a new issue