MCPcopy Create free account
hub / github.com/MCSLTeam/MCSL2 / setQss

Method setQss

MCSL2Lib/ServerControllers/windowCreator.py:661–731  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

659 return super().eventFilter(obj, event)
660
661 def setQss(self):
662 if isDarkTheme():
663 self.setStyleSheet(
664 """
665 ServerWindowTitleBar>QLabel#titleLabel {
666 color: white;
667 background: transparent;
668 font: 13px 'Segoe UI', 'Microsoft YaHei', 'PingFang SC';
669 padding: 0 4px
670 }
671 MinimizeButton {
672 qproperty-normalColor: white;
673 qproperty-normalBackgroundColor: transparent;
674 qproperty-hoverColor: white;
675 qproperty-hoverBackgroundColor: rgba(255, 255, 255, 26);
676 qproperty-pressedColor: white;
677 qproperty-pressedBackgroundColor: rgba(255, 255, 255, 51)
678 }
679
680
681 MaximizeButton {
682 qproperty-normalColor: white;
683 qproperty-normalBackgroundColor: transparent;
684 qproperty-hoverColor: white;
685 qproperty-hoverBackgroundColor: rgba(255, 255, 255, 26);
686 qproperty-pressedColor: white;
687 qproperty-pressedBackgroundColor: rgba(255, 255, 255, 51)
688 }
689
690 CloseButton {
691 qproperty-normalColor: white;
692 qproperty-normalBackgroundColor: transparent;
693 }
694 """
695 )
696 else:
697 self.setStyleSheet(
698 """
699 ServerWindowTitleBar>QLabel#titleLabel {
700 color: black;
701 background: transparent;
702 font: 13px 'Segoe UI', 'Microsoft YaHei', 'PingFang SC';
703 padding: 0 4px
704 }
705
706
707 MinimizeButton {
708 qproperty-normalColor: black;
709 qproperty-normalBackgroundColor: transparent;
710 qproperty-hoverColor: black;
711 qproperty-hoverBackgroundColor: rgba(0, 0, 0, 26);
712 qproperty-pressedColor: black;
713 qproperty-pressedBackgroundColor: rgba(0, 0, 0, 51)
714 }
715
716
717 MaximizeButton {
718 qproperty-normalColor: black;

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected