zhiyiYo / PyQt-Fluent-Widgets

A fluent design widgets library based on C++ Qt/PyQt/PySide. Make Qt Great Again.
https://qfluentwidgets.com
GNU General Public License v3.0
4.98k stars 464 forks source link

Calendar widget is very slow to show and hide, can you improve it #840

Open Khanhlinhdang opened 3 months ago

Khanhlinhdang commented 3 months ago

image

Khanhlinhdang commented 2 months ago

Thank you bro!

Khanhlinhdang commented 2 months ago

image i use this stylesheet for darktheme, it is very fast you can setup it like a custom components,

QWidget { background-color: #2b2b2b; color:#eaeaea; border: solid; border-width: 0.5px; border-color: transparent; border-radius: 5px;

}

QCalendarWidget QToolButton { height:40px; width:50px; color:white; font:18px 'Segoe UI', 'Microsoft YaHei', 'PingFang SC'; icon-size:25px 25px; background-color:#2b2b2b; } QCalendarWidget QToolButton:hover { background-color:#202020; }

QCalendarWidget QWidget#qt_calendar_navigationbar { height:40px; background-color:#2b2b2b;

}

qt_calendar_monthbutton

{ width:100px; font:18px 'Segoe UI', 'Microsoft YaHei', 'PingFang SC'; color:white; background-color:#2b2b2b; margin: 0px 2px; padding: 0px 2px

}

qt_calendar_yearbutton

{ font:18px 'Segoe UI', 'Microsoft YaHei', 'PingFang SC'; color:white; background-color:#2b2b2b; margin: 0px 2px; padding: 0px 2px

}

qt_calendar_monthbutton:hover,

qt_calendar_yearbutton:hover

{ background-color:#202020; }

/ MenuBar Code /

QCalendarWidget QMenu { width:150px; color:white; font:14px 'Segoe UI', 'Microsoft YaHei', 'PingFang SC'; background-color:#2b2b2b; }

/ SpinBox Code /

/ Calendar View Code / QCalendarWidget QWidget { alternate-background-color:#2b2b2b; }

QCalendarWidget QAbstractItemView:enabled { font:14px 'Segoe UI', 'Microsoft YaHei', 'PingFang SC'; color:white; background-color:#2b2b2b; selection-background-color:#202020; selection-color:white; } QCalendarWidget QAbstractItemView:disabled { color:rgb(100,100,100); }

QCalendarWidget QSpinBox { width:60px; height:25px; font:14px 'Segoe UI', 'Microsoft YaHei', 'PingFang SC'; color:white; background-color:#2b2b2b; }

qt_calendar_calendarview

{ font:14px 'Segoe UI', 'Microsoft YaHei', 'PingFang SC'; color:white; background-color:#202020; border: solid; border-width: 0.5px; border-color: #2b2b2b; border-radius:5px; }

qt_calendar_calendarview::item

{ width:25px; height:25px; background-color:#2b2b2b; border: solid; border-width: 1px; border-color: #2b2b2b; border-radius:15px; padding: 2px 2px 2px 2px }

qt_calendar_calendarview::item:hover

{ width:25px; height:25px; background-color:black; border: solid; border-width: 1px; border-color: black; border-radius:15px; padding: 2px 2px 2px 2px }

qt_calendar_calendarview::item:selected

{ width:25px; height:25px; background-color:black; border: solid; border-width: 1px; border-color: black; border-radius:15px; padding: 2px 2px 2px 2px }