diff --git a/examples/Gallery for siui/components/page_widgets/page_widgets.py b/examples/Gallery for siui/components/page_widgets/page_widgets.py index d7ea88a..4e68343 100644 --- a/examples/Gallery for siui/components/page_widgets/page_widgets.py +++ b/examples/Gallery for siui/components/page_widgets/page_widgets.py @@ -328,10 +328,15 @@ def __init__(self, *args, **kwargs): self.refactor_radio_button4.setText("不是哥们我真的要困死了让我睡觉吧") self.refactor_radio_button4.adjustSize() + self.refactor_radio_button5 = SiRadioButtonRefactor(self) + self.refactor_radio_button5.setText("nihao") + self.refactor_radio_button5.adjustSize() + radio_button_container.addWidget(self.refactor_radio_button) radio_button_container.addWidget(self.refactor_radio_button2) radio_button_container.addWidget(self.refactor_radio_button3) radio_button_container.addWidget(self.refactor_radio_button4) + radio_button_container.addWidget(self.refactor_radio_button5) radio_button_container.adjustSize() self.refactor_radiobuttons.body().addWidget(radio_button_container) diff --git a/examples/Gallery for siui/start.py b/examples/Gallery for siui/start.py index bd37163..aca2f40 100644 --- a/examples/Gallery for siui/start.py +++ b/examples/Gallery for siui/start.py @@ -8,7 +8,7 @@ import siui from siui.core import SiGlobal -#siui.gui.set_scale_factor(1) +# siui.gui.set_scale_factor(1) def show_version_message(window): diff --git a/siui/components/button.py b/siui/components/button.py index 9a65b67..54783dc 100644 --- a/siui/components/button.py +++ b/siui/components/button.py @@ -799,10 +799,10 @@ def _drawTextRect(self, painter: QPainter, rect: QRect) -> None: class SwitchStyleData(QObject): STYLE_TYPES = ["Switch"] - background_color_starting: QColor = QColor("#52389a") - background_color_ending: QColor = QColor("#9c4e8b") + background_color_starting: QColor = QColor("#519868") + background_color_ending: QColor = QColor("#519868") frame_color: QColor = QColor("#D2D2D2") - thumb_color_checked: QColor = QColor("#100912") + thumb_color_checked: QColor = QColor("#09120c") thumb_color_unchecked: QColor = QColor("#D2D2D2") @@ -957,7 +957,7 @@ class RadioButtonStyleData(QObject): indicator_border_radius: float = 9.5 indicator_allocated_width: int = 60 - indicator_hover_additional_width: int = 4 + indicator_hover_additional_width: int = 2 indicator_height: int = 19 avatar_width: int = 36 @@ -965,7 +965,7 @@ class RadioButtonStyleData(QObject): avatar_border_radius: int = 18 highlight_idle_color: QColor = QColor("#00baadc7") - highlight_flash_color: QColor = QColor("#70baadc7") + highlight_flash_color: QColor = QColor("#90baadc7") highlight_hover_color: QColor = QColor("#40baadc7") unchecked_indicator_color: QColor = QColor("#25222A") @@ -1056,7 +1056,7 @@ def _drawIndicatorPath(self, rect: QRect) -> QPainterPath: alloc_width = self.style_data.indicator_allocated_width radius = self.style_data.indicator_border_radius width = (self._indicatorWidthInterpolation(self._indi_width_prog) + - self._indi_hover_width * (1 - self._indi_width_prog * 0.6)) + self._indi_hover_width * ((self._indi_width_prog + 1) / 2)) path = QPainterPath() path.addRoundedRect(QRectF(alloc_width - width, rect.y(), width, rect.height()), radius, radius) return path diff --git a/siui/core/painter.py b/siui/core/painter.py index c5364e5..8800b27 100644 --- a/siui/core/painter.py +++ b/siui/core/painter.py @@ -33,7 +33,7 @@ def createPainter( """ painter = QPainter(paintDevice) if renderHint is not None: - painter.setRenderHint(renderHint) + painter.setRenderHints(renderHint) if penStyle is not None: painter.setPen(penStyle)