- enhancement: Improve how to manage themes in Options → general → appearance.
This commit is contained in:
parent
d3db8e2b4d
commit
198ff102ac
1
NEWS.md
1
NEWS.md
|
@ -149,6 +149,7 @@ Red Panda C++ Version 2.27
|
||||||
- fix: In sdcc project, sdcc keywords are not in completion suggest list.
|
- fix: In sdcc project, sdcc keywords are not in completion suggest list.
|
||||||
- fix: In sdcc project, parser are not correctly inited as sdcc parser.
|
- fix: In sdcc project, parser are not correctly inited as sdcc parser.
|
||||||
- fix: Temp object + member function call is wrongly parsed as constructor.
|
- fix: Temp object + member function call is wrongly parsed as constructor.
|
||||||
|
- enhancement: Improve how to manage themes in Options → general → appearance.
|
||||||
|
|
||||||
Red Panda C++ Version 2.26
|
Red Panda C++ Version 2.26
|
||||||
- enhancement: Code suggestion for embedded std::vectors.
|
- enhancement: Code suggestion for embedded std::vectors.
|
||||||
|
|
|
@ -111,6 +111,7 @@ void EnvironmentAppearanceWidget::on_cbTheme_currentIndexChanged(int /* index */
|
||||||
ThemeManager themeManager;
|
ThemeManager themeManager;
|
||||||
PAppTheme appTheme = themeManager.theme(ui->cbTheme->currentData().toString());
|
PAppTheme appTheme = themeManager.theme(ui->cbTheme->currentData().toString());
|
||||||
ui->btnCustomize->setVisible(appTheme->category() == AppTheme::ThemeCategory::BuiltIn);
|
ui->btnCustomize->setVisible(appTheme->category() == AppTheme::ThemeCategory::BuiltIn);
|
||||||
|
ui->btnOpenCustomThemeFolder->setVisible(appTheme->category() == AppTheme::ThemeCategory::Custom);
|
||||||
if(!appTheme->defaultIconSet().isEmpty()) {
|
if(!appTheme->defaultIconSet().isEmpty()) {
|
||||||
for (int i=0; i<ui->cbIconSet->count();i++) {
|
for (int i=0; i<ui->cbIconSet->count();i++) {
|
||||||
if (ui->cbIconSet->itemData(i) == appTheme->defaultIconSet()) {
|
if (ui->cbIconSet->itemData(i) == appTheme->defaultIconSet()) {
|
||||||
|
@ -143,3 +144,10 @@ void EnvironmentAppearanceWidget::on_btnCustomize_clicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void EnvironmentAppearanceWidget::on_btnOpenCustomThemeFolder_clicked()
|
||||||
|
{
|
||||||
|
QString customThemeFolder = pSettings->dirs().config(Settings::Dirs::DataType::Theme);
|
||||||
|
openFileFolderInExplorer(customThemeFolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ public:
|
||||||
private slots:
|
private slots:
|
||||||
void on_cbTheme_currentIndexChanged(int index);
|
void on_cbTheme_currentIndexChanged(int index);
|
||||||
void on_btnCustomize_clicked();
|
void on_btnCustomize_clicked();
|
||||||
|
void on_btnOpenCustomThemeFolder_clicked();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ENVIRONMENTAPPEARANCEWIDGET_H
|
#endif // ENVIRONMENTAPPEARANCEWIDGET_H
|
||||||
|
|
|
@ -142,6 +142,13 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnOpenCustomThemeFolder">
|
||||||
|
<property name="text">
|
||||||
|
<string>Open custom themes folder</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
|
@ -2357,7 +2357,12 @@
|
||||||
<translation>Fonte:</translation>
|
<translation>Fonte:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+179"/>
|
<location line="+83"/>
|
||||||
|
<source>Open custom themes folder</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+103"/>
|
||||||
<source>*Needs restart</source>
|
<source>*Needs restart</source>
|
||||||
<translation>*Necessário reiniciar</translation>
|
<translation>*Necessário reiniciar</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2367,12 +2372,12 @@
|
||||||
<translation>Tema:</translation>
|
<translation>Tema:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-23"/>
|
<location line="-30"/>
|
||||||
<source>Create a customized copy</source>
|
<source>Create a customized copy</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+78"/>
|
<location line="+85"/>
|
||||||
<source>Language:</source>
|
<source>Language:</source>
|
||||||
<translation>Idioma:</translation>
|
<translation>Idioma:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2386,12 +2391,12 @@
|
||||||
<translation type="vanished">Usar tema personalizado</translation>
|
<translation type="vanished">Usar tema personalizado</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-151"/>
|
<location line="-158"/>
|
||||||
<source>Icon Set:</source>
|
<source>Icon Set:</source>
|
||||||
<translation>Conjunto de ícones:</translation>
|
<translation>Conjunto de ícones:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+176"/>
|
<location line="+183"/>
|
||||||
<source>Use custom icon set</source>
|
<source>Use custom icon set</source>
|
||||||
<translation>Usar conjunto de ícones personalizado</translation>
|
<translation>Usar conjunto de ícones personalizado</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2415,16 +2420,6 @@
|
||||||
<source>Traditional Chinese</source>
|
<source>Traditional Chinese</source>
|
||||||
<translation>Chinês tradicional</translation>
|
<translation>Chinês tradicional</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location line="+32"/>
|
|
||||||
<source>Confirm Overwrite</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location line="+1"/>
|
|
||||||
<source>Custom Theme file %1 already exists.<br />Do you want to overwrite it?</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog/environmentappearancewidget.ui" line="+71"/>
|
<location filename="../settingsdialog/environmentappearancewidget.ui" line="+71"/>
|
||||||
<source>Icon Zoom:</source>
|
<source>Icon Zoom:</source>
|
||||||
|
|
|
@ -2643,7 +2643,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>表单</translation>
|
<translation>表单</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+150"/>
|
<location line="+157"/>
|
||||||
<source>Theme:</source>
|
<source>Theme:</source>
|
||||||
<translation>主题:</translation>
|
<translation>主题:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2652,12 +2652,12 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation type="vanished">使用自定义主题</translation>
|
<translation type="vanished">使用自定义主题</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-144"/>
|
<location line="-151"/>
|
||||||
<source>Icon Set:</source>
|
<source>Icon Set:</source>
|
||||||
<translation>图标集:</translation>
|
<translation>图标集:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+176"/>
|
<location line="+183"/>
|
||||||
<source>Use custom icon set</source>
|
<source>Use custom icon set</source>
|
||||||
<translation>使用自定义图标</translation>
|
<translation>使用自定义图标</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2667,7 +2667,7 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>图标缩放:</translation>
|
<translation>图标缩放:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-202"/>
|
<location line="-209"/>
|
||||||
<source>Font:</source>
|
<source>Font:</source>
|
||||||
<translation>字体:</translation>
|
<translation>字体:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2676,6 +2676,11 @@ p, li { white-space: pre-wrap; }
|
||||||
<source>Create a customized copy</source>
|
<source>Create a customized copy</source>
|
||||||
<translation>自定义</translation>
|
<translation>自定义</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+7"/>
|
||||||
|
<source>Open custom themes folder</source>
|
||||||
|
<translation>打开自定义主题文件夹</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+78"/>
|
<location line="+78"/>
|
||||||
<source>Language:</source>
|
<source>Language:</source>
|
||||||
|
@ -2712,14 +2717,8 @@ p, li { white-space: pre-wrap; }
|
||||||
<translation>繁体中文</translation>
|
<translation>繁体中文</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+32"/>
|
|
||||||
<source>Confirm Overwrite</source>
|
<source>Confirm Overwrite</source>
|
||||||
<translation>确认覆盖</translation>
|
<translation type="vanished">确认覆盖</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location line="+1"/>
|
|
||||||
<source>Custom Theme file %1 already exists.<br />Do you want to overwrite it?</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -2130,7 +2130,7 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+179"/>
|
<location line="+186"/>
|
||||||
<source>*Needs restart</source>
|
<source>*Needs restart</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2150,7 +2150,7 @@
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="-151"/>
|
<location line="-158"/>
|
||||||
<source>Icon Set:</source>
|
<source>Icon Set:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -2159,6 +2159,11 @@
|
||||||
<source>Create a customized copy</source>
|
<source>Create a customized copy</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location line="+7"/>
|
||||||
|
<source>Open custom themes folder</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+55"/>
|
<location line="+55"/>
|
||||||
<source>Use custom icon set</source>
|
<source>Use custom icon set</source>
|
||||||
|
@ -2184,16 +2189,6 @@
|
||||||
<source>Traditional Chinese</source>
|
<source>Traditional Chinese</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<location line="+32"/>
|
|
||||||
<source>Confirm Overwrite</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location line="+1"/>
|
|
||||||
<source>Custom Theme file %1 already exists.<br />Do you want to overwrite it?</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<location filename="../settingsdialog/environmentappearancewidget.ui" line="+71"/>
|
<location filename="../settingsdialog/environmentappearancewidget.ui" line="+71"/>
|
||||||
<source>Icon Zoom:</source>
|
<source>Icon Zoom:</source>
|
||||||
|
|
|
@ -545,7 +545,6 @@ void openFileFolderInExplorer(const QString &path)
|
||||||
QUrl("file:///"+
|
QUrl("file:///"+
|
||||||
includeTrailingPathDelimiter(path),QUrl::TolerantMode));
|
includeTrailingPathDelimiter(path),QUrl::TolerantMode));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor alphaBlend(const QColor &lower, const QColor &upper) {
|
QColor alphaBlend(const QColor &lower, const QColor &upper) {
|
||||||
|
|
Loading…
Reference in New Issue