- enhancement: show custom icon set folder in options -> enviroment -> folders
This commit is contained in:
parent
15c6282c36
commit
e1631c211a
1
NEWS.md
1
NEWS.md
|
@ -1,5 +1,6 @@
|
||||||
Red Panda C++ Version 0.14.0
|
Red Panda C++ Version 0.14.0
|
||||||
- enhancement: custom icon set ( in the configuration folder)
|
- enhancement: custom icon set ( in the configuration folder)
|
||||||
|
- enhancement: show custom icon set folder in options -> enviroment -> folders
|
||||||
|
|
||||||
Red Panda C++ Version 0.13.4
|
Red Panda C++ Version 0.13.4
|
||||||
- fix: when copy comments, don't auto indent
|
- fix: when copy comments, don't auto indent
|
||||||
|
|
Binary file not shown.
|
@ -2060,19 +2060,26 @@ Are you really want to continue?</oldsource>
|
||||||
<translation>表单</translation>
|
<translation>表单</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="settingsdialog/environmentfolderswidget.ui" line="27"/>
|
<location filename="settingsdialog/environmentfolderswidget.ui" line="66"/>
|
||||||
<source>Configuration folder:</source>
|
<source>Configuration folder:</source>
|
||||||
<oldsource>Confirugration folder:</oldsource>
|
<oldsource>Confirugration folder:</oldsource>
|
||||||
<translation>配置文件夹:</translation>
|
<translation>配置文件夹:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="settingsdialog/environmentfolderswidget.ui" line="63"/>
|
<location filename="settingsdialog/environmentfolderswidget.ui" line="73"/>
|
||||||
<location filename="settingsdialog/environmentfolderswidget.ui" line="66"/>
|
<location filename="settingsdialog/environmentfolderswidget.ui" line="76"/>
|
||||||
|
<location filename="settingsdialog/environmentfolderswidget.ui" line="101"/>
|
||||||
|
<location filename="settingsdialog/environmentfolderswidget.ui" line="104"/>
|
||||||
<source>Open in browser</source>
|
<source>Open in browser</source>
|
||||||
<translation>在文件浏览器中打开</translation>
|
<translation>在文件浏览器中打开</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="settingsdialog/environmentfolderswidget.ui" line="77"/>
|
<location filename="settingsdialog/environmentfolderswidget.ui" line="87"/>
|
||||||
|
<source>Custom icon sets folder:</source>
|
||||||
|
<translation>自定义图标集文件夹:</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="settingsdialog/environmentfolderswidget.ui" line="56"/>
|
||||||
<source>Remove all custom settings and exit</source>
|
<source>Remove all custom settings and exit</source>
|
||||||
<translation>删除所有的自定义设置并退出程序</translation>
|
<translation>删除所有的自定义设置并退出程序</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -40,11 +40,11 @@ EnvironmentFoldersWidget::~EnvironmentFoldersWidget()
|
||||||
void EnvironmentFoldersWidget::doLoad()
|
void EnvironmentFoldersWidget::doLoad()
|
||||||
{
|
{
|
||||||
ui->txtConfigFolder->setText(pSettings->dirs().config());
|
ui->txtConfigFolder->setText(pSettings->dirs().config());
|
||||||
|
ui->txtIconSetFolder->setText(pSettings->dirs().config(Settings::Dirs::DataType::IconSet));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnvironmentFoldersWidget::doSave()
|
void EnvironmentFoldersWidget::doSave()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnvironmentFoldersWidget::on_btnOpenConfigFolderInBrowser_clicked()
|
void EnvironmentFoldersWidget::on_btnOpenConfigFolderInBrowser_clicked()
|
||||||
|
@ -75,5 +75,15 @@ void EnvironmentFoldersWidget::on_btnResetDefault_clicked()
|
||||||
void EnvironmentFoldersWidget::updateIcons(const QSize &size)
|
void EnvironmentFoldersWidget::updateIcons(const QSize &size)
|
||||||
{
|
{
|
||||||
pIconsManager->setIcon(ui->btnOpenConfigFolderInBrowser,IconsManager::ACTION_FILE_OPEN_FOLDER);
|
pIconsManager->setIcon(ui->btnOpenConfigFolderInBrowser,IconsManager::ACTION_FILE_OPEN_FOLDER);
|
||||||
|
pIconsManager->setIcon(ui->btnOpenIconSetFolderInFileBrowser,IconsManager::ACTION_FILE_OPEN_FOLDER);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void EnvironmentFoldersWidget::on_btnOpenIconSetFolderInFileBrowser_clicked()
|
||||||
|
{
|
||||||
|
QDesktopServices::openUrl(
|
||||||
|
QUrl("file:///"+
|
||||||
|
includeTrailingPathDelimiter(pSettings->dirs().config(Settings::Dirs::DataType::IconSet)),QUrl::TolerantMode));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,8 @@ private slots:
|
||||||
void on_btnResetDefault_clicked();
|
void on_btnResetDefault_clicked();
|
||||||
|
|
||||||
// SettingsWidget interface
|
// SettingsWidget interface
|
||||||
|
void on_btnOpenIconSetFolderInFileBrowser_clicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void updateIcons(const QSize &size) override;
|
void updateIcons(const QSize &size) override;
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,14 +21,7 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="text">
|
|
||||||
<string>Configuration folder:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
|
@ -41,7 +34,7 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
<item row="2" column="0" colspan="3">
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
|
@ -57,20 +50,6 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="btnOpenConfigFolderInBrowser">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Open in browser</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Open in browser</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../icons.qrc">
|
|
||||||
<normaloff>:/icons/images/newlook24/053-open.png</normaloff>:/icons/images/newlook24/053-open.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="btnResetDefault">
|
<widget class="QPushButton" name="btnResetDefault">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -81,6 +60,55 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Configuration folder:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QToolButton" name="btnOpenConfigFolderInBrowser">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Open in browser</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open in browser</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../icons.qrc">
|
||||||
|
<normaloff>:/icons/images/newlook24/053-open.png</normaloff>:/icons/images/newlook24/053-open.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Custom icon sets folder:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="txtIconSetFolder">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QToolButton" name="btnOpenIconSetFolderInFileBrowser">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Open in browser</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Open in browser</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../icons.qrc">
|
||||||
|
<normaloff>:/icons/images/newlook24/053-open.png</normaloff>:/icons/images/newlook24/053-open.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
Loading…
Reference in New Issue