mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[win-nix] fix tab flickering
This commit is contained in:
@ -17,9 +17,9 @@
|
|||||||
"tool-button-pressed-background": "#606060",
|
"tool-button-pressed-background": "#606060",
|
||||||
|
|
||||||
"tab-active-background": "#333",
|
"tab-active-background": "#333",
|
||||||
"tab-simple-active-background": "#fff",
|
"tab-simple-active-background": "#333",
|
||||||
"tab-simple-active-text": "#fff",
|
"tab-simple-active-text": "#fff",
|
||||||
"tab-default-active-background": "#fff",
|
"tab-default-active-background": "#333",
|
||||||
"tab-default-active-text": "#fff",
|
"tab-default-active-text": "#fff",
|
||||||
"tab-divider": "#505050",
|
"tab-divider": "#505050",
|
||||||
|
|
||||||
|
|||||||
@ -395,8 +395,7 @@ int CAscTabWidget::addPortal(const QString& url, const QString& name, const QStr
|
|||||||
m_pBar->setTabToolTip(tab_index, _url);
|
m_pBar->setTabToolTip(tab_index, _url);
|
||||||
m_pBar->setTabThemeType(tab_index, GetCurrentTheme().isDark() ? CTabBar::DarkTab : CTabBar::LightTab);
|
m_pBar->setTabThemeType(tab_index, GetCurrentTheme().isDark() ? CTabBar::DarkTab : CTabBar::LightTab);
|
||||||
m_pBar->setTabThemeIcons(tab_index, std::make_pair(":/tabbar/icons/portal.svg", ":/tabbar/icons/portal_light.svg"));
|
m_pBar->setTabThemeIcons(tab_index, std::make_pair(":/tabbar/icons/portal.svg", ":/tabbar/icons/portal_light.svg"));
|
||||||
m_pBar->setActiveTabColor(tab_index, QString::fromStdWString(GetCurrentTheme().isDark() ? GetColorValueByRole(ecrTabWordActive) :
|
m_pBar->setActiveTabColor(tab_index, QString::fromStdWString(GetColorValueByRole(ecrTabDefaultActiveBackground)));
|
||||||
GetColorValueByRole(ecrTabDefaultActiveBackground)));
|
|
||||||
m_pBar->tabStartLoading(tab_index);
|
m_pBar->tabStartLoading(tab_index);
|
||||||
// updateTabIcon(tabIndexByView(id));
|
// updateTabIcon(tabIndexByView(id));
|
||||||
|
|
||||||
@ -437,8 +436,7 @@ int CAscTabWidget::addOAuthPortal(const QString& portal, const QString& type, co
|
|||||||
m_pBar->setTabToolTip(tab_index, portal);
|
m_pBar->setTabToolTip(tab_index, portal);
|
||||||
m_pBar->setTabThemeType(tab_index, GetCurrentTheme().isDark() ? CTabBar::DarkTab : CTabBar::LightTab);
|
m_pBar->setTabThemeType(tab_index, GetCurrentTheme().isDark() ? CTabBar::DarkTab : CTabBar::LightTab);
|
||||||
m_pBar->setTabThemeIcons(tab_index, std::make_pair(":/tabbar/icons/portal.svg", ":/tabbar/icons/portal_light.svg"));
|
m_pBar->setTabThemeIcons(tab_index, std::make_pair(":/tabbar/icons/portal.svg", ":/tabbar/icons/portal_light.svg"));
|
||||||
m_pBar->setActiveTabColor(tab_index, QString::fromStdWString(GetCurrentTheme().isDark() ? GetColorValueByRole(ecrTabWordActive) :
|
m_pBar->setActiveTabColor(tab_index, QString::fromStdWString(GetColorValueByRole(ecrTabDefaultActiveBackground)));
|
||||||
GetColorValueByRole(ecrTabDefaultActiveBackground)));
|
|
||||||
// m_pBar->tabStartLoading(tab_index);
|
// m_pBar->tabStartLoading(tab_index);
|
||||||
|
|
||||||
return tab_index;
|
return tab_index;
|
||||||
@ -1231,8 +1229,7 @@ void CAscTabWidget::applyUITheme(const std::wstring& theme)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
m_pBar->setTabThemeType(i, ui_theme.isDark() ? CTabBar::DarkTab : CTabBar::LightTab);
|
m_pBar->setTabThemeType(i, ui_theme.isDark() ? CTabBar::DarkTab : CTabBar::LightTab);
|
||||||
m_pBar->setActiveTabColor(i, QString::fromStdWString(ui_theme.isDark() ? ui_theme.value(CTheme::ColorRole::ecrTabWordActive) :
|
m_pBar->setActiveTabColor(i, QString::fromStdWString(ui_theme.value(CTheme::ColorRole::ecrTabDefaultActiveBackground)));
|
||||||
ui_theme.value(CTheme::ColorRole::ecrTabDefaultActiveBackground)));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user