增加维哈柯多语言从右往左支持

This commit is contained in:
openkylin2 2024-04-22 14:14:40 +08:00
parent c3a130b6bd
commit 498a075e34
1 changed files with 6 additions and 0 deletions

View File

@ -4529,6 +4529,12 @@ void UKUIConfigStyle::drawComplexControl(QStyle::ComplexControl control, const Q
void UKUIConfigStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const
{
QString systemLang = QLocale::system().name();
if(systemLang == "ug_CN" || systemLang == "ky_KG" || systemLang == "kk_KZ"){
QGuiApplication::setLayoutDirection(Qt::RightToLeft);
} else {
QGuiApplication::setLayoutDirection(Qt::LeftToRight);
}
switch (element) {
case CE_ScrollBarSlider:
{