def __init__(self, parent): QWidget.__init__(self, parent) self.setMinimumHeight(gui_scale() * 80) self.setMaximumHeight(gui_scale() * 80) self.setMinimumWidth(1) self.setMaximumWidth(1) self.setLayout(QHBoxLayout())
def __init__(self, parent): QToolBar.__init__(self, parent) self.setStyleSheet(get_stylesheet("ribbon")) self.setObjectName("ribbonWidget") self.setWindowTitle("Ribbon") self._ribbon_widget = QTabWidget(self) self._ribbon_widget.setMaximumHeight(120*gui_scale()) self._ribbon_widget.setMinimumHeight(110*gui_scale()) self.setMovable(False) self.addWidget(self._ribbon_widget)
def __init__(self, parent): QToolBar.__init__(self, parent) self.setStyleSheet(get_stylesheet("ribbon")) self.setObjectName("ribbonWidget") self.setWindowTitle("Ribbon") self._ribbon_widget = QTabWidget(self) self._ribbon_widget.setMaximumHeight(120 * gui_scale()) self._ribbon_widget.setMinimumHeight(110 * gui_scale()) self.setMovable(False) self.addWidget(self._ribbon_widget)
def __init__(self, owner, action, is_large): QPushButton.__init__(self, owner) # sc = 1 sc = gui_scale() self._actionOwner = action self.update_button_status_from_action() self.clicked.connect(self._actionOwner.trigger) self._actionOwner.changed.connect(self.update_button_status_from_action) if is_large: self.setMaximumWidth(80 * sc) self.setMinimumWidth(50 * sc) self.setMinimumHeight(75 * sc) self.setMaximumHeight(80 * sc) self.setStyleSheet(get_stylesheet("ribbonButton")) self.setToolButtonStyle(3) self.setIconSize(QSize(32 * sc, 32 * sc)) else: self.setToolButtonStyle(2) self.setMaximumWidth(120 * sc) self.setIconSize(QSize(16 * sc, 16 * sc)) self.setStyleSheet(get_stylesheet("ribbonSmallButton"))
def __init__(self, owner, action, is_large): QPushButton.__init__(self, owner) # sc = 1 sc = gui_scale() self._actionOwner = action self.update_button_status_from_action() self.clicked.connect(self._actionOwner.trigger) self._actionOwner.changed.connect( self.update_button_status_from_action) if is_large: self.setMaximumWidth(80 * sc) self.setMinimumWidth(50 * sc) self.setMinimumHeight(75 * sc) self.setMaximumHeight(80 * sc) self.setStyleSheet(get_stylesheet("ribbonButton")) self.setToolButtonStyle(3) self.setIconSize(QSize(32 * sc, 32 * sc)) else: self.setToolButtonStyle(2) self.setMaximumWidth(120 * sc) self.setIconSize(QSize(16 * sc, 16 * sc)) self.setStyleSheet(get_stylesheet("ribbonSmallButton"))