diff --git a/win-linux/res/styles/download.qss b/win-linux/res/styles/download.qss index 4d284273a..313dc5af7 100644 --- a/win-linux/res/styles/download.qss +++ b/win-linux/res/styles/download.qss @@ -6,6 +6,7 @@ QFrame#titleFrame, QFrame#downloadItem {background: #ffffff;} QPushButton {border: none; color: #3a83db; background: transparent; padding: 0px; margin: 0px; font-weight: normal; font-family: "Open Sans", sans-serif, "Arial";} +CDownloadWidget[rtl-font=true] QPushButton {font-family: "Segoe UI", "Traditional Arabic", "Noto Sans";} QPushButton::menu-indicator {width: 0px; height: 0px;} QPushButton#buttonCancel {color: #ffffff;} QPushButton:hover {color: #444444;} @@ -15,6 +16,7 @@ QProgressBar {background-color: #e6e6e6; border-color: #e6e6e6; margin: 0px;} QProgressBar::chunk {background-color: #3a83db;} QLabel {color: #444444; font-family: "Open Sans", sans-serif, "Arial";} +CDownloadWidget[rtl-font=true] QLabel {font-family: "Segoe UI", "Traditional Arabic", "Noto Sans";} QLabel#labelSize, QLabel#labelInfo {color: #a5a5a5;} diff --git a/win-linux/res/styles/editor.qss b/win-linux/res/styles/editor.qss index 5497ddf4a..a00ca500b 100644 --- a/win-linux/res/styles/editor.qss +++ b/win-linux/res/styles/editor.qss @@ -1,6 +1,7 @@ #mainPanel {background-color: %1;} #box-title-tools {background-color: %1;} #box-title-tools QLabel {font-family: "Arial", "Helvetica", "Helvetica Neue", sans-serif;} +#mainPanel[rtl-font=true] #box-title-tools QLabel {font-family: "Segoe UI", "Traditional Arabic", "Noto Sans";} #labelTitle {color: #444; font-weight: normal;} #iconuser {color: %1; background: #d9ffffff; font-size: 10px;} QPushButton[act=tool]:hover {background-color: rgba(0,0,0,20%);} diff --git a/win-linux/res/styles/styles.qss b/win-linux/res/styles/styles.qss index e48a19da1..123358477 100644 --- a/win-linux/res/styles/styles.qss +++ b/win-linux/res/styles/styles.qss @@ -16,6 +16,7 @@ margin-top: -2px; font-size: 11px; } +#mainPanel[rtl-font=true] #labelAppTitle {font-family: "Segoe UI", "Traditional Arabic", "Noto Sans";} QPushButton { /*background-color:#d9d9d9;*/ @@ -291,3 +292,4 @@ QPushButton#toolButtonDownload {border-left: 0px; border-right: 1px solid #dfdfd color: #d2d2d2; background-color: #212121; } +#mainPanel[rtl-font=true] #CToolTip>QLabel {font-family: "Segoe UI", "Traditional Arabic", "Noto Sans";} diff --git a/win-linux/res/styles/tabbar.qss b/win-linux/res/styles/tabbar.qss index e5ffd3987..11908e4a5 100644 --- a/win-linux/res/styles/tabbar.qss +++ b/win-linux/res/styles/tabbar.qss @@ -21,6 +21,7 @@ Tab #tabIcon {background: transparent;} Tab #tabText {background: transparent; font-family: "Arial", "Helvetica", "Helvetica Neue", sans-serif;} Tab #tabButton {border: none; margin-top: 0px; image: none; background: transparent;} #mainPanel[rtl=true] Tab {border-right: 0px; border-left: 1px solid #dfdfdf;} +#mainPanel[rtl-font=true] Tab #tabText {font-family: "Segoe UI", "Traditional Arabic", "Noto Sans";} Tab[selected=true] {background: #446995; border-color: #446995;} diff --git a/win-linux/src/components/cdownloadwidget.cpp b/win-linux/src/components/cdownloadwidget.cpp index a1f2c1268..8929644ef 100644 --- a/win-linux/src/components/cdownloadwidget.cpp +++ b/win-linux/src/components/cdownloadwidget.cpp @@ -34,6 +34,7 @@ #include "components/celipsislabel.h" #include "components/cmessage.h" #include "cascapplicationmanagerwrapper.h" +#include "clangater.h" #include "utils.h" #include #include @@ -209,6 +210,7 @@ CDownloadWidget::CDownloadWidget(QWidget *parent) hide(); return; } + setProperty("rtl-font", CLangater::isRtlLanguage(CLangater::getCurrentLangCode())); polish(); show(); QPoint pos = AscAppManager::isRtlEnabled() ? parent->geometry().topLeft() : parent->geometry().topRight() - QPoint(WIDGET_MAX_WIDTH, 0); diff --git a/win-linux/src/windows/ceditorwindow.cpp b/win-linux/src/windows/ceditorwindow.cpp index 520145c9b..b19882497 100644 --- a/win-linux/src/windows/ceditorwindow.cpp +++ b/win-linux/src/windows/ceditorwindow.cpp @@ -237,6 +237,7 @@ QWidget * CEditorWindow::createMainPanel(QWidget * parent, const QString& title) // gradient.setColorAt(1, QColor("#e4e4e4")); } + mainPanel->setProperty("rtl-font", CLangater::isRtlLanguage(CLangater::getCurrentLangCode())); mainPanel->setProperty("zoom", QString::number(m_dpiRatio) + "x"); mainPanel->setProperty("uitheme", QString::fromStdWString(GetCurrentTheme().id())); QString css(AscAppManager::getWindowStylesheets(m_dpiRatio) + m_css); diff --git a/win-linux/src/windows/cmainwindow.cpp b/win-linux/src/windows/cmainwindow.cpp index 1b87d3647..8b6ce00b6 100644 --- a/win-linux/src/windows/cmainwindow.cpp +++ b/win-linux/src/windows/cmainwindow.cpp @@ -32,6 +32,7 @@ #include "windows/cmainwindow.h" #include "ceditortools.h" +#include "clangater.h" #include "defines.h" #include "utils.h" #include "components/cfiledialog.h" @@ -375,6 +376,12 @@ QWidget* CMainWindow::createMainPanel(QWidget *parent) QWidget *mainPanel = new QWidget(parent); mainPanel->setObjectName("mainPanel"); mainPanel->setProperty("rtl", AscAppManager::isRtlEnabled()); + mainPanel->setProperty("rtl-font", CLangater::isRtlLanguage(CLangater::getCurrentLangCode())); +#ifdef _WIN32 + mainPanel->setProperty("unix", false); +#else + mainPanel->setProperty("unix", true); +#endif QGridLayout *_pMainGridLayout = new QGridLayout(mainPanel); _pMainGridLayout->setSpacing(0); _pMainGridLayout->setObjectName(QString::fromUtf8("mainGridLayout")); diff --git a/win-linux/src/windows/cpresenterwindow.cpp b/win-linux/src/windows/cpresenterwindow.cpp index d4d0e153e..fa9e36feb 100644 --- a/win-linux/src/windows/cpresenterwindow.cpp +++ b/win-linux/src/windows/cpresenterwindow.cpp @@ -110,6 +110,7 @@ QWidget * CPresenterWindow::createMainPanel(QWidget * parent, const QString& tit { QWidget * mainPanel = new QWidget(parent); mainPanel->setObjectName("mainPanel"); + mainPanel->setProperty("rtl-font", CLangater::isRtlLanguage(CLangater::getCurrentLangCode())); mainPanel->setProperty("uitheme", QString::fromStdWString(GetCurrentTheme().id())); QString css(AscAppManager::getWindowStylesheets(m_dpiRatio)); #ifdef __linux__